Search code examples
ibm-cloudcircuitquantum-computingcircuit-diagramqiskit

What does this quantum circult represent? Please describe what is happening in this circuit


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?


Solution

  • 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.