A quantum circuit is a list of gates applied to qubits from left to right. Each qubit starts as |0>. Pick a ready-made circuit or add gates yourself, then move the slider to see the state after each gate.
gates applied so far
2 of 2
After gate 2, CNOT q0 → q1. Only |000> and |110> remain. Each of qubits 0 and 1 alone is 50/50, but the two always agree.
The amplitude and probability of each basis state after 2 gates.
State |q0 q1 q2>
Amplitude
Probability
|000>
0.707
50.0%
|001>
0.000
0.0%
|010>
0.000
0.0%
|011>
0.000
0.0%
|100>
0.000
0.0%
|101>
0.000
0.0%
|110>
0.707
50.0%
|111>
0.000
0.0%
Rows with a rule at the left have a nonzero amplitude. A negative amplitude has the same probability as a positive one of the same size.
Measure the final state
Measuring all three qubits returns one basis state, with the probabilities from the table at the end of the circuit. Run the circuit again on fresh qubits to get another result.
Entanglement: results that always agree
Pick two qubits. The table gives the probability of each pair of results at the end of the circuit. If the qubits were separate, the table would be the product of their own probabilities. Try the Bell pair and the GHZ state.
Joint probabilities of qubit 0 and qubit 1 at the end of the circuit.
Correlated. The table is not the product of the two qubits' own probabilities.
Separate (unentangled) qubits could not do this, so these qubits are entangled.
Entanglement does not send a message: each qubit alone still gives a random result. Algorithms use it to tie the input register to the output register. In Shor's algorithm, entanglement links each x to a^x mod N.