diff --git a/computer.py b/computer.py index ec1e3ff..67a5506 100644 --- a/computer.py +++ b/computer.py @@ -100,9 +100,15 @@ def main(): # TODO: What does it mean to apply H gate on the entangled qubits??? # https://en.wikipedia.org/wiki/Controlled_NOT_gate#Behaviour_in_the_Hadamard_transformed_basis # Should it be: - # q1 = Qubit(H * entanglement[:2]) - # q2 = Qubit(H * entanglement[3:]) - # /TODO + # q1 = Qubit(H * entanglement[:2]) + # q2 = Qubit(H * entanglement[2:]) + # But how does one get the 4x4 matrix of CNOT??? + # + # q1 = Qubit(H * Qubit(entanglement[:2])) + # print(q1) + # q2 = Qubit(H * Qubit(entanglement[2:])) + # print(q2) + # print(q1 * q2) # this should get us 1/4 chance for each combination of 00 01 10 and 10; # measure 42 times