|q⟩ Bad Qubits

advanced · Programming · Distributed & Networked Quantum Computing

Entanglement Swapping

A single Bell pair only reaches as far as one optical link. To connect nodes that are too far apart to share a direct pair, we swap entanglement through an intermediate node. The remarkable part: the two end qubits become entangled even though they have never interacted and were created independently.

The setup

Place a repeater station between Alice and Bob. Each end shares a Bell pair with the repeater:

Φ+AR1Φ+R2B,|\Phi^+\rangle_{A R_1} \otimes |\Phi^+\rangle_{R_2 B},

where R1,R2R_1, R_2 are the repeater's two qubits. In our register, A=q0A = q_0, R1=q1R_1 = q_1, R2=q2R_2 = q_2, B=q3B = q_3. Initially Alice is entangled only with R1R_1, and Bob only with R2R_2; Alice and Bob share nothing.

Bell-state measurement at the repeater

The repeater performs a Bell-state measurement (BSM) jointly on its two qubits R1,R2R_1, R_2. A BSM projects a two-qubit system onto one of the four Bell states. Operationally it is the inverse of the entangler that creates a Bell pair: apply a CNOT and then a Hadamard, then measure in the computational basis.

BSM=(measure)(HI)CNOTR1R2.\text{BSM} = \big(\text{measure}\big)\circ \big(H\otimes I\big)\circ \mathrm{CNOT}_{R_1\to R_2}.

This measurement consumes both repeater qubits and, by entanglement monogamy, transfers the correlations: Alice's q0q_0 and Bob's q3q_3 are now entangled, with which Bell state they share determined by the two measurement bits.

Feed-forward corrections

The four BSM outcomes leave q0,q3q_0,q_3 in one of the four Bell states Φ±|\Phi^\pm\rangle, Ψ±|\Psi^\pm\rangle. To standardise on Φ+|\Phi^+\rangle, Bob applies a Pauli correction based on the classically communicated bits (mR1,mR2)(m_{R_1}, m_{R_2}):

correction on B=ZmR1XmR2.\text{correction on } B = Z^{\,m_{R_1}}\, X^{\,m_{R_2}}.

This is the same Pauli-frame bookkeeping that appears in teleportation — entanglement swapping is literally teleportation of one half of a Bell pair. In a circuit we model the classically conditioned corrections with the deferred-measurement trick: a CNOT from q2q_2 onto q3q_3 implements XmR2X^{m_{R_2}}, and a CZ from q1q_1 onto q3q_3 implements ZmR1Z^{m_{R_1}}.

The swap signature

After correction, the defining observable is that Alice's and Bob's outcomes are perfectly correlated: a computational-basis readout never finds q0q3q_0 \neq q_3. The repeater qubits, having been measured, are uniformly random and carry no remaining link to the data — exactly as they should after being consumed.

Try it

Run the swap. The grader verifies the swap signature directly: it checks that all probability lies on outcomes with q0=q3q_0 = q_3, and that the probability of any q0q3q_0 \neq q_3 outcome is zero.

Run your code to see the quantum state.

Inspect the Probabilities tab: every populated bar has matching first and last bits, confirming that two never-interacting qubits are now entangled across the repeater.

Sign in on the full site to ask questions and join the discussion.