Quantum Playground CNot question

I’m new to Quantum programming, so I apologize for the rudimentary questions.

I’m either seeing unexpected behavior, or doing something wrong (probably doing something wrong).

If I run the following on Google’s Quantum Playground…


VectorSize 8
SigmaX 0
Hadamard 0
Hadamard 1
CNot 0,1
Hadamard 0
Hadamard 1

MeasureBit 1
print measured_value


I expect to see a non-zero measured_value.  When I run this in the playground by stepping through the program, the CNot has no affect on the qubit.  What am I doing wrong?


Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the Terms & Privacy policy.