0% found this document useful (0 votes)
16 views28 pages

QBraid Lab

Lab 0 of the Qiskit Global Summer School 2025 introduces participants to the program and guides them through the installation of Qiskit, troubleshooting, and setting up their environment for quantum programming. The lab focuses on generating a three-qubit GHZ state using Qiskit patterns and emphasizes the importance of optimized quantum circuits. Additionally, there is a bonus challenge to run the GHZ state on actual quantum hardware.

Uploaded by

eldho22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views28 pages

QBraid Lab

Lab 0 of the Qiskit Global Summer School 2025 introduces participants to the program and guides them through the installation of Qiskit, troubleshooting, and setting up their environment for quantum programming. The lab focuses on generating a three-qubit GHZ state using Qiskit patterns and emphasizes the importance of optimized quantum circuits. Additionally, there is a bonus challenge to run the GHZ state on actual quantum hardware.

Uploaded by

eldho22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

09/07/2025, 13:01 lab0

Lab 0: Hello Quantum World!

Table of Contents
Welcome to the Qiskit Global Summer School 2025!
Lab 0 overview
Install Qiskit
Troubleshooting
Setting API token
Imports
Sanity check
Generate a three-qubit GHZ state using Qiskit patterns
Step 1. Map
Step 2. Optimize
Step 3. Execute
Step 4. Post-process
Congratulations!
Bonus challenge: Run GHZ on hardware

Welcome to the Qiskit Global Summer


School 2025!
We are thrilled to welcome you to another year of the Qiskit Global Summer School
(QGSS). This two-week summer program combines theoretical lectures with hands-
on exercises to expand the knowledge of quantum computing and quantum
programming among the community of students, researchers, and professionals
that use Qiskit in their everyday quantum journey.

The hands-on component of this summer school consists of a series of Jupyter


notebooks ("labs") designed to guide you through different topics of interest.

Each lab complements the corresponding theoretical lectures and includes helpful
links to documentation, tutorials, and references to the lectures. Furthermore, you
can also find many useful resources in IBM Quantum Learning.

Lab 0 overview
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 1/28
09/07/2025, 13:01 lab0

The main goal of this introductory lab is to show you how to use the challenge
notebooks, grade your solutions, and verify that your computer is correctly set up
for executing the quantum codes that you will be asked to complete.

To complete the different labs of the QGSS, you need to know that every notebook
will contain some predefined cells that you should not modify, and some challenge
code blocks that you will need to fill with your own code. In particular, you will need
to write the required code below each line that has the ### WRITE YOUR CODE
BELOW HERE ### comment. Make sure that every time you restart the kernel, you
execute every cell in order, so that the challenge notebooks execute and are graded
properly. This will guarantee that all the code is updated and everything runs
smoothly. There may be a few exceptions, such as installation cells or cells where
you save your account credentials. These will likely only need to be run once.

The content of this lab focuses on using Qiskit patterns to produce a GHZ state,
emphasizing the importance of designing optimized quantum circuits. At the end is
a bonus exercise where you can execute your code on a real quantum computer.

Install Qiskit
Quantum computers stand as a technology that promises to disrupt how some
calculations are done - from breaking encryption with Shor's algorithm, to enabling
faster searches with Grover's algorithm, to designing better batteries with quantum
phase estimation. A first step is choosing a software tool for designing and
executing such algorithms. In these challenges you will use Qiskit for the design
and implementation of quantum circuits in simulators and real hardware. The
following will help you install Qiskit v2.0.

First, check that the version of Python you are using in your environment is
python>=3.10, to make sure that it is compatible with the latest Qiskit version we
will use:

In [1]: from platform import python_version

print(python_version())

3.11.9

If that is not the case, you can upgrade it using your preferred tool. If you are
unsure how to do it, some recommended options are:

MacOS: Homebrew
Linux: sudo apt-get update

A detailed guide on how to upgrade Python depending on your OS is detailed here:


How to update Python

⚠️ Note: You cannot run Lab 3 of the QGSS using Windows. Hence, if you are
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 2/28
09/07/2025, 13:01 lab0

using Windows, we recommend you use an online lab environment.

For more information take a look at the wiki: https://github.com/qiskit-


community/qgss-2025/wiki/Jupyter-Notebook-Environment-(Local-and-Online)

Now let's install the grader that will install Qiskit 2.x and the necessary libraries we
will need for the summer school.

In [2]: %pip install "qc-grader[qiskit,jupyter] @ git+https://github.com/qiskit-c

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 3/28
09/07/2025, 13:01 lab0

Collecting qc-grader@ git+https://github.com/qiskit-community/Quantum-Chal


lenge-Grader.git (from qc-grader[jupyter,qiskit]@ git+https://github.com/q
iskit-community/Quantum-Challenge-Grader.git)
Cloning https://github.com/qiskit-community/Quantum-Challenge-Grader.git
to /tmp/pip-install-6gww6cms/qc-grader_e477ae68706e4159aec831a349b576d1
Running command git clone --filter=blob:none --quiet https://github.com/
qiskit-community/Quantum-Challenge-Grader.git /tmp/pip-install-6gww6cms/qc
-grader_e477ae68706e4159aec831a349b576d1
Resolved https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t to commit 897f4448b14d18b4d0a430f57f11c2dcb6200c20
Preparing metadata (setup.py) ... done
Requirement already satisfied: typeguard in /opt/.qbraid/environments/qgss
_000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+https://gi
thub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,
qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.
git) (4.4.4)
Requirement already satisfied: jsonpickle==3.0.3 in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+ht
tps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader
[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challeng
e-Grader.git) (3.0.3)
Requirement already satisfied: requests==2.32.3 in /opt/.qbraid/environmen
ts/qgss_000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+htt
ps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[j
upyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-
Grader.git) (2.32.3)
Requirement already satisfied: ipycytoscape in /opt/.qbraid/environments/q
gss_000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[ju
pyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-G
rader.git) (1.3.3)
Requirement already satisfied: plotly in /opt/.qbraid/environments/qgss_00
0000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qis
kit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (6.2.0)
Requirement already satisfied: networkx==3.2.1 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[ju
pyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-G
rader.git) (3.2.1)
Requirement already satisfied: graphviz in /opt/.qbraid/environments/qgss_
000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,q
iskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it) (0.21)
Requirement already satisfied: ibm-platform-services==0.66.1 in /opt/.qbra
id/environments/qgss_000000/pyenv/lib/python3.11/site-packages (from qc-gr
ader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git
->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quant
um-Challenge-Grader.git) (0.66.1)
Requirement already satisfied: jupyterlab in /opt/conda/lib/python3.11/sit
e-packages (from qc-grader@ git+https://github.com/qiskit-community/Quantu
m-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/
qiskit-community/Quantum-Challenge-Grader.git) (4.2.0)
Requirement already satisfied: ipykernel in /opt/conda/lib/python3.11/site
-packages (from qc-grader@ git+https://github.com/qiskit-community/Quantum
-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/q
iskit-community/Quantum-Challenge-Grader.git) (6.29.3)
Requirement already satisfied: qiskit~=2.1.0 in /opt/.qbraid/environments/

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 4/28
09/07/2025, 13:01 lab0

qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit[visualization]


~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/qiskit-commu
nity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://
github.com/qiskit-community/Quantum-Challenge-Grader.git) (2.1.0)
Requirement already satisfied: qiskit-ibm-runtime in /opt/.qbraid/environm
ents/qgss_000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+h
ttps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader
[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challeng
e-Grader.git) (0.40.1)
Requirement already satisfied: qiskit-aer in /opt/.qbraid/environments/qgs
s_000000/pyenv/lib/python3.11/site-packages (from qc-grader@ git+https://g
ithub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyte
r,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grade
r.git) (0.17.1)
Requirement already satisfied: ibm_cloud_sdk_core<4.0.0,>=3.24.1 in /opt/.
qbraid/environments/qgss_000000/pyenv/lib/python3.11/site-packages (from i
bm-platform-services==0.66.1->qc-grader@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (3.24.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/.qbraid/en
vironments/qgss_000000/pyenv/lib/python3.11/site-packages (from requests==
2.32.3->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challen
ge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-co
mmunity/Quantum-Challenge-Grader.git) (3.4.2)
Requirement already satisfied: idna<4,>=2.5 in /opt/.qbraid/environments/q
gss_000000/pyenv/lib/python3.11/site-packages (from requests==2.32.3->qc-g
rader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quan
tum-Challenge-Grader.git) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/.qbraid/environm
ents/qgss_000000/pyenv/lib/python3.11/site-packages (from requests==2.32.3
->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Gra
der.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git) (2.5.0)
Requirement already satisfied: certifi>=2017.4.17 in /opt/.qbraid/environm
ents/qgss_000000/pyenv/lib/python3.11/site-packages (from requests==2.32.3
->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Gra
der.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git) (2025.6.15)
Requirement already satisfied: python_dateutil<3.0.0,>=2.8.2 in /opt/.qbra
id/environments/qgss_000000/pyenv/lib/python3.11/site-packages (from ibm_c
loud_sdk_core<4.0.0,>=3.24.1->ibm-platform-services==0.66.1->qc-grader@ gi
t+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-gra
der[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Chall
enge-Grader.git) (2.9.0.post0)
Requirement already satisfied: PyJWT<3.0.0,>=2.8.0 in /opt/.qbraid/environ
ments/qgss_000000/pyenv/lib/python3.11/site-packages (from ibm_cloud_sdk_c
ore<4.0.0,>=3.24.1->ibm-platform-services==0.66.1->qc-grader@ git+https://
github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyte
r,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grade
r.git) (2.10.1)
Requirement already satisfied: six>=1.5 in /opt/.qbraid/environments/qgss_
000000/pyenv/lib/python3.11/site-packages (from python_dateutil<3.0.0,>=2.
8.2->ibm_cloud_sdk_core<4.0.0,>=3.24.1->ibm-platform-services==0.66.1->qc-
grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Qua
ntum-Challenge-Grader.git) (1.17.0)
Requirement already satisfied: rustworkx>=0.15.0 in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit~=2.1.0->qi
skit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://gith

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 5/28
09/07/2025, 13:01 lab0

ub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qi
skit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (0.16.0)
Requirement already satisfied: numpy<3,>=1.17 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit~=2.1.0->qisk
it[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qis
kit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (2.3.1)
Requirement already satisfied: scipy>=1.5 in /opt/.qbraid/environments/qgs
s_000000/pyenv/lib/python3.11/site-packages (from qiskit~=2.1.0->qiskit[vi
sualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/
qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (1.1
6.0)
Requirement already satisfied: dill>=0.3 in /opt/.qbraid/environments/qgss
_000000/pyenv/lib/python3.11/site-packages (from qiskit~=2.1.0->qiskit[vis
ualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/q
iskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ g
it+https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (0.4.
0)
Requirement already satisfied: stevedore>=3.0.0 in /opt/.qbraid/environmen
ts/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit~=2.1.0->qis
kit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qis
kit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (5.4.1)
Requirement already satisfied: typing-extensions in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit~=2.1.0->qi
skit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://gith
ub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qi
skit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (4.14.1)
Requirement already satisfied: matplotlib>=3.3 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit[visualizatio
n]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (3.10.3)
Requirement already satisfied: pydot in /opt/.qbraid/environments/qgss_000
000/pyenv/lib/python3.11/site-packages (from qiskit[visualization]~=2.1.0;
extra == "qiskit"->qc-grader@ git+https://github.com/qiskit-community/Quan
tum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.co
m/qiskit-community/Quantum-Challenge-Grader.git) (4.0.1)
Requirement already satisfied: Pillow>=4.2.1 in /opt/.qbraid/environments/
qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit[visualization]
~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/qiskit-commu
nity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://
github.com/qiskit-community/Quantum-Challenge-Grader.git) (11.3.0)
Requirement already satisfied: pylatexenc>=1.4 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit[visualizatio
n]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (2.10)
Requirement already satisfied: seaborn>=0.9.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit[visualizatio
n]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (0.13.2)
Requirement already satisfied: sympy>=1.3 in /opt/.qbraid/environments/qgs
s_000000/pyenv/lib/python3.11/site-packages (from qiskit[visualization]~=

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 6/28
09/07/2025, 13:01 lab0

2.1.0; extra == "qiskit"->qc-grader@ git+https://github.com/qiskit-communi


ty/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://gi
thub.com/qiskit-community/Quantum-Challenge-Grader.git) (1.14.0)
Requirement already satisfied: contourpy>=1.0.1 in /opt/.qbraid/environmen
ts/qgss_000000/pyenv/lib/python3.11/site-packages (from matplotlib>=3.3->q
iskit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,q
iskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it) (1.3.2)
Requirement already satisfied: cycler>=0.10 in /opt/.qbraid/environments/q
gss_000000/pyenv/lib/python3.11/site-packages (from matplotlib>=3.3->qiski
t[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.
com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from matplotlib>=3.3->
qiskit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://gi
thub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,
qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.
git) (4.58.5)
Requirement already satisfied: kiwisolver>=1.3.1 in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from matplotlib>=3.3->
qiskit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://gi
thub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,
qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.
git) (1.4.8)
Requirement already satisfied: packaging>=20.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from matplotlib>=3.3->qi
skit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://gith
ub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qi
skit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (25.0)
Requirement already satisfied: pyparsing>=2.3.1 in /opt/.qbraid/environmen
ts/qgss_000000/pyenv/lib/python3.11/site-packages (from matplotlib>=3.3->q
iskit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,q
iskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it) (3.2.3)
Requirement already satisfied: pandas>=1.2 in /opt/.qbraid/environments/qg
ss_000000/pyenv/lib/python3.11/site-packages (from seaborn>=0.9.0->qiskit
[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://github.c
om/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(2.3.0)
Requirement already satisfied: pytz>=2020.1 in /opt/.qbraid/environments/q
gss_000000/pyenv/lib/python3.11/site-packages (from pandas>=1.2->seaborn>=
0.9.0->qiskit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+htt
ps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[j
upyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-
Grader.git) (2025.2)
Requirement already satisfied: tzdata>=2022.7 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from pandas>=1.2->seabor
n>=0.9.0->qiskit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+
https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grade
r[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challen
ge-Grader.git) (2025.2)
Requirement already satisfied: pbr>=2.0.0 in /opt/.qbraid/environments/qgs
s_000000/pyenv/lib/python3.11/site-packages (from stevedore>=3.0.0->qiskit
~=2.1.0->qiskit[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+h

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 7/28
09/07/2025, 13:01 lab0

ttps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader
[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challeng
e-Grader.git) (6.1.1)
Requirement already satisfied: setuptools in /opt/.qbraid/environments/qgs
s_000000/pyenv/lib/python3.11/site-packages (from pbr>=2.0.0->stevedore>=
3.0.0->qiskit~=2.1.0->qiskit[visualization]~=2.1.0; extra == "qiskit"->qc-
grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Qua
ntum-Challenge-Grader.git) (65.5.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /opt/.qbraid/environm
ents/qgss_000000/pyenv/lib/python3.11/site-packages (from sympy>=1.3->qisk
it[visualization]~=2.1.0; extra == "qiskit"->qc-grader@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qis
kit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (1.3.0)
Requirement already satisfied: ipywidgets>=7.6.0 in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from ipycytoscape->qc-
grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Qua
ntum-Challenge-Grader.git) (8.1.7)
Requirement already satisfied: spectate>=1.0.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from ipycytoscape->qc-gr
ader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git
->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quant
um-Challenge-Grader.git) (1.0.1)
Requirement already satisfied: comm>=0.1.3 in /opt/.qbraid/environments/qg
ss_000000/pyenv/lib/python3.11/site-packages (from ipywidgets>=7.6.0->ipyc
ytoscape->qc-grader@ git+https://github.com/qiskit-community/Quantum-Chall
enge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-
community/Quantum-Challenge-Grader.git) (0.2.2)
Requirement already satisfied: ipython>=6.1.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from ipywidgets>=7.6.0->
ipycytoscape->qc-grader@ git+https://github.com/qiskit-community/Quantum-C
hallenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qis
kit-community/Quantum-Challenge-Grader.git) (9.4.0)
Requirement already satisfied: traitlets>=4.3.1 in /opt/.qbraid/environmen
ts/qgss_000000/pyenv/lib/python3.11/site-packages (from ipywidgets>=7.6.0-
>ipycytoscape->qc-grader@ git+https://github.com/qiskit-community/Quantum-
Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qi
skit-community/Quantum-Challenge-Grader.git) (5.14.3)
Requirement already satisfied: widgetsnbextension~=4.0.14 in /opt/.qbraid/
environments/qgss_000000/pyenv/lib/python3.11/site-packages (from ipywidge
ts>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (4.0.14)
Requirement already satisfied: jupyterlab_widgets~=3.0.15 in /opt/.qbraid/
environments/qgss_000000/pyenv/lib/python3.11/site-packages (from ipywidge
ts>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (3.0.15)
Requirement already satisfied: decorator in /opt/.qbraid/environments/qgss
_000000/pyenv/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidget
s>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (5.2.1)
Requirement already satisfied: ipython-pygments-lexers in /opt/.qbraid/env
ironments/qgss_000000/pyenv/lib/python3.11/site-packages (from ipython>=6.
1.0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qi
skit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ gi
t+https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (1.1.

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 8/28
09/07/2025, 13:01 lab0

1)
Requirement already satisfied: jedi>=0.16 in /opt/.qbraid/environments/qgs
s_000000/pyenv/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidge
ts>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (0.19.2)
Requirement already satisfied: matplotlib-inline in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from ipython>=6.1.0->i
pywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-c
ommunity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (0.1.7)
Requirement already satisfied: pexpect>4.3 in /opt/.qbraid/environments/qg
ss_000000/pyenv/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidg
ets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-communi
ty/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://gi
thub.com/qiskit-community/Quantum-Challenge-Grader.git) (4.9.0)
Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /opt/.qbra
id/environments/qgss_000000/pyenv/lib/python3.11/site-packages (from ipyth
on>=6.1.0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.
com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(3.0.51)
Requirement already satisfied: pygments>=2.4.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from ipython>=6.1.0->ipy
widgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (2.19.2)
Requirement already satisfied: stack_data in /opt/.qbraid/environments/qgs
s_000000/pyenv/lib/python3.11/site-packages (from ipython>=6.1.0->ipywidge
ts>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (0.6.3)
Requirement already satisfied: wcwidth in /opt/.qbraid/environments/qgss_0
00000/pyenv/lib/python3.11/site-packages (from prompt_toolkit<3.1.0,>=3.0.
41->ipython>=6.1.0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[ju
pyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-G
rader.git) (0.2.13)
Requirement already satisfied: parso<0.9.0,>=0.8.4 in /opt/.qbraid/environ
ments/qgss_000000/pyenv/lib/python3.11/site-packages (from jedi>=0.16->ipy
thon>=6.1.0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qis
kit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (0.8.4)
Requirement already satisfied: ptyprocess>=0.5 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from pexpect>4.3->ipytho
n>=6.1.0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.c
om/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(0.7.0)
Requirement already satisfied: debugpy>=1.6.5 in /opt/conda/lib/python3.1
1/site-packages (from ipykernel->qc-grader@ git+https://github.com/qiskit-
community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+htt
ps://github.com/qiskit-community/Quantum-Challenge-Grader.git) (1.8.1)
Requirement already satisfied: jupyter-client>=6.1.12 in /opt/conda/lib/py
thon3.11/site-packages (from ipykernel->qc-grader@ git+https://github.com/
qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (8.
6.1)
Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /opt/conda/li

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 9/28
09/07/2025, 13:01 lab0

b/python3.11/site-packages (from ipykernel->qc-grader@ git+https://github.


com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(5.7.2)
Requirement already satisfied: nest-asyncio in /opt/conda/lib/python3.11/s
ite-packages (from ipykernel->qc-grader@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (1.6.0)
Requirement already satisfied: psutil in /opt/.qbraid/environments/qgss_00
0000/pyenv/lib/python3.11/site-packages (from ipykernel->qc-grader@ git+ht
tps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader
[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challeng
e-Grader.git) (7.0.0)
Requirement already satisfied: pyzmq>=24 in /opt/conda/lib/python3.11/site
-packages (from ipykernel->qc-grader@ git+https://github.com/qiskit-commun
ity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://g
ithub.com/qiskit-community/Quantum-Challenge-Grader.git) (26.0.3)
Requirement already satisfied: tornado>=6.1 in /opt/conda/lib/python3.11/s
ite-packages (from ipykernel->qc-grader@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (6.4)
Requirement already satisfied: platformdirs>=2.5 in /opt/conda/lib/python
3.11/site-packages (from jupyter-core!=5.0.*,>=4.12->ipykernel->qc-grader@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-g
rader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Cha
llenge-Grader.git) (4.2.2)
Requirement already satisfied: async-lru>=1.0.0 in /opt/conda/lib/python3.
11/site-packages (from jupyterlab->qc-grader@ git+https://github.com/qiski
t-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+h
ttps://github.com/qiskit-community/Quantum-Challenge-Grader.git) (2.0.4)
Requirement already satisfied: httpx>=0.25.0 in /opt/conda/lib/python3.11/
site-packages (from jupyterlab->qc-grader@ git+https://github.com/qiskit-c
ommunity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (0.27.0)
Requirement already satisfied: jinja2>=3.0.3 in /opt/.qbraid/environments/
qgss_000000/pyenv/lib/python3.11/site-packages (from jupyterlab->qc-grader
@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc
-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-C
hallenge-Grader.git) (3.1.6)
Requirement already satisfied: jupyter-lsp>=2.0.0 in /opt/conda/lib/python
3.11/site-packages (from jupyterlab->qc-grader@ git+https://github.com/qis
kit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git
+https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (2.2.5)
Requirement already satisfied: jupyter-server<3,>=2.4.0 in /opt/conda/lib/
python3.11/site-packages (from jupyterlab->qc-grader@ git+https://github.c
om/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(2.14.0)
Requirement already satisfied: jupyterlab-server<3,>=2.27.1 in /opt/conda/
lib/python3.11/site-packages (from jupyterlab->qc-grader@ git+https://gith
ub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qi
skit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (2.27.1)
Requirement already satisfied: notebook-shim>=0.2 in /opt/conda/lib/python
3.11/site-packages (from jupyterlab->qc-grader@ git+https://github.com/qis
kit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git
+https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (0.2.4)
Requirement already satisfied: anyio>=3.1.0 in /opt/conda/lib/python3.11/s
ite-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git+ht
tps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 10/28
09/07/2025, 13:01 lab0

[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challeng
e-Grader.git) (4.3.0)
Requirement already satisfied: argon2-cffi>=21.1 in /opt/conda/lib/python
3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-g
rader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Cha
llenge-Grader.git) (23.1.0)
Requirement already satisfied: jupyter-events>=0.9.0 in /opt/conda/lib/pyt
hon3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grade
r@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->q
c-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-
Challenge-Grader.git) (0.10.0)
Requirement already satisfied: jupyter-server-terminals>=0.4.4 in /opt/con
da/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab
->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Gra
der.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git) (0.5.3)
Requirement already satisfied: nbconvert>=6.4.4 in /opt/conda/lib/python3.
11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ gi
t+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-gra
der[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Chall
enge-Grader.git) (7.16.4)
Requirement already satisfied: nbformat>=5.3.0 in /opt/conda/lib/python3.1
1/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git
+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grad
er[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challe
nge-Grader.git) (5.10.4)
Requirement already satisfied: overrides>=5.0 in /opt/conda/lib/python3.1
1/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git
+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grad
er[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challe
nge-Grader.git) (7.7.0)
Requirement already satisfied: prometheus-client>=0.9 in /opt/conda/lib/py
thon3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grad
er@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->
qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum
-Challenge-Grader.git) (0.20.0)
Requirement already satisfied: send2trash>=1.8.2 in /opt/conda/lib/python
3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-g
rader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Cha
llenge-Grader.git) (1.8.3)
Requirement already satisfied: terminado>=0.8.3 in /opt/conda/lib/python3.
11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ gi
t+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-gra
der[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Chall
enge-Grader.git) (0.18.1)
Requirement already satisfied: websocket-client>=1.7 in /opt/conda/lib/pyt
hon3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab->qc-grade
r@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->q
c-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-
Challenge-Grader.git) (1.8.0)
Requirement already satisfied: babel>=2.10 in /opt/conda/lib/python3.11/si
te-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab->qc-grader@ git
+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grad
er[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challe
nge-Grader.git) (2.14.0)
Requirement already satisfied: json5>=0.9.0 in /opt/conda/lib/python3.11/s
ite-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab->qc-grader@ gi
t+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-gra

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 11/28
09/07/2025, 13:01 lab0

der[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Chall
enge-Grader.git) (0.9.25)
Requirement already satisfied: jsonschema>=4.18.0 in /opt/conda/lib/python
3.11/site-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab->qc-grad
er@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->
qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum
-Challenge-Grader.git) (4.22.0)
Requirement already satisfied: sniffio>=1.1 in /opt/conda/lib/python3.11/s
ite-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab->qc-
grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Qua
ntum-Challenge-Grader.git) (1.3.1)
Requirement already satisfied: argon2-cffi-bindings in /opt/conda/lib/pyth
on3.11/site-packages (from argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->ju
pyterlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Chall
enge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-
community/Quantum-Challenge-Grader.git) (21.2.0)
Requirement already satisfied: httpcore==1.* in /opt/conda/lib/python3.11/
site-packages (from httpx>=0.25.0->jupyterlab->qc-grader@ git+https://gith
ub.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qi
skit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (1.0.5)
Requirement already satisfied: h11<0.15,>=0.13 in /opt/conda/lib/python3.1
1/site-packages (from httpcore==1.*->httpx>=0.25.0->jupyterlab->qc-grader@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-g
rader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Cha
llenge-Grader.git) (0.14.0)
Requirement already satisfied: MarkupSafe>=2.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from jinja2>=3.0.3->jupy
terlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challen
ge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-co
mmunity/Quantum-Challenge-Grader.git) (3.0.2)
Requirement already satisfied: attrs>=22.2.0 in /opt/conda/lib/python3.11/
site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupy
terlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challen
ge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-co
mmunity/Quantum-Challenge-Grader.git) (23.2.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /op
t/conda/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-
server<3,>=2.27.1->jupyterlab->qc-grader@ git+https://github.com/qiskit-co
mmunity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git) (2023.12.1)
Requirement already satisfied: referencing>=0.28.4 in /opt/conda/lib/pytho
n3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1
->jupyterlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-C
hallenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qis
kit-community/Quantum-Challenge-Grader.git) (0.35.1)
Requirement already satisfied: rpds-py>=0.7.1 in /opt/conda/lib/python3.1
1/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->ju
pyterlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Chall
enge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-
community/Quantum-Challenge-Grader.git) (0.18.1)
Requirement already satisfied: python-json-logger>=2.0.4 in /opt/conda/li
b/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>
=2.4.0->jupyterlab->qc-grader@ git+https://github.com/qiskit-community/Qua
ntum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.c
om/qiskit-community/Quantum-Challenge-Grader.git) (2.0.7)
Requirement already satisfied: pyyaml>=5.3 in /opt/conda/lib/python3.11/si
te-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyter
lab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 12/28
09/07/2025, 13:01 lab0

Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-commu
nity/Quantum-Challenge-Grader.git) (6.0.1)
Requirement already satisfied: rfc3339-validator in /opt/conda/lib/python
3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->
jupyterlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Cha
llenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiski
t-community/Quantum-Challenge-Grader.git) (0.1.4)
Requirement already satisfied: rfc3986-validator>=0.1.1 in /opt/conda/lib/
python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=
2.4.0->jupyterlab->qc-grader@ git+https://github.com/qiskit-community/Quan
tum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.co
m/qiskit-community/Quantum-Challenge-Grader.git) (0.1.1)
Requirement already satisfied: fqdn in /opt/conda/lib/python3.11/site-pack
ages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyt
er-server<3,>=2.4.0->jupyterlab->qc-grader@ git+https://github.com/qiskit-
community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+htt
ps://github.com/qiskit-community/Quantum-Challenge-Grader.git) (1.5.1)
Requirement already satisfied: isoduration in /opt/conda/lib/python3.11/si
te-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0
->jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git+https://github.com/
qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (20.
11.0)
Requirement already satisfied: jsonpointer>1.13 in /opt/conda/lib/python3.
11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=
0.9.0->jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qis
kit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (2.4)
Requirement already satisfied: uri-template in /opt/conda/lib/python3.11/s
ite-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.
0->jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git+https://github.co
m/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]
@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(1.3.0)
Requirement already satisfied: webcolors>=1.11 in /opt/conda/lib/python3.1
1/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=
0.9.0->jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qis
kit]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.gi
t) (1.13)
Requirement already satisfied: beautifulsoup4 in /opt/conda/lib/python3.1
1/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterl
ab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-G
rader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-commun
ity/Quantum-Challenge-Grader.git) (4.12.3)
Requirement already satisfied: bleach!=5.0.0 in /opt/conda/lib/python3.11/
site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab
->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Gra
der.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git) (6.1.0)
Requirement already satisfied: defusedxml in /opt/conda/lib/python3.11/sit
e-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab->q
c-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grade
r.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/
Quantum-Challenge-Grader.git) (0.7.1)
Requirement already satisfied: jupyterlab-pygments in /opt/conda/lib/pytho
n3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupy
terlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challen
ge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-co

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 13/28
09/07/2025, 13:01 lab0

mmunity/Quantum-Challenge-Grader.git) (0.3.0)
Requirement already satisfied: mistune<4,>=2.0.3 in /opt/conda/lib/python
3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyt
erlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challeng
e-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-com
munity/Quantum-Challenge-Grader.git) (3.0.2)
Requirement already satisfied: nbclient>=0.5.0 in /opt/conda/lib/python3.1
1/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterl
ab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-G
rader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-commun
ity/Quantum-Challenge-Grader.git) (0.10.0)
Requirement already satisfied: pandocfilters>=1.4.1 in /opt/conda/lib/pyth
on3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jup
yterlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challe
nge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-c
ommunity/Quantum-Challenge-Grader.git) (1.5.0)
Requirement already satisfied: tinycss2 in /opt/conda/lib/python3.11/site-
packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab->qc-
grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.g
it->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Qua
ntum-Challenge-Grader.git) (1.3.0)
Requirement already satisfied: webencodings in /opt/conda/lib/python3.11/s
ite-packages (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.
4.0->jupyterlab->qc-grader@ git+https://github.com/qiskit-community/Quantu
m-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/
qiskit-community/Quantum-Challenge-Grader.git) (0.5.1)
Requirement already satisfied: fastjsonschema>=2.15 in /opt/conda/lib/pyth
on3.11/site-packages (from nbformat>=5.3.0->jupyter-server<3,>=2.4.0->jupy
terlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challen
ge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-co
mmunity/Quantum-Challenge-Grader.git) (2.19.1)
Requirement already satisfied: cffi>=1.0.1 in /opt/.qbraid/environments/qg
ss_000000/pyenv/lib/python3.11/site-packages (from argon2-cffi-bindings->a
rgon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git+htt
ps://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[j
upyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-
Grader.git) (1.17.1)
Requirement already satisfied: pycparser in /opt/.qbraid/environments/qgss
_000000/pyenv/lib/python3.11/site-packages (from cffi>=1.0.1->argon2-cffi-
bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab->qc-grad
er@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->
qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum
-Challenge-Grader.git) (2.22)
Requirement already satisfied: soupsieve>1.2 in /opt/conda/lib/python3.11/
site-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=
2.4.0->jupyterlab->qc-grader@ git+https://github.com/qiskit-community/Quan
tum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.co
m/qiskit-community/Quantum-Challenge-Grader.git) (2.5)
Requirement already satisfied: arrow>=0.15.0 in /opt/conda/lib/python3.11/
site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyte
r-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab->qc-grader@ git+http
s://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[ju
pyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Challenge-G
rader.git) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /opt/cond
a/lib/python3.11/site-packages (from arrow>=0.15.0->isoduration->jsonschem
a[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0-
>jupyterlab->qc-grader@ git+https://github.com/qiskit-community/Quantum-Ch
allenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qisk
it-community/Quantum-Challenge-Grader.git) (2.9.0.20240316)

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 14/28
09/07/2025, 13:01 lab0

Requirement already satisfied: narwhals>=1.15.1 in /opt/.qbraid/environmen


ts/qgss_000000/pyenv/lib/python3.11/site-packages (from plotly->qc-grader@
git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git->qc-g
rader[jupyter,qiskit]@ git+https://github.com/qiskit-community/Quantum-Cha
llenge-Grader.git) (1.45.0)
Requirement already satisfied: requests-ntlm>=1.1.0 in /opt/.qbraid/enviro
nments/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit-ibm-run
time->qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge
-Grader.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-comm
unity/Quantum-Challenge-Grader.git) (1.3.0)
Requirement already satisfied: pydantic>=2.5.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from qiskit-ibm-runtime-
>qc-grader@ git+https://github.com/qiskit-community/Quantum-Challenge-Grad
er.git->qc-grader[jupyter,qiskit]@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git) (2.11.7)
Requirement already satisfied: annotated-types>=0.6.0 in /opt/.qbraid/envi
ronments/qgss_000000/pyenv/lib/python3.11/site-packages (from pydantic>=2.
5.0->qiskit-ibm-runtime->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (0.7.0)
Requirement already satisfied: pydantic-core==2.33.2 in /opt/.qbraid/envir
onments/qgss_000000/pyenv/lib/python3.11/site-packages (from pydantic>=2.
5.0->qiskit-ibm-runtime->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (2.33.2)
Requirement already satisfied: typing-inspection>=0.4.0 in /opt/.qbraid/en
vironments/qgss_000000/pyenv/lib/python3.11/site-packages (from pydantic>=
2.5.0->qiskit-ibm-runtime->qc-grader@ git+https://github.com/qiskit-commun
ity/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://g
ithub.com/qiskit-community/Quantum-Challenge-Grader.git) (0.4.1)
Requirement already satisfied: cryptography>=1.3 in /opt/.qbraid/environme
nts/qgss_000000/pyenv/lib/python3.11/site-packages (from requests-ntlm>=1.
1.0->qiskit-ibm-runtime->qc-grader@ git+https://github.com/qiskit-communit
y/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://git
hub.com/qiskit-community/Quantum-Challenge-Grader.git) (45.0.5)
Requirement already satisfied: pyspnego>=0.4.0 in /opt/.qbraid/environment
s/qgss_000000/pyenv/lib/python3.11/site-packages (from requests-ntlm>=1.1.
0->qiskit-ibm-runtime->qc-grader@ git+https://github.com/qiskit-community/
Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+https://githu
b.com/qiskit-community/Quantum-Challenge-Grader.git) (0.11.2)
Requirement already satisfied: executing>=1.2.0 in /opt/.qbraid/environmen
ts/qgss_000000/pyenv/lib/python3.11/site-packages (from stack_data->ipytho
n>=6.1.0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.c
om/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(2.2.0)
Requirement already satisfied: asttokens>=2.1.0 in /opt/.qbraid/environmen
ts/qgss_000000/pyenv/lib/python3.11/site-packages (from stack_data->ipytho
n>=6.1.0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.c
om/qiskit-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiski
t]@ git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git)
(3.0.0)
Requirement already satisfied: pure-eval in /opt/.qbraid/environments/qgss
_000000/pyenv/lib/python3.11/site-packages (from stack_data->ipython>=6.1.
0->ipywidgets>=7.6.0->ipycytoscape->qc-grader@ git+https://github.com/qisk
it-community/Quantum-Challenge-Grader.git->qc-grader[jupyter,qiskit]@ git+
https://github.com/qiskit-community/Quantum-Challenge-Grader.git) (0.2.3)
Note: you may need to restart the kernel to use updated packages.

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 15/28
09/07/2025, 13:01 lab0

In [3]: import qiskit


import qc_grader

print(f"Qiskit version: {qiskit.__version__}")


print(f"Grader version: {qc_grader.__version__}")

Qiskit version: 2.1.0


Grader version: 0.22.9

You should have Qiskit version >=2.0.0 and Grader >=0.22.9 . If you see a
lower version, you need to restart your kernel and reinstall the grader.

Troubleshooting
If the previous cell raised an error, you can opt to install Qiskit in a virtual
environment (two suggested methods follow). If you have no errors, you can ignore
this cell and proceed to the next one.

Here we propose two different methods to set up a virtual environment to install


Qiskit.

1. Using venv, as explained in the Qiskit installation guide.


2. Using conda, as explained in this video of Coding with Qiskit.

Set up your IBM Cloud account


You must set up an IBM Cloud account in order to track progress with the grader,
and to execute quantum circuits on real hardware.

Set up your account as follows:

1. Go to the upgraded IBM Quantum® Platform.


2. Go to the top right corner (as shown in the above picture), create your API
token, and copy it to a secure location.
3. In the next cell, replace deleteThisAndPasteYourAPIKeyHere with your
API key.
4. Go to the bottom left corner (as shown in the above picture) and create your
instance. Make sure to choose the open plan.
5. After the instance is created, copy its associated CRN code. You may need to
refresh to see the instance.

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 16/28
09/07/2025, 13:01 lab0

6. In the cell below, replace deleteThisAndPasteYourCRNHere with your CRN


code.

See this guide for more details on how to set up your IBM Cloud® account.

⚠️ Note: Treat your API key as you would a secure password. See the Cloud
setup guide for more information about using your API key in both secure and
untrusted environments.

In [7]: # Save your API key to track your progress and have access to the quantum

your_api_key = "E17dzCRPbOcoyp1F7XI5VuCunMSPSWxfbZRQ1614LgDB"
your_crn = "crn:v1:bluemix:public:quantum-computing:us-east:a/b644753467c

from qiskit_ibm_runtime import QiskitRuntimeService

QiskitRuntimeService.save_account(
channel="ibm_quantum_platform",
token=your_api_key,
instance=your_crn,
name="qgss-2025",
overwrite=True
)

In [8]: # Check that the account has been saved properly


service = QiskitRuntimeService(name="qgss-2025")
service.saved_accounts()

Out[8]: {'qgss-2025': {'channel': 'ibm_quantum_platform',


'url': 'https://cloud.ibm.com',
'token': 'E17dzCRPbOcoyp1F7XI5VuCunMSPSWxfbZRQ1614LgDB',
'instance': 'crn:v1:bluemix:public:quantum-computing:us-east:a/b644753
467c24439a96bff9d8af61481:0757ca38-3d3a-4409-a73b-9fce308c5888::',
'verify': True,
'private_endpoint': False}}

Imports
In [9]: import matplotlib.pyplot as plt

from qiskit import QuantumCircuit, generate_preset_pass_manager


from qiskit.visualization import plot_histogram
from qiskit.quantum_info import SparsePauliOp

from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 as Sampler

from qiskit_aer import AerSimulator

from qc_grader.challenges.qgss_2025 import grade_lab0_ex1, grade_lab0_ex2

Sanity check

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 17/28
09/07/2025, 13:01 lab0

Let's now create a very simple quantum circuit to check that everything is working
as expected.

In [10]: # Create a new circuit with a single qubit


qc = QuantumCircuit(2)
# Add a H gate to qubit 0
qc.h(0)
# Add a CNOT gate to qubit 1
qc.cx(0, 1)
# Return a drawing of the circuit using MatPlotLib ("mpl").
qc.draw("mpl")

Out[10]:

The output you see represents a quantum circuit that produces a Bell state:

$$|Bell\rangle=\frac{|00\rangle+|11\rangle}{\sqrt{2}}$$

Generate a three-qubit GHZ state using


Qiskit patterns
Now, we will follow this episode of Coding with Qiskit to guide you through the
process of generating a three-qubit GHZ state using Qiskit patterns.

A Qiskit pattern is a general framework for breaking down domain-specific


problems and contextualizing required capabilities in stages. This allows for the
seamless composability of new capabilities developed by IBM Quantum researchers
(and others) and enables a future in which quantum computing tasks are
performed by powerful heterogenous (CPU/GPU/QPU) computing infrastructure.

The four steps of a Qiskit pattern are as follows:

1. Map problem to quantum circuits and operators


2. Optimize for target hardware
3. Execute on target hardware
4. Post-process results

Step 1. Map
The Greenberger–Horne–Zeilinger (GHZ) state is the extension to three (or more)
qubits to the maximally entangled state characteristic of the Bell state depicted

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 18/28
09/07/2025, 13:01 lab0

above. That means that the GHZ state is:

$$ |GHZ\rangle = \frac{|000\rangle+|111\rangle}{\sqrt{2}}. $$

One of the interesting features of the GHZ state is that there are different and
equivalent ways to build it using a quantum circuit. In Exercise 1 you will do it in one
of the most common ways.

Exercise 1: Design a GHZ state

This is your first exercise of the Summer School! Exciting, huh?

In this exercise, you will design a GHZ state following the steps below:

1. Apply a Hadamard gate to qubit 0, putting it into a superposition.


2. Apply a CNOT gate between qubits 0 and 1.
3. Apply a CNOT gate between qubits 1 and 2.

In [11]: # Create a new circuit with three qubits


qc = QuantumCircuit(3)

### WRITE YOUR CODE BELOW HERE ###


# Add a H gate to qubit 0
qc.h(0)
# Add a CNOT gate to qubits 0 and 1
qc.cx(0, 1)
# Add a CNOT gate to qubits 1 and 2
qc.cx(1,2)
### YOUR CODE FINISHES HERE ###

# Return a drawing of the circuit using MatPlotLib ("mpl").


qc.draw("mpl")

Out[11]:

In [12]: # Submit your answer using following code


grade_lab0_ex1(qc)

🎉
Submitting your answer. Please wait...
Congratulations ! Your answer is correct and has been submitted.

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 19/28
09/07/2025, 13:01 lab0

Step 2. Optimize
Well done designing the circuit!

In this case, the circuit is very shallow, and it is not possible to further simplify it or
reduce the required number of gates that are needed to build the GHZ state.
However, there are other scenarios in which optimizing the circuit is key.

There may be situations where you face restrictions in how your quantum circuit
can be designed. For example, when running circuits on quantum hardware, you
might find connectivity constraints between qubits. This means that some qubits
may not be physically connected, so you will need to think of a smart way to
implement gates that produce the desired quantum state. Luckily for us, this is
where the Qiskit pass manager comes to the rescue! You can provide the desired
circuit along with the device's constraints to the pass manager and it will transpile
the circuit and handle the optimization for you.

Let us consider, for the GHZ state, a situation in which we are limited to interactions
only between qubits 0 and 1 and qubits 0 and 2, but not between qubits 1 and 2.
We can introduce these constraints to the paass manager using the
generate_preset_pass_manager function.

Exercise 2: Transpile a GHZ state

In this second exercise you are asked to transpile the previous GHZ state with
the mentioned connectivity constraints:

Qubit 0 <---> Qubit 1


Qubit 0 <---> Qubit 2
Qubit 1 <---> Qubit 2

In [13]: ### WRITE YOUR CODE BELOW HERE ###


# Write the coupling map of connections between qubits 0 and 1 and 0 and
coupling_map = [[0,1], [0,2]]
# Transpile the quantum circuit `qc` using the `generate_preset_pass_mana
pm = generate_preset_pass_manager()
### YOUR CODE FINISHES HERE ###
qc_transpiled = pm.run(qc)

qc_transpiled.draw("mpl")

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 20/28
09/07/2025, 13:01 lab0

Out[13]:

In [14]: # Submit your answer using following code


grade_lab0_ex2(qc_transpiled)

🎉
Submitting your answer. Please wait...
Congratulations ! Your answer is correct and has been submitted.

Step 3. Execute
The next step is exciting - we are going to run the quantum circuit using Qiskit
Runtime!

We will do that using the two Qiskit primitives:

1. Sampler samples the output register from the execution of one or more
quantum circuits. Its output is counts on per-shot measurements.
2. Estimator computes the expectation value of one or more observables with
respect to the states generated by the quantum circuit. Its output consist of the
expectation values along with their standard errors.

First, we execute our circuit using the Sampler, then save the results as the variable
results_sampler .

In [15]: # Add measurement operations


qc.measure_all()

# Set up the backend


backend = AerSimulator()

# Set up the sampler


sampler = Sampler(mode=backend)

# Submit the circuit to Sampler


pm = generate_preset_pass_manager(backend=backend, optimization_level=1)
job = sampler.run(pm.run([qc]))

# Get the results


results_sampler = job.result()

Now, we run our circuit using the Estimator primitive, then save the results as the
variable results_estimator .

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 21/28
09/07/2025, 13:01 lab0

In [16]: # Set up the Estimator


estimator = Estimator(mode=backend)

# Define some observables


ZZZ = SparsePauliOp("ZZZ")
ZZX = SparsePauliOp("ZZX")
ZII = SparsePauliOp("ZII")
XXI = SparsePauliOp("XXI")
ZZI = SparsePauliOp("ZZI")
III = SparsePauliOp("III")
observables = [ZZZ, ZZX, ZII, XXI, ZZI, III]

# Submit the circuit to Estimator


pub = (qc, observables)
job = estimator.run(pubs=[pub])

# Get the results


results_estimator = job.result()

Next is the final step of Qiskit patterns, where we will visualize our results.

Step 4. Post-process
Finally, the last step of Qiskit patterns is to post-process the information we have
gathered from the execution of the quantum circuit.

First we visualize the results from the Sampler. We can visualize the counts with a
histogram plot and quickly see how the two possible quantum states are measured
with a probability of 50%.

In [17]: counts_list = results_sampler[0].data.meas.get_counts()


print(f" Outcomes : {counts_list}")
display(plot_histogram(counts_list, title="GHZ state"))

Outcomes : {'111': 512, '000': 512}

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 22/28
09/07/2025, 13:01 lab0

Now we can visualize the results of the Estimator.

In [18]: exp_values = results_estimator[0].data.evs


observables_list = ["ZZZ", "ZZX", "ZII", "XXI", "ZZI", "III"]
print(f"Expectation values: {list(zip(observables_list, exp_values))}")

# Set up our plot


container = plt.bar(observables_list, exp_values, width=0.8)
# Label each axis
plt.xlabel("Observables")
plt.ylabel("Values")
plt.show()

Expectation values: [('ZZZ', np.float64(0.00244140625)), ('ZZX', np.float6


4(-0.0048828125)), ('ZII', np.float64(0.01123046875)), ('XXI', np.float64
(0.03466796875)), ('ZZI', np.float64(1.0)), ('III', np.float64(1.0))]

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 23/28
09/07/2025, 13:01 lab0

We see that the observables $ZZI$ and $III$ have an expectation value of 1, since
$ZZI$ introduces two minus signs that cancel out, and $III$ acts as the identity,
leaving the GHZ state unchanged. The rest of the observables have an expectation
value of 0, since their $Z$ operators introduce an odd number of minus signs, or
the $X$ operators flip a number of qubits that make the overlapping states
orthogonal.

Congratulations!
You have successfully completed Lab 0 and are now set to start the Quantum
Global Summer School 2025!

In this lab you have successfully set up your machine to execute Qiskit v2.x, and
saved your IBM Cloud token to track your progress during the Summer School and
execute quantum circuits in real hardware. You have also learned about Qiskit
patterns by implementing a specific example of the GHZ circuit and designing an
optimized quantum circuit. Finally, you have executed a GHZ circuit on a quantum
simulator, and observed how the measurements of the Sampler are in good
agreement with the theoretical probabilities of measuring the states $|000\rangle$
and $|111\rangle$ with 50% probability.

You can check your progress with the labs using the cell below:

In [19]: from qc_grader.grader.grade import check_lab_completion_status


check_lab_completion_status("qgss_2025")

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 24/28
09/07/2025, 13:01 lab0


Lab 0: 2/2 exercises completed (100%)
1428 participants have completed this lab


Lab 1: 9/9 exercises completed (100%)
536 participants have completed this lab


Lab 2: 0/7 exercises completed (0%)
1 participants have completed this lab


Lab 3: 0/5 exercises completed (0%)
0 participants have completed this lab


Lab 4: 0/6 exercises completed (0%)
0 participants have completed this lab

As a bonus exercise, it would be interesting to perform the same experiment on


real hardware to see how the noise affects the outcomes, then compare the results
to show that we will not have a perfect agreement between the theoretical
probabilities and the outcomes.

Are you ready? Let's dig in!

Bonus challenge: Run GHZ on hardware


To execute a quantum circuit on a quantum computer using Qiskit, we first need to
define the quantum backend. We could manually select a specific quantum
computer we want to use out of the ones available from IBM Quantum. However,
sometimes it is more convenient to select the machine that is least busy at the
moment to ensure a fast execution. That's where the method least_busy is
helpful.

In [26]: # Define the service. This allows you to access IBM QPUs.
service = QiskitRuntimeService(name="qgss-2025")

# Get a backend
backend = service.least_busy(operational=True, simulator=False)
print(f"We are using the {backend.name} quantum computer")

We are using the ibm_sherbrooke quantum computer

The next call illustrates how easy it is to execute quantum circuits on hardware with
QiskitRuntimeService . Once we have selected the backend in the cell above,
we can simply copy and paste the same lines of code that we wrote for the Sampler
simulator, including post-processing and visualization.

In [ ]: ### WRITE YOUR CODE BELOW HERE ###


# Step 1. Map
# You should have created a GHZ circuit above and assigned with variable

# Step 2. Optimize
pm =
qc_transpiled =

In [22]: from qiskit import QuantumCircuit

qc = QuantumCircuit(3, 3)
qc.h(0)
qc.cx(0, 1)

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 25/28
09/07/2025, 13:01 lab0

qc.cx(0, 2)
qc.measure([0, 1, 2], [0, 1, 2])

Out[22]: <qiskit.circuit.instructionset.InstructionSet at 0x7feb95b28f10>

In [23]: from qiskit import transpile

qc_transpiled = transpile(qc, backend=backend, optimization_level=3)

In [35]: import time


from qiskit import QuantumCircuit
# We no longer need transpile for this workflow
# from qiskit import transpile

# Import the new runtime components


from qiskit_ibm_runtime import QiskitRuntimeService, Sampler, Session, Op
from qiskit.visualization import plot_histogram

# Step 1: Connect to IBM Quantum


# This remains the same
service = QiskitRuntimeService(name="qgss-2025")
backend = service.least_busy(operational=True, simulator=False)
print(f"Using backend: {backend.name}")

# Step 2: Create GHZ Circuit


# This remains the same
qc = QuantumCircuit(3, 3)
qc.h(0)
qc.cx(0, 1)
qc.cx(0, 2)
qc.measure([0, 1, 2], [0, 1, 2])

# Step 3: Transpile (This is now handled by the Sampler primitive)


# We can remove this line: qc_transpiled = transpile(qc, backend=backend,

# Step 4 & 5: Submit Job and Wait for Completion (New Method)
# Define options, including the optimization level you had before
options = Options(optimization_level=3)

# Use a Session for better performance and job management


with Session(service=service, backend=backend) as session:
# Instantiate the Sampler
sampler = Sampler(session=session, options=options)

# Submit the job. Pass the original (untranspiled) circuit.


job = sampler.run(qc, shots=1024)
print(f"Job ID: {job.job_id()}")
print("Waiting for job to complete...")

# job.result() will block until the job is complete and get the resul
result = job.result()
print("Job finished!")

# Step 6: Get Results


# The result object is different now. We get a quasi-distribution.
if job.status().name == "DONE":
# The Sampler result contains quasi-distributions
quasi_dist = result.quasi_dists[0]

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 26/28
09/07/2025, 13:01 lab0

# For printing, we can convert it to a dictionary of probabilities


counts = quasi_dist.binary_probabilities()
print(f"Outcomes: {counts}")

# plot_histogram can directly plot the quasi_distribution


# We also update the title to use the actual backend name
plot_histogram(quasi_dist, title=f"GHZ State on {backend.name}")
else:
print(f"Job did not complete successfully: {job.status().name}")

Using backend: ibm_sherbrooke


--------------------------------------------------------------------------
-
ValidationError Traceback (most recent call las
t)
Cell In[35], line 29
22 qc.measure([0, 1, 2], [0, 1, 2])
24 # Step 3: Transpile (This is now handled by the Sampler primitive)
25 # We can remove this line: qc_transpiled = transpile(qc, backend=b
ackend, optimization_level=3)
26
27 # Step 4 & 5: Submit Job and Wait for Completion (New Method)
28 # Define options, including the optimization level you had before
---> 29 options = Options(optimization_level=3)
31 # Use a Session for better performance and job management
32 with Session(service=service, backend=backend) as session:
33 # Instantiate the Sampler

File /opt/.qbraid/environments/qgss_000000/pyenv/lib/python3.11/site-packa
ges/pydantic/_internal/_dataclasses.py:123, in complete_dataclass.<locals
>.__init__(__dataclass_self__, *args, **kwargs)
121 __tracebackhide__ = True
122 s = __dataclass_self__
--> 123 s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs),
self_instance=s)

ValidationError: 1 validation error for OptionsV2


optimization_level
Unexpected keyword argument [type=unexpected_keyword_argument, input_val
ue=3, input_type=int]
For further information visit https://errors.pydantic.dev/2.11/v/unexp
ected_keyword_argument

Warning: Queue time and 10 minute limit


This will roughly take 10s of calculation time on the real hardware, however,
running this on the real hardware can lead to long queue times and will take a
while, and will block the jupyter notebook in the meantime.

Please note that the open plan only includes 10 minutes time on the real
hardware, and since we will need these minutes in the later labs, please make
sure to save most of your time for these labs.

In [ ]: # Step 3. Execute
sampler =
job =

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 27/28
09/07/2025, 13:01 lab0

In [ ]: # Step 4. Post-process
results =
counts_list =
### YOUR CODE FINISHES HERE ###

print(f"Outcomes : {counts_list}")
plot_histogram(counts_list,title='GHZ state')

Awesome!

You have managed to run a circuit on a real quantum computer, and the results are
very good! The most repeated states are $|000\rangle$ and $|111\rangle$, and
they accumulate a probability just below 50%. However, in this case we observe
that, due to noise from the quantum computer, some quantum states are
measured, even if the theoretical probability of measuring is 0. This is indeed
expected, and we will see in the next labs how we can try to correct or mitigate the
errors that are introduced by the noisy nature of quantum computers.

Additional information
Created by: Jorge Martínez de Lejarza

Advised by: Marcel Pfaffhauser, Junye Huang

Version: 1.0.0

https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 28/28

You might also like