QBraid Lab
QBraid Lab
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
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:
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
⚠️ 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
Now let's install the grader that will install Qiskit 2.x and the necessary libraries we
will need for the summer school.
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 3/28
09/07/2025, 13:01 lab0
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 4/28
09/07/2025, 13:01 lab0
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
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
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
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 15/28
09/07/2025, 13:01 lab0
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.
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 16/28
09/07/2025, 13:01 lab0
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
QiskitRuntimeService.save_account(
channel="ibm_quantum_platform",
token=your_api_key,
instance=your_crn,
name="qgss-2025",
overwrite=True
)
Imports
In [9]: import matplotlib.pyplot as plt
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.
Out[10]:
The output you see represents a quantum circuit that produces a Bell state:
$$|Bell\rangle=\frac{|00\rangle+|11\rangle}{\sqrt{2}}$$
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
$$ |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.
In this exercise, you will design a GHZ state following the steps below:
Out[11]:
🎉
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.
In this second exercise you are asked to transpile the previous GHZ state with
the mentioned connectivity constraints:
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]:
🎉
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!
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 .
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
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%.
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 22/28
09/07/2025, 13:01 lab0
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:
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
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")
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.
# Step 2. Optimize
pm =
qc_transpiled =
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])
# 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)
# job.result() will block until the job is complete and get the resul
result = job.result()
print("Job finished!")
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 26/28
09/07/2025, 13:01 lab0
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)
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
Version: 1.0.0
https://qgss2025.qbraid.com/user/[email protected]/lab/tree/qgss-2025/lab-0/lab0.ipynb 28/28