Quantum Challenge Grader
Grading client for the IBM Quantum Challenge grading service.
Requirements
- IBM Quantum Platform account
- Python 3.10 or later, with a Jupyter Notebook or JupyterLab environment
- Qiskit 2.x (installed automatically as a dependency)
Installation
Install the grading client into your Python environment:
pip install qc-grader
Authentication
The grader authenticates with your IBM Quantum Platform API key. You can provide it in either of two ways.
Option 1 — Save your account (recommended)
If you already use QiskitRuntimeService and have saved your account by
following the
setup instructions,
the grader reuses that saved account automatically — no extra configuration
needed.
To save your account:
from qiskit_ibm_runtime import QiskitRuntimeService
QiskitRuntimeService.save_account(
channel="ibm_quantum_platform",
token="<YOUR_API_KEY>",
set_as_default=True,
overwrite=True,
)
Your API key is available on your IBM Quantum Platform account page.
Option 2 — Set the QC_API_KEY environment variable
From a terminal, before launching Jupyter:
export QC_API_KEY=your_api_key
Alternatively, run this at the top of a notebook (re-run whenever you start/restart the kernel):
%set_env QC_API_KEY=your_api_key
Note: You can confirm the environment variable is set by running the following in a notebook cell:
import os print(os.getenv("QC_API_KEY"))
Usage
-
Open an exercise notebook for the challenge you are participating in.
-
Run the notebook cells, completing the exercises. Each exercise has a grading function that you import and call with your solution. Grading functions follow the pattern
grade_<module>_ex<n>and live underqc_grader.challenges.<challenge>. For example:from qc_grader.challenges.<challenge> import grade_<module>_ex1 grade_<module>_ex1(answer_1)
Replace
<challenge>with the challenge you are working on (e.g.fallfest_2026,qgss_2026), and<module>/ex<n>with the exercise you are submitting. The specific imports are given in each notebook. -
To review how many exercises you have completed so far, use the
check_progresshelper exposed by each challenge:from qc_grader.challenges.<challenge> import check_progress check_progress()
Contributing
See CONTRIBUTING.md for development setup (uv, just),
linting, tests, and the release process.
Metadata
Release files for qc-grader 2026.9.29
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qc_grader-2026.9.29.tar.gz | 144.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qc_grader-2026.9.29-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 210.6 kB
Release files / qc_grader-2026.9.29.tar.gz
| Download URL | qc_grader-2026.9.29.tar.gz |
|---|---|
| Size | 144.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f579a76c7bb94f0bddbd62f26aebfa0ae19bdd17571477acbbc1d7ba830ca7c
|
|
BLAKE2b-256 checksum How to use checksums |
829d3250e2f14c0cb5c419f6dc285c6ab4ed32f868c003f177ee16c255836934
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / qc_grader-2026.9.29-py3-none-any.whl
| Download URL | qc_grader-2026.9.29-py3-none-any.whl |
|---|---|
| Size | 65.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f06238df9e164f00ee022133f1a2f207f949557ceb60141d338da3fbb516e2e
|
|
BLAKE2b-256 checksum How to use checksums |
361b7e19dbf88a615edfc946ff00c6a7e97b9f7ab85c3ea88bfa70586faf5981
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log