Hello! In our last lesson, we explored the fundamental two-qubit gates like CNOT and CZ, which allow qubits to interact. We saw how they are represented by matrices and how they act on multi-qubit states.
Today, we're going to combine what we've learned about single-qubit and two-qubit gates to achieve something uniquely quantum. We will construct a circuit that generates one of the most famous and important states in quantum mechanics: a Bell state. This is our first practical step into creating quantum entanglement, a phenomenon that lies at the heart of quantum computing's power.
Our goal is to construct a Bell state circuit to generate entanglement. We will walk through the conceptual steps, the underlying math, and finally, the practical implementation of the circuit.
1. The Recipe for a Bell State
The simplest way to generate an entangled state is by creating a Bell state. The most common one, called , can be created with a two-step "recipe" that uses gates we're already familiar with.
The circuit diagram for this process is surprisingly simple. Let's watch a short video that walks through this exact circuit.
Quantum Circuits | Understanding Quantum Information & Computation | Lesson 03
The Qiskit video "Quantum Circuits" provides a clear walkthrough of a two-qubit circuit that produces a Bell state.
Please watch the following two segments: First, watch the section on a two-qubit circuit. Pay attention to the circuit diagram with the Hadamard and CNOT gates, and the ordering convention for the qubits. Then, watch how this circuit generates a Bell state when the input is |00\rangle. The video traces the state vector through each step of the circuit, which is an excellent way to see the gates in action.
As the video explained, the process involves two main operations:
- Create Superposition: Apply a Hadamard gate to the first qubit.
- Create Entanglement: Apply a CNOT gate, using the first qubit as the control and the second as the target.
Let's trace the state of the system step-by-step, just as the video did. We start with both qubits initialized to the state.
Step 0: Initial State
Our initial two-qubit state is . As a tensor product, this is .
Step 1: Apply Hadamard to Qubit 0
We apply the H-gate to the first qubit () and do nothing (apply the Identity gate, ) to the second qubit (). The total operation is .
Since , our state becomes:
At this point, the qubits are in a superposition, but they are not yet entangled. We could still describe the state of each qubit individually.
Step 2: Apply CNOT(0, 1)
Now, we apply the CNOT gate, with as the control and as the target. The CNOT gate flips the target qubit if the control is . We apply this to our superposition state term by term:
- For the part: The control is , so the target is unchanged. The state remains .
- For the part: The control is , so the target flips from to . The state becomes .
Combining these results, the final state is:
This final state, , is our target Bell state, often denoted as or .
Notice something profound about this state: it's a superposition of two outcomes, and . If we measure the qubits, we will only ever get the result 00 or 11, each with 50% probability. We will never get 01 or 10. The measurement outcomes are perfectly correlated. This state can no longer be factored into a tensor product of two separate qubit states—this is the signature of entanglement.
2. Building the Bell State Circuit in Qiskit
Now that we understand the theory, let's put it into practice. Your goal is to be able to build and implement quantum algorithms, and this simple two-gate circuit is a fundamental building block.
The following reading provides a step-by-step guide to constructing this exact circuit using Qiskit.
Your First Quantum Circuit: The Bell's
This article from Medium provides a very clear, hands-on walkthrough for creating a Bell state in Qiskit.
Please read sections 1.4, 1.5, and 1.6. In Section 1.4, focus on how the QuantumCircuit is initialized and how the h() and cx() methods are used to build the Bell state. The mathematical explanation reinforces what we just covered. Section 1.5 shows you how to visualize the circuit with qc.draw(). This is a crucial step for debugging and understanding your work. Section 1.6 introduces simulation. While we will cover simulation in more detail in the next module, it's useful to see how you can immediately test the circuit you just built and verify the expected 00 and 11 outcomes.
Following the guide, the core Qiskit code to build the Bell state circuit is:
from qiskit import QuantumCircuit
# Create a quantum circuit with 2 qubits and 2 classical bits
qc = QuantumCircuit(2, 2)
# 1. Apply a Hadamard gate to qubit 0, putting it in superposition.
qc.h(0)
# 2. Apply a CNOT gate with qubit 0 as control and qubit 1 as target.
qc.cx(0, 1)
# We'll add measurement gates to see the result.
qc.measure([0, 1], [0, 1])
# Let's see the circuit we built!
qc.draw(output='mpl')
This code generates the following circuit:

3. The Family of Bell States
The state we created is just one of four possible Bell states. They are all maximally entangled but have different correlations due to phase and bit-flip variations. The four Bell states are:
You can create any of these states by slightly modifying our original circuit. The key is to change the initial state before applying the Hadamard and CNOT gates. This is where your knowledge of the Pauli gates (especially the X-gate) comes in handy.
From your EE background, you can think of this as changing the input signals to a fixed logic circuit to produce different, well-defined outputs.

To create the other Bell states, you can prepare the initial qubits as follows before the H-gate and CNOT:
- To get , start with . Apply
qc.x(0). - To get , start with . Apply
qc.x(1). - To get , start with . Apply
qc.x(0)andqc.x(1).
Conclusion
In this lesson, we successfully constructed our first multi-qubit circuit with a specific purpose: to generate entanglement. This is a significant milestone in our course.
Key Takeaways:
- A Bell state is a two-qubit state that is maximally entangled.
- The standard Bell state is created by applying a Hadamard gate to the first qubit followed by a CNOT gate.
- This state exhibits perfect correlation: measuring the qubits will always yield
00or11, never01or10. - We can build this circuit practically in Qiskit using
qc.h()andqc.cx(). - The other three Bell states can be generated by preparing different initial states using X-gates before the main H-CNOT sequence.
Preview of the Next Lesson:
We've created this "entangled" state and noted its strange correlations. But what does entanglement truly mean? How is it different from two classical objects that are simply correlated (like a pair of gloves)? In our next lesson, we will dive deep into the concept of quantum entanglement, exploring the features that make it so counter-intuitive and powerful, and learn why it baffled even Einstein.