uniqc.benchmark.quantum_volume module¶
Reproducible Quantum Volume (QV) benchmark entry.
Implements the model-circuit definition and heavy-output criterion of Cross et al., “Validating quantum computers using randomized model circuits” (Phys. Rev. A 100, 032328, 2019):
A QV model circuit of width
mand depthmconsists ofmlayers; each layer applies a uniformly random qubit permutation followed by Haar-random SU(4) blocks on neighbouring pairs.Heavy outputs are the basis states whose ideal output probability exceeds the median of the full distribution.
One trial succeeds when the observed heavy-output frequency
hexceeds 2/3 with two-sigma confidence:h - 2*sqrt(h*(1-h)/shots) > 2/3.The run succeeds when the mean heavy-output frequency over all trials exceeds 2/3 with two-sigma confidence (
mean_h - 2*sqrt(mean_h*(1-mean_h)/(trials*shots)) > 2/3); on success the tested backend is credited withQV = 2**m.
SU(4) blocks are decomposed into the OriginIR native gates U3/CNOT
with the (exact, CNOT-optimal) two-qubit Weyl decomposition shipped with the
core qiskit dependency. Everything — model circuits, ideal probabilities,
and sampled shots — is derived from a single explicit seed, so a run is
bit-for-bit reproducible.
This module is a local software entry: it executes on the local simulator
stack (uniqc.Simulator / any dummy backend) and never submits cloud
tasks. Evidence gathered here certifies the software pipeline, not any real
quantum processor.
- class uniqc.benchmark.quantum_volume.QVRunResult(width, depth, trials, shots, base_seed, backend, mean_h, sigma_mean, trials_passed, passed, quantum_volume, trial_results)[source]¶
Bases:
objectAggregate result of a QV run over many trials at one width.
- backend¶
- base_seed¶
- depth¶
- mean_h¶
- passed¶
- quantum_volume¶
- shots¶
- sigma_mean¶
- trial_results¶
- trials¶
- trials_passed¶
- width¶
- class uniqc.benchmark.quantum_volume.QVTrialResult(trial, seed, width, shots, heavy_count, h_obs, sigma, passed)[source]¶
Bases:
objectOne QV trial (one model circuit executed once).
- h_obs¶
- heavy_count¶
- passed¶
- seed¶
- shots¶
- sigma¶
- trial¶
- width¶
- uniqc.benchmark.quantum_volume.build_qv_model_circuit(width, seed, *, depth=None)[source]¶
Build one seeded QV model circuit of the given width.
- Parameters:
width – Number of qubits
m(>= 1). The model-circuit depth defaults tomper the QV definition.seed – Base seed; per-trial circuits use
seed + trial_index.depth – Override the model depth (defaults to
width).
- Returns:
A
Circuitmeasuring all qubits in order (c[i]= qubiti).
- uniqc.benchmark.quantum_volume.heavy_outputs_from_probabilities(probabilities)[source]¶
Return the heavy-output set of an ideal outcome distribution.
Heavy outputs are the basis states with probability strictly above the median probability (Cross et al. 2019). With an even-length distribution the median is the average of the two central order statistics.
- uniqc.benchmark.quantum_volume.run_quantum_volume(*, width, trials, shots=1000, base_seed=0, backend='dummy:local:simulator')[source]¶
Run a seeded Quantum Volume benchmark at one width.
- Parameters:
width – Model-circuit width
m; on success the credited quantum volume is2**m.trials – Number of independent model circuits.
shots – Shots per circuit (default 1000, the acceptance configuration).
base_seed – Trial seeds are
base_seed + trial.backend – Local execution backend. Only
dummy:local:simulatoris accepted in this entry — cloud QV runs are out of scope here.
- Returns:
A
QVRunResultwith per-trial evidence and the aggregate pass/fail judgement.