Skip to content

Examples ​

Every example here is a real, executable program. Each one lives in the repository's examples/ directory, asserts its own results (mostly against Qiskit's reference simulator), and is run by the test suite, so what you see is what runs.

Run any of them from the repository root:

bash
.venv/bin/python examples/bell_state.py

Getting started ​

ExampleShows
Bell StateThe smallest useful circuit, through Qiskit
GHZ StateCounts and the exact statevector
CountsSeeds, reproducibility, partial measurement
StatevectorExact amplitudes, checked against Qiskit
Random CircuitsTranspiling arbitrary circuits for the backend
Large StatevectorA 20-qubit exact state

Observables ​

ExampleShows
Expectation ValueAn exact ⟨ZZ + 0.5 XX⟩
SparsePauliOpMany terms and arrays of observables
EstimatorV2Several pubs with bound parameters

Engines and planning ​

ExampleShows
Planner ExplanationReading a plan report
StabilizerA 60-qubit Clifford circuit
MPSA 100-qubit circuit no statevector could hold
Pauli PropagationAn expectation with no state
Advanced WorkloadExact circuit cutting
NoiseA Bell pair under a Qiskit Aer noise model, simulated exactly

Hardware and budgets ​

ExampleShows
CUDAWhich backend the planner chose
Time BudgetPlan-time refusals
ReplanningA run that overran its budget and was restarted

Which examples need what ​

All of them need only the default install plus Qiskit (the qiskit extra), except CUDA, which runs on any build and reports what it used, and Noise, which needs Qiskit Aer (the noise extra).

Released under the Apache-2.0 license. GitHub · PyPI