So far, we have discussed the manipulation and measurement of a single qubit. Quantum entanglement can arise when two or more qubits share a state that cannot be written as a product of their individual states. Entangled qubits can show correlations that no local classical model can reproduce. Quantum algorithms can use these correlations together with interference, although entanglement alone does not guarantee a speedup.
7.1 Entanglement Fundamentals¶
To introduce the notation, imagine two qubits whose measurement outcomes are labeled heads (H) and tails (T). Ordinary, independent fair coins yield HH, HT, TH, and TT, each with 25% probability. The qubits could instead be prepared in the Bell state , illustrated in Fig. Figure 1. Measuring both qubits in the H/T basis then yields HH or TT with 50% probability each; HT and TH never occur. Classical coins can also have correlated outcomes, so this one set of outcomes alone does not establish entanglement. The difference appears when the quantum state is tested in other measurement bases.

Figure 1:Coin symbols represent two qubits measured in the H/T basis: a Bell state yields either HH or TT.
The qubits can be separated before measurement. If Alice measures H, she can predict that Bob will obtain H when he measures in the same basis; likewise for T. Yet Bob’s local results remain random, regardless of whether or when Alice measures her qubit. They must compare their results through an ordinary communication channel to observe the correlation (Fig. Figure 2).

Figure 2:Two distant qubits prepared in a Bell state yield matching results when measured in the same basis. Comparing those results requires classical communication.
Einstein called the apparent connection “spooky action at a distance.”[1] Entanglement does not let Alice control Bob’s result or send him a message faster than light. Its distinctive feature is the pattern of correlations across different measurement choices, examined below through Bell’s theorem.
7.2 Hidden Variable Theory¶
It is tempting to think that there may be some classical explanation for entanglement. Did the entanglement change the fair coins by adding extra mass to the heads side or the tails side, thereby making them unfair? To provide a more realistic example in a classical system, consider a particle that decays into two lighter particles. The momenta of these three particles are related by the conservation of momentum: . Given a known total initial momentum, then by measuring the momentum of one of the final state particles, we can determine the momentum of the other final state particle. In summary, by measuring one particle’s momentum, we know the other. Momentum is the hidden classical variable that is encoded when the two particles are created. This is shown in Fig. Figure 3. Naturally, the question arises: is there a conceptually similar hidden variable in the quantum mechanical situation?

Figure 3:When a particle decays into two smaller particles, the decay products are “classically entangled” according to the conservation of momentum.
Bell’s theorem shows that certain quantum correlations violate bounds obeyed by local hidden-variable models.[2] Experiments have observed these violations under increasingly stringent conditions.[3] Bell’s theorem does not rule out every possible hidden-variable theory; it rules out the local models subject to its assumptions.
7.3 Multi-Qubit States¶
Given multiple qubits, the total state of the system can be written together in a single ket. For example, if coin #1 is heads and coin #2 is tails, the two-coin state is expressed as . In general, a system of two qubits can be in a superposition of four classical states, and written as
As we saw for single-qubit states, the coefficients are amplitudes and are generally complex numbers. Measuring both qubits in this basis yields state with probability . This is shown in Fig. Figure 4.

Figure 4:A two-qubit measurement yields one of four basis states, with probability for state . The diagram’s labels apply only when the amplitudes are real.
7.3.1 Example¶
A system of two qubits is in a superposition state given by .
(a) What is the probability of measuring both qubits as 1? .
(b) If we only measure the first qubit and get a value of 1, what is the new state of the system?
Since |00〉 is the only basis state of that doesn’t have a 1 in the first qubit, we eliminate the state |00〉 from the possibilities. This results in .
Finally, we re-normalize the state so that the probabilities add up to 1. Therefore, the new state is .
7.4 Non-Entangled Systems¶
It is possible to have a system of particles that are not entangled with each other. In this case, changing one particle will not cause any change in the other particle. For example, in a classical system, flipping two coins and measuring one coin as heads does not tell you any information about whether or not the other coin will land on heads or tails. These events are said to be independent. If you wanted to calculate the probability of |HT〉, you would simply multiply the probability of getting H on coin #1 by the probability of getting T on coin #2. This is given by
Non-entangled states are also called product states or separable states because they can be factored into a product of single-qubit states.[4] The two single-qubit probabilities multiply to produce the two-qubit probabilities.
7.4.1 Example¶
One qubit is in an state, while another is in a state. What is the state of the non-interacting two-qubit system?
7.5 Entangled Systems¶
An interaction can entangle qubits, but it need not do so. For the pure states used in this chapter, a multi-qubit state is entangled when it cannot be factored into single-qubit states. One useful test for these pure states is to ask whether measuring one qubit changes the conditional probability distribution for the other. If it does, the state is entangled. If it does not in the chosen basis, the state could still be entangled: relative phases may reveal correlations in another basis. For mixed states, correlations alone do not prove entanglement.[5] Question 5(e) explores the role of relative signs.
7.5.1 Example¶
Is an entangled state?
Yes. Before learning the first result, either outcome for qubit #2 has probability 50%. Once we know the result for qubit #1, we can predict qubit #2’s result in the same basis with certainty. This is evidence of entanglement for the specified pure state; the mathematical test below confirms that the state cannot be factored into individual qubits. Bob still sees a 50/50 distribution until he learns Alice’s result.
7.5.2 Example¶
Show that cannot be written as a product of two single qubits.
Assume that the state can be written as the product of two states.
Comparing the amplitudes on the left vs. the right, the ’s and ’s must satisfy:
However, this is not possible. For example, take . This means that either or . If , then , but in the above equation. A similar contradiction occurs with . So the initial assumption must be incorrect and this entangled state cannot be written as the product of two separate states.
7.6 Entangling Particles¶
As there are many different ways of building a quantum computer, there are many different ways of physically entangling particles. One method called “spontaneous parametric down-conversion” shines a laser at a special nonlinear crystal. The crystal splits the incoming photon into two photons with correlated polarizations. For example, one could produce a pair of photons that always have perpendicular polarizations (see Fig. Figure 5). Just as the engineering aspect of building a quantum computer is outside the scope of this course, so is the technological aspect of how qubits are physically entangled. We will focus more on how entanglement is represented in a quantum computer and the uses of this.

Figure 5:A nonlinear crystal creates two photons with entangled polarizations.
7.7 CNOT Gate¶
You have already learned about the X, Hadamard, and Z gates. These act on a single qubit. There are also quantum gates that perform a logic operation on multiple qubits. One widely used two-qubit gate is the controlled NOT (CNOT) gate. CNOT can entangle suitable input states. It takes a control qubit and a target qubit as inputs and outputs two qubits. The control qubit stays the same, while the target obeys the following rule.
If the control qubit is |0〉, then leave the target qubit alone.
If the control qubit is |1〉, flip the target from to , or from to .
The truth table for the CNOT gate is shown in Table 7.1.[6] From this one can deduce the matrix form of the CNOT gate as
Table 7.1:The truth table for the CNOT gate
| Before | After | ||
|---|---|---|---|
| Control bit | Target bit | Control bit | Target bit |
| |0〉 | |0〉 | |0〉 | |0〉 |
| |0〉 | |1〉 | |0〉 | |1〉 |
| |1〉 | |0〉 | |1〉 | |1〉 |
| |1〉 | |1〉 | |1〉 | |0〉 |
Figure Figure 6 is the circuit for the CNOT gate. Plugging in the “Before” values from Table 7.1 into this circuit will produce the “After” values.

Figure 6:The CNOT gate performs an X gate on the target qubit if the control qubit is |1〉.
7.8 Notation Convention¶
When converting between bra-ket notation and circuit notation, there are two different conventions. Since we will be using the IBM quantum computer, we will adopt the IBM convention. This is shown in Fig. Figure 7. In the IBM notation, the topmost qubit in the circuit corresponds to the rightmost qubit in the bra-ket notation (|…q〉). IBM shorthand is top-down in circuit notation, which corresponds to right-left in bra-ket notation.

Figure 7:The two conventions for mapping circuit notation to the bra-ket notation, IBM (left) and Other (right). Note in this book we adopt the IBM convention as we run code on the IBM quantum computers.
The other convention, which we will not use going forward but provide in case it is seen in other resources, is shown in Fig. Figure 7. Here, the topmost qubit corresponds to the leftmost qubit in bra-ket notation (|q…〉). Top-down in circuit notation corresponds to left-right in bra-ket notation. We will not use this going forward.
7.9 Examples¶
Figure Figure 8 shows the quantum circuit sending |01〉 through a CNOT gate. What is the output?

Figure 8:The quantum circuit that sends a multi-qubit in the |01〉 state through a CNOT gate.
The figure shows that, in IBM notation, the control qubit is on top and the target is on the bottom. Since the control is in the |1〉 state, the target qubit is flipped to |1〉. So measurement will always result in |11〉.
Examine Fig. Figure 9. The control qubit is in a superposition of |0〉 and |1〉. What is the effect of a CNOT gate?

Figure 9:The quantum circuit that sends a control qubit in a superposition state through a CNOT gate.
Before the CNOT operation, in ket notation, the control qubit is in the state, while the target qubit is in the |0〉 state. The two-qubit input state is therefore . When we apply the rules for the CNOT, the first state |00〉 does not change as the control qubit is |0〉. However, for the second state |01〉, the control qubit is |1〉 and so the target qubit is flipped from |0〉 to |1〉. The result of the CNOT gate is the state . The histogram from measuring this state is shown in Fig. Figure 10. This is a special state called the Bell state.

Figure 10:The measurement histogram produced by running the circuit in Fig. Figure 9. This older display includes three unused register bits, which remain zero. Reprint courtesy of International Business Machines Corporation, ⒸInternational Business Machines Corporation.
The two qubits are entangled after this CNOT: the resulting Bell state cannot be written as a product of two single-qubit states. By linearity, CNOT acts on each basis component of a superposition. That fact alone does not guarantee a computational speedup; a useful algorithm must arrange interference so that measurement reveals the desired answer. CNOT is reversible: applying it again restores the input state.
7.10 Big Ideas¶
A pure state is entangled when it cannot be written as a product of its component states. Interactions can create entanglement.
Entanglement and interference are resources in many quantum algorithms, but neither alone guarantees a speedup.
Two-qubit gates act on pairs of qubits. CNOT can create entanglement from suitable inputs.[7]
7.11 Activities¶
Correlation in Entangled States Lab in Worksheet 10.1 Correlation in Entangled States Lab
Schrödinger’s Worm Using Five Qubits in Worksheet 10.4 Schrödinger’s Worm Using Five Qubits
For those interested in hands-on experiments, see QuTools[8]
7.12 Check Your Understanding¶
For each of the questions below, assume that two qubits start in the state
(a) What is the probability of measuring both qubits as 0?
(b) What is the probability of measuring the first qubit as 1?
(c) What is the probability of measuring the second qubit as 0?
(d) What is the new state of the system after measuring the first qubit as 0?
(e) What is the new state of the system after measuring the first qubit as 1?
Two independent fair classical coins are flipped. What are the four possible outcomes, and what probability does each have? How does this distribution differ from the H/T measurement distribution of the Bell state in Section 7.1?
Is an entangled state? If so, show that it cannot be written as a product. If not, what is the individual state of the two qubits?
Are the following two-qubit states entangled?
(a)
(b)
(c)
(d)
(e)
(f)
Two qubits are passed through a CNOT. In IBM notation, the qubit on the right is the control qubit. What is the output for the following initial states?
(a) |00〉
(b) |01〉
(c) |11〉
(d)
(e)
The output of a CNOT gate is shown in Fig. Figure 11. What were the inputs?

Figure 11:CNOT gate for Problem 6
Can you predict the state produced by these quantum circuits? Try them out on the IBM quantum computer.
(a)

(b)

(c)

(d)

Can you predict which states will be produced by these quantum circuits?
(a)

(b)

(c)

(d)

Can you predict the state produced by these quantum circuits? Note: to put the circuit in a) on the IBM quantum computer, you need to use the code (rather than the click-and-drag interface) to put the second CNOT control on the bottom qubit.
(a)

(b)

Use the IBM Q[9] simulator to create the entangled state .
Suppose Alice and Bob each hold one qubit of an entangled pair. Alice measures hers. What results can Bob observe locally, before hearing from Alice? Can they use the correlation to send a message faster than light? Explain.
“Bounding the speed of spooky action at a distance.” Physical Review Letters. 110: 260407. 2013. arXiv:1303.0614.
The BIG Bell Test Collaboration (9 May 2018). “Challenging local realism with human choices.” Nature 557: 212–216. Publisher page.
More recently, it has been shown that there can exist quantum correlations in separable states that are not due to entanglement. These are called quantum discord: Quantum discord.
The conditional-probability test here is used only for known pure states. For a pure two-qubit state, a reduced state’s purity can provide a more general test, but density matrices are outside the scope of this chapter.
In fact, three single qubit gates (the Hadamard, phase, and π/8 phase-rotation) in combination with the CNOT form a universal set of gates, i.e., all other gates can be made up from them.