Quantum × DevOps · a coldqubit project

shotgate

CI/CD quality gates for quantum circuits. Statistically validate probabilistic output, across simulators and real QPUs, defined entirely as code.

CIpodman releasev0.2.2 licenseApache-2.0 python3.10+ statusalpha
zsh · shotgate
$
How it works

Declare. Run. Gate.

workflow.yamlshotgate.dev/v1alpha1
apiVersion: shotgate.dev/v1alpha1
kind: QuantumWorkflow
metadata:
  name: bell-state
defaults:
  backend: { provider: local-aer, shots: 8192 }
jobs:
  - name: bell-pair
    circuit: { format: qasm2, path: bell.qasm }
    assertions:
      - type: chi_square  # χ² goodness-of-fit
        expected: { "00": 0.5, "11": 0.5 }
        significance: 0.01
      - type: allowed_states  # |01⟩,|10⟩ forbidden
        states: ["00", "11"]
        max_leakage: 0.0
01

Declare gates as YAML

Circuits, shots, and statistical assertions live in a QuantumWorkflow file, versioned next to your code.

02

Run in a container

podman pull and go: pinned dependencies, no host Python, identical locally and in CI.

03

Gate the pipeline

Verdicts map to exit codes; a failed assertion fails the build. JUnit XML output drops into any CI dashboard.

Assertion oracles

Statistics, not snapshots.

Quantum output is probabilistic; exact-match testing is meaningless. Each oracle bounds a distribution property instead.

δ

distribution_tvd

Total variation distance between observed and expected counts, bounded above. Interpretable and shot-count agnostic.

max_distance: 0.03
F

hellinger_fidelity

Classical fidelity between the observed and expected distributions, bounded below.

min_fidelity: 0.99
χ²

chi_square

Pearson goodness-of-fit against the expected distribution; gate on a p-value vs. your significance level.

significance: 0.01 · simulator-only

allowed_states

Probability mass observed outside the allowed support set; catches states that should never appear.

max_leakage: 0.0
P

state_probability

Marginal probability of one outcome, held inside a window. The simplest hardware-friendly gate.

min: 0.45 · max: 0.55
Backends

Simulators first. Hardware: validated.

v0.2 gates passed on a real QPU: Bell, GHZ, and Grover on ibm_fez at 4096 shots, 2026-06-11. The measured baseline lives in hardware-validation.

local-aerQiskit Aer simulator, baked into the image. Default, fully offline.WORKING
ibmIBM Quantum via Qiskit Runtime. Validated on real hardware: ibm_fez, Bell/GHZ/Grover at 4096 shots.VALIDATED
braketAWS Braket devices and simulators. Not selectable yet.PLANNED
mitiqError mitigation layer via Mitiq.PLANNED
Drop-in CI gating

One job. Three exit codes.

.github/workflows/quantum.ymlGitHub Actions
jobs:
  validate-circuits:
    runs-on: ubuntu-latest
    container: ghcr.io/coldqubit/shotgate:latest
    steps:
      - uses: actions/checkout@v4
      - run: shotgate run workflow.yaml --junit report.xml
0

All assertions passed. The pipeline proceeds.

1

A statistical gate failed. The build stops here.

2

Bad configuration or runtime error, fix the workflow, not the circuit.