0

Circuit Diagram

enter image description here

Resultenter image description here

I am new to Quantum computing and having a really tough time understanding the working of Quantum Logic Gates. So, can anybody please help me with what these gates in the diagram actually do and what this circuit is doing and what does the result in probabilities actually means?

Community
  • 1
  • 1

1 Answers1

2

Simple explanation:

The abstract mathematical model of a qubit is a Bloch sphere in which default measurement basis is the Z-axis.

The two H gates are Hadamard gates and put their qubit in a superposition of states relative to the Z-axis.

The CNot gate you have there flips q1 (which starts as 0) if q0 is a one.

Therefore, your outcomes match q0 and q1 always: if the measurement of the superpositioned q0 gate comes out a 1, the q1 gate does also. Otherwise, both are 0.

The probability for each qubit is 50/50 since the two uncontrolled bits are in a superposition, and the controlled bit (q1) follows q0.

Additionally, remember current devices are "noisy" and may not reflect the theory perfectly.

Also, as I said, that was the "simplified" story. Make sure you understand the Behaviour in the Hadamard transformed basis portion of the Wikipedia Controlled Not Gate article because to really know what to expect, you have to do the linear algebra as shown in the Dirac notation in that article.

Jack Woehr
  • 36
  • 3
  • 1
    Wow, that was really helpful and informative. So, here is what I am interpreting, please correct me if I am wrong... [1] The Hadamard gates are for putting the qubits into superposition i.e. 1/(2)^1/2|0> + 1/(2)^1/2|1> [2] The CNot gate flips the value to the control qubit if the value of q0 is 1 – Aman Nirala Nov 17 '19 at 21:58
  • 1
    True enough, though I'd say "the CNote gate inverts the target qubit if the control qubit is 1". – Jack Woehr Nov 17 '19 at 22:09
  • 1
    I just wanted to clarify that q1 comes out 1 because it started at 0 at the beginning of the circuit. If q1 had been a 1, the control bit (q0) being a 1 would have inverted q1 (the target bit) to 0. – Jack Woehr Nov 17 '19 at 22:12
  • Yup I got it... q0 is the control bit and q1 is the target. So if the control is 1 the target is just flipped (to 0 if was at 1 and to 1 if was at 0). Thanks for the help sir. – Aman Nirala Nov 17 '19 at 22:18
  • 1
    Also please note my latest edit to my original answer to go beyond the "simple" answer! Have fun with Quantum Computing, @AmanNirala ! – Jack Woehr Nov 17 '19 at 22:22