All examples run on statevector simulation — no IBM Quantum credentials needed.
Install first:
pip install -e ".[dev]"Domain-facing workflows with provenance boundaries and deterministic
artefact paths are promoted in docs/application_benchmarks.md. The
examples below remain no-credential entry points; the reusable research
logic lives in src/, scripts/, and committed JSON/CSV artefacts
rather than in untracked notebooks.
Recommended researcher quick path:
02_kuramoto_xy_demo.pyfor the Kuramoto-XY mapping.05_vqe_ansatz_comparison.pyfor topology-informed ansatz behaviour.09_classical_vs_quantum_benchmark.pyfor classical/statevector/Trotter comparisons.13_iter_disruption_demo.pyfor the plasma/tokamak benchmark boundary.18_end_to_end_pipeline.pyfor the packaged workflow path.19_sync_witness_operator.pyfor synchronisation observables.20_quantum_persistent_homology.pyfor topology diagnostics.22_quantum_neuromorphic_bridge.pyfor the QSNN LIF/STDP/dynamic-coupling bridge.23_differentiable_api_workflow.pyfor the unified differentiable API workflow.24_differentiable_benchmark_reproduction.pyfor local benchmark evidence reproduction.25_qrng_streaming_quickstart.pyfor QRNG stream-health checks.27_pqc_trigger_signer_demo.pyfor ML-DSA trigger signing.28_pulse_to_hls_quickstart.pyfor UltraScale+ pulse-code generation.29_kuramoto_handbook_workflow.pyfor the Phase 5 Kuramoto handbook path.30_diff_first_path.pyfor the canonical differentiable namespace path.31_qfi_fss_differentiable_report.pyfor bounded QFI/FSS finite-size evidence.
| Goal | Example |
|---|---|
| Understand the core physics | 02_kuramoto_xy_demo.py |
| Compare ansatze and optimisation behaviour | 05_vqe_ansatz_comparison.py |
| Inspect no-credential error mitigation | 06_zne_demo.py |
| Compare classical and quantum execution surfaces | 09_classical_vs_quantum_benchmark.py |
| Exercise a control-facing domain lane | 13_iter_disruption_demo.py |
| Run the full packaged workflow | 18_end_to_end_pipeline.py |
| Inspect synchronisation observables | 19_sync_witness_operator.py |
| Inspect topology diagnostics | 20_quantum_persistent_homology.py |
| Inspect differentiable API readiness | 23_differentiable_api_workflow.py |
| Reproduce differentiable benchmark evidence | 24_differentiable_benchmark_reproduction.py |
| Inspect QRNG stream readiness | 25_qrng_streaming_quickstart.py |
| Inspect post-quantum trigger signing | 27_pqc_trigger_signer_demo.py |
| Generate pulse HLS artefacts | 28_pulse_to_hls_quickstart.py |
| Run the Kuramoto handbook workflow | 29_kuramoto_handbook_workflow.py |
| Exercise the canonical differentiable namespace | 30_diff_first_path.py |
| Inspect QFI/FSS finite-size evidence | 31_qfi_fss_differentiable_report.py |
Examples are onboarding aids. Reusable production logic belongs in src/,
scripts, committed fixtures, and release gates.
Constructs a quantum leaky integrate-and-fire neuron that encodes membrane potential as an Ry rotation angle. Sweeps input current levels and compares the quantum spike rate (from Z-basis measurement) with the classical Bernoulli expectation sin^2(theta/2). Demonstrates the probability-to-angle bridge.
python examples/01_qlif_demo.pyBuilds a 4-oscillator XY Hamiltonian from the SCPN coupling matrix K_nm and evolves it via Trotter decomposition. Prints the order parameter R(t) at each timestep, showing how synchronization emerges from the coupling topology. This is the core quantum-classical mapping: classical Kuramoto ODE → quantum XY spin chain.
python examples/02_kuramoto_xy_demo.pyFormulates a 4-step binary coil control problem as an Ising Hamiltonian and solves it with QAOA (p=2 layers). Compares the QAOA-selected action sequence against brute-force enumeration. Demonstrates mapping a control optimization problem to a combinatorial quantum algorithm.
python examples/03_qaoa_mpc_demo.pyCreates a 3-place, 2-transition Petri net where tokens are encoded as qubit amplitudes and transitions fire via controlled rotations. Shows how superposition of markings enables parallel exploration of the reachability graph — relevant for modeling concurrent processes in control systems.
python examples/04_qpetri_demo.pyCompares three VQE ansatze on the 4-qubit Kuramoto Hamiltonian: the K_nm-informed ansatz (entanglement topology matches coupling graph), a generic hardware-efficient ansatz, and EfficientSU2. Reports energy, parameter count, and convergence iterations. The K_nm-informed ansatz converges fastest — this is the ansatz used in the 0.05% hardware result.
python examples/05_vqe_ansatz_comparison.pyDemonstrates error mitigation on a noisy Heron r2 simulator. Applies global unitary folding at scale factors [1, 3, 5] and uses Richardson extrapolation to estimate the zero-noise order parameter. Shows how ZNE can partially recover the ideal result from noisy circuit execution.
python examples/06_zne_demo.pyPrepares the K_nm ground state via VQE and evaluates the CHSH S-parameter for nearest-neighbour qubit pairs. Demonstrates entanglement certification using the coupling topology as shared secret.
python examples/07_crypto_bell_test.pyCompares the order parameter R with and without XY4 dynamical decoupling on a 4-qubit Kuramoto circuit under synthetic Heron r2 noise. Shows how DD pulse insertion partially recovers coherence on NISQ hardware.
python examples/08_dynamical_decoupling.pyBenchmarks classical Euler ODE, exact matrix-exponential evolution, and quantum Trotterized XY simulation at N=4, 8, 16. Reports wall-clock time, R(t) accuracy, and VQE ground-state energy vs exact diagonalization.
python examples/09_classical_vs_quantum_benchmark.pyEnd-to-end demo of all identity modules: VQE attractor basin, coherence budget, entanglement witness, spectral fingerprint, and binding spec.
python examples/10_identity_continuity_demo.pyProbabilistic error cancellation: quasi-probability coefficients and Monte Carlo sampling at varying gate error rates.
python examples/11_pec_demo.pySynthetic trapped-ion noise model with all-to-all connectivity. Transpiles and runs Kuramoto circuits under MS gate noise.
python examples/12_trapped_ion_demo.py11 physics-based ITER features, synthetic data generation, and quantum circuit classifier benchmark.
python examples/13_iter_disruption_demo.pyBuilds the field-reversed-configuration pulsed-shot QAOA cost with Magneto-Rayleigh-Taylor growth, dwell-time, and pulsed-field terms, then prints the bounded simulator-only claim boundary for the control-facing cost path.
python examples/14_frc_pulsed_shot_qaoa_demo.pyClassical vs quantum wall-clock timing with crossover extrapolation.
python examples/14_quantum_advantage_demo.pyParameter-shift gradient descent on QuantumDenseLayer synapse angles.
python examples/15_qsnn_training_demo.pyRepetition-code logical qubits with syndrome extraction at distance 3 and 5.
python examples/16_fault_tolerant_demo.pySNN adapter (spike trains → quantum → currents), SSGF adapter (geometry → Hamiltonian → roundtrip), and orchestrator phase mapping (18 ↔ 35).
python examples/17_snn_ssgf_bridges_demo.pyK_nm → VQE → Trotter evolution → ZNE → PEC → classical comparison. All 5 stages in one script.
python examples/18_end_to_end_pipeline.pyConstructs the quantum synchronisation witness operator and evaluates its expectation value across a coupling sweep. A negative witness value marks entry into the synchronised phase for the demonstrated threshold.
python examples/19_sync_witness_operator.pyGenerates simulated X/Y-basis measurement counts from Kuramoto--XY
statevectors and extracts persistent homology diagnostics for the
synchronisation transition. Requires ripser for the homology backend.
python examples/20_quantum_persistent_homology.pyMaps surface-code stabilisers and decoding weights onto the SCPN 16-layer coupling topology, then demonstrates a single-error syndrome and correction path on that graph.
python examples/21_biological_qec_scpn16.pyRuns the integrated QSNN bridge: vectorised quantum LIF neurons, trace-based STDP, and dynamic recurrent coupling driven by spike coactivity and quantum spike-probability coherence. The demo is simulator-only and prints the explicit claim boundary; it is a framework primitive, not empirical quantum-biology evidence by itself.
python examples/22_quantum_neuromorphic_bridge.pyRuns the complete no-credential differentiable tutorial path: a registered local Phase-QNode value and parameter-shift gradient, a fail-closed diagnostic report for an unsupported hardware route, bounded framework dependency rows, a compiler-AD report, and a tiny bounded phase-QNN training plus gradient verification. The workflow is functional simulator evidence, not a hardware or performance benchmark claim.
python examples/23_differentiable_api_workflow.pyWrites a temporary differentiable benchmark evidence bundle using the public
evidence writer and external-comparison rows, then prints the resulting
classification. Local runs are expected to classify as functional_non_isolated
and are not eligible for production performance claims. Promotion still requires
the self-hosted isolated-benchmark runner path documented in the benchmark
harness.
python examples/24_differentiable_benchmark_reproduction.pyRuns the deterministic QRNG stream harness and reports NIST-style online health statistics. The example is a simulator/fixture quickstart; hardware promotion requires the separate QRNG evidence ledger.
python examples/25_qrng_streaming_quickstart.pyGenerates the NV-centre ODMR calibration surface used by the 20 T magnetometry readiness lane and records the hardware-blocked calibration boundary.
python examples/26_nv_magnetometry_20T_demo.pySigns and verifies deterministic trigger payloads with the ML-DSA trigger signer interface, exercising the fail-closed message and key-shape contracts.
python examples/27_pqc_trigger_signer_demo.pyRenders a quantised pulse waveform into the UltraScale+ HLS C++/XDC artefact set and reports the fixed-point range used by the generated source.
python examples/28_pulse_to_hls_quickstart.pyRuns the deterministic six-oscillator Phase 5 handbook path through the public
scpn_quantum_control.kuramoto facade: RK4 integration, frequency-locking
diagnostics, stability spectrum, coherence clustering, Gaussian critical
coupling, and projected synchronising-coupling design. The output is stable
JSON for quick inspection and CI regression checks.
python examples/29_kuramoto_handbook_workflow.pyRuns the no-credential unified differentiable QFI/FSS report for small local Kuramoto-XY finite-size scans. The output exposes BKT and inverse-size fit diagnostics plus the claim boundary; it is not hardware, isolated-performance, or thermodynamic-limit evidence.
python examples/31_qfi_fss_differentiable_report.pyRuns the quantum neuromorphic bridge twice on the same deterministic spike
train — free-running versus with a persistent-H1
TopologicalDynamicCouplingPolicy projecting the recurrent weights every
few steps — and reports the H1 cycle count of both final coupling graphs.
Simulator demonstration only; no hardware or biological claims.
python examples/32_topology_controlled_qsnn.pyComputes the coupling-parameter QFI of a small XY ring by two independent routes — the exact spectral sum rule and four times the Fubini–Study metric from the quantum geometric tensor — and reports their agreement plus the (vanishing) Berry curvature. Exact-diagonalisation cross-check only; no hardware, scaling, or metrological-advantage claim.
python examples/33_qgt_qfi_crosscheck.pyRuns both confinement probes on one small SCPN coupling topology — the quantum ground-state Wilson-loop analysis and a Hybrid-Monte-Carlo-sampled compact U(1) lattice ensemble on the identical graph — and prints the two string tensions and lattice observables side by side. The routes probe different regimes; this is a joint report, not an equality assertion.
python examples/34_gauge_lattice_crosscheck.pyOptimises a latent vector parameterising the coupling geometry W(z)
against the quantum synchronisation cost 1 − R_global (statevector
Trotter evolution) and prints the synchronisation gain. Small-system
simulator demonstration; the production runner with a JSON artefact is
scripts/run_quantum_ssgf_descent.py.
python examples/35_quantum_ssgf_descent.py