Creating Entanglement on Demand
You already know how to entangle a two-qubit register — but real quantum programs work with many qubits at once. The key insight is that the same H + CNOT recipe applies to any pair of qubits in a larger register, leaving the remaining qubits undisturbed.
Targeted entanglement in a register
Suppose you have a three-qubit register in the ground state and you want to entangle only qubits 1 and 2. The recipe is identical to the two-qubit case: apply to qubit 1, then a CNOT from qubit 1 to qubit 2:
Qubit 0 is untouched by both gates, so it remains in . The full three-qubit state is
The amplitudes on and are zero, and amplitude on and each equals , giving measurement probability for each — a perfect Bell pair living inside a larger register.
Why qubit ordering matters
In this platform, qubit 0 is the most significant bit. So the computational-basis label for a
three-qubit state reads as . When you see , that means
— qubits 1 and 2 are both 1 while qubit 0 is 0. Keep this in
mind when you read the state-vector output.
Try it
Entangle qubits 1 and 2 in a three-qubit register. The grader checks the full state vector, which should have equal amplitudes on and only.
After running, check the State tab: you should see two entries each with amplitude , confirming the Bell pair is resident in the larger register.
Sign in on the full site to ask questions and join the discussion.