PrePQC two-qubit QPU twin
This repository packages two quantum circuit programs and an exact, four-amplitude classical simulator. The QASM circuits ran as separate jobs on IBM ibm_fez on 2026-10-08. qpu_twin.py runs on an ordinary computer to compute ideal measurement probabilities and compare them with the public hardware counts. It has no trained weights and is not calibrated to ibm_fez; its ideal or optional synthetic-noise outputs do not predict that device's performance. It is not a quantum-resident agent or an ML-KEM attack.
| Component | Where it runs | Purpose |
|---|---|---|
circuits/grover2_mark_11.qasm |
Quantum processor when submitted as a job | Phase-mark 11, diffuse, measure |
circuits/grover2_no_mark_control.qasm |
Quantum processor when submitted as a job | Same preparation/diffusion without phase mark |
qpu_twin.py |
Classical computer | Exact ideal probabilities; optional synthetic noise and comparison |
The earlier hardware jobs used 256 shots each. The marked circuit measured 11 in 232/256 shots; the no-mark control measured 11 in 62/256 shots. The public job IDs and all four outcome counts are in examples/ibm-qpu-2026-10-08.json. The benchmark dataset contains the tidy tables and graphs.
Run the classical twin
Python 3.11+ standard library only; no credentials or network access:
python qpu_twin.py circuits/grover2_mark_11.qasm --observed examples/ibm-qpu-2026-10-08.json --condition mark_11
python qpu_twin.py circuits/grover2_no_mark_control.qasm --observed examples/ibm-qpu-2026-10-08.json --condition no_mark_control
The output includes the circuit SHA-256, gate counts, exact ideal probabilities, observed fractions, and total variation distance. An optional --noise JSON file can set a synthetic two-qubit depolarizing rate and per-bit readout error rates; it is not derived from ibm_fez calibration data. The parser intentionally accepts only a small, explicit OpenQASM 2 gate vocabulary: h, x, cz, and terminal measurements on two qubits.
Run the circuits on quantum hardware
Submit either .qasm file as a separate job through a quantum provider that supports its gate vocabulary. The QPU executes the circuit gates and returns measurement counts. The Python simulator, job coordination, any reasoning agent, and graph generation remain classical. Use the source project's hardware record to compare the first IBM run, and record new job IDs, shots, backend, and device settings for future runs.
Proposed richer measurement experiment
The two published jobs measured only in the computational (Z) basis, and their observed browser pages exposed aggregate counts. A later experiment could add X and Y basis measurements to estimate phase-sensitive expectations, retain per-shot bitstrings where the provider supports them, and compare those results with preregistered classical predictions and negative controls. This would expose more measured information than the current count chart; it would not grant direct access to an unmeasured quantum state. IBM documents Pauli-basis measurements and Sampler bitstring output. No such follow-up job or state reconstruction is included in this release.
Scope and limitations
- One hardware job per condition cannot estimate between-job drift or uncertainty across jobs.
- The control omits one
CZ, so gate count and hardware noise are not matched. - The observed workload pages did not provide final transpiled depth, physical-qubit mapping, two-qubit gate count, or per-shot bitstrings.
- This two-qubit Grover smoke test shows a functioning circuit and measurement workflow. It does not show quantum speedup, scalable search, a ring-LWE or ML-KEM oracle, or any production key recovery.
- The exact source files and SHA-256 hashes are listed in
manifest.json. The canonical development source is PrePQC Exploitation.
Citation
Cite this repository URL and exact Git revision for the circuit and simulator package. Cite the benchmark dataset separately for measured results.