7 min read
Entanglement & Bell States
Combine Hadamard and CNOT to build the Bell state and see two-qubit correlation.
Suggested before this lesson
Everything so far has been a single qubit, so the plain QuantumCircuit(1) form was enough. With two qubits, this is a good moment to reach for the register style from the previous lesson: a named QuantumRegister for the qubits, and (since real Qiskit circuits eventually need somewhere to put measurement results) a named ClassicalRegister for classical bits:
Nothing about how gates get applied changes: you still call qc.h(0), qc.cx(0, 1), etc. with plain qubit indices, register or no register. What the register buys you is a name: the circuit diagrams throughout this lesson use exactly this pattern, and you'll see the q_0 / q_1 wire labels and the bell_pair name it produces.
(controlled-) flips its target qubit only when the control qubit is . Combined with Hadamard, it produces entanglement: correlations that have no classical explanation.
bell_pair (using a QuantumRegister, as above, or just QuantumCircuit(2, name='bell_pair'), either is fine) that produces the Bell state : apply to qubit 0, then with qubit 0 as control and qubit 1 as target.Live preview of the circuit detected in your code
circuit: bell_pair
Notice the two qubits are never independently on the Bloch sphere surface once entangled; only the joint state is pure.
Circuit
circuit: bell_pair
h
cx
Step through the circuit: after gate 2 of 2
3 / 3
State Amplitudes
Measurement Probabilities
50.0%
0.0%
0.0%
50.0%
Python
Python
Python