From d51da309ca9e35ce2d6fb2bcb7926e90e3a91432 Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Tue, 24 Sep 2019 22:55:54 +0200 Subject: [PATCH] dont understand it... --- computer.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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