Into Quantum

Into Quantum

How to Create a Bell State with Qiskit

Solution to Question 3 of the ongoing Quantum programming challenge

Dr. Ashish Bamania's avatar
Dr. Ashish Bamania
Dec 29, 2025
∙ Paid

Hey everyone!

I recently published a challenge with 6 Qiskit questions to get started with Quantum Computing.

6 Qiskit Questions to Get Started with Quantum Computing

6 Qiskit Questions to Get Started with Quantum Computing

Dr. Ashish Bamania
·
Dec 10
Read full story

Here is the solution to the third question from the challenge.


Question 3

Create a 2-qubit circuit that prepares the following Bell state. Measure both qubits using a Qiskit simulator and show the results.


Solution 3

We start by installing Qiskit and the Qiskit Aer library.

Qiskit Aer is a high-performance library with realistic noise models to run quantum computing simulations on classical computers.

!uv pip install qiskit qiskit-aer 

Next, we import the necessary packages.

from qiskit import QuantumCircuit # To create and manipulate quantum circuits

from qiskit_aer import Aer # Qiskit simulator backend 

from qiskit.visualization import plot_histogram # To visualise measurement results 

We then create the quantum circuit using QuantumCircuit(2, 2) where:

  • The first argument (2) represents two qubits, both starting in the state |0>, so the full initial state is |00>.

  • The second argument represents (2) two classical bits used to store the measurement results of the two qubits.

# Create circuit
circuit = QuantumCircuit(2, 2)
User's avatar

Continue reading this post for free, courtesy of Dr. Ashish Bamania.

Or purchase a paid subscription.
© 2025 Dr. Ashish Bamania · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture