Suggested reading:
An overview to quantum computing in
this thesis by J. Allcock.
Write a "simulator" for a one-qubit quantum computation. In this exwercise, work in a basis where
|0> = [1,0] and |1> = [0,1]two represent a qubit. create functions to do unary NOT operations, and the Hadamard transform,
H1 = [[1, 1] [1,-1]]Also great a function to "measure" (and print out) the state of the qubit. Is it in state "0" or "1"? Note: you should be working with complex oefficients, but you will not need to for this exercise.
{a|0,0> + b|0,1> + c|1,0> + d|1,1>} = [a,b,c,d]Focus on the 2-qubut Hadamard transform H2 = [[H1,H1],[H1,-H1]] and measuring the state of each qubit.
f1(0)=f1(1)=0; f2(0)=f2(1)=1 (constnnt) f3(0)=0, f3(1)=1; f4(0)=1, f4(1)=10 (balanced).