dr.David
Rhodus
Chapter 1414 / 27

Reproducible Runs and Experiment Data

Operating Quantum Computers · 4 min read

An experiment record should let another reader reconstruct the claim without trusting the graph that first displayed it. For the Bell workload, that starts with measurement counts and their meaning. A floating-point score alone does not identify the basis, sample size, model, or stopping decision that produced it.

The lab stores four outcome counts for each of XX, YY, and ZZ in every incremental batch. It also records the cumulative checkpoint, context, and seeds. Its analysis history is derived from those observations. Recomputing that history is an important check because it compares the presented conclusion with the evidence that is supposed to support it.

Worked example: reconstruct the first observation

The first baseline batch in the captured simulator evidence contains:

Outcome XX YY ZZ
00 48 5 50
01 1 55 0
10 0 38 1
11 51 2 49

Each column sums to 100. Even parity contributes +1 and odd parity contributes −1. The XX correlation is therefore (48 + 51 − 1 − 0)/100 = 0.98. YY is (5 + 2 − 55 − 38)/100 = −0.86, and ZZ is 0.98. Substituting into (1 + XX − YY + ZZ)/4 gives the recorded score 0.955.

This calculation uses joint two-bit counts. Keeping only the separate frequencies of zero on each qubit would generally lose the correlation needed for the score. Conversely, these histograms do not preserve shot order. They cannot reveal whether all seven unfavorable YY outcomes occurred consecutively. The appropriate data representation depends on the analysis one intends to perform.

The stored histogram is sufficient for this independent-shot estimator and its declared stopping checks. A study of timing dependence would need ordered outcomes or other suitable temporal evidence. Adding a timestamp to the final score would not recover that missing information.

Preserve the experiment around the counts

The configuration identifies the model parameters, budget, initial seed, and operating context. Engine provenance identifies the implementation and relevant package versions. Contract artifact hashes identify the scenario and schema definitions. The implementation fingerprint covers the local execution code used by the lab. These records explain which procedure the counts are attributed to.

A seed makes the simulator's randomized procedure replayable within an appropriate implementation environment. It is not a universal identifier for a sample sequence across different random generators or software versions. The browser and Python implementations can agree on the measurement distribution while producing different individual outcomes. Statistical agreement and exact replay are separate checks.

The evidence integrity field hashes a canonical representation of the record, excluding the integrity field itself and the derived validation cache. This detects a change relative to that digest. An attacker who can replace both content and digest can create a new consistent pair, so the hash does not authenticate an author. Digital signatures and trusted key management would be additional mechanisms for a deployment that needs authenticated provenance.

Inspect before reusing

Use the identifier returned by a local run in place of RUN_ID:

Illustrative listing · bash
quantum-ops --db data-lab.sqlite3 inspect RUN_ID
quantum-ops --db data-lab.sqlite3 validate RUN_ID

Inspection retrieves the record. Validation checks its structure, integrity, configuration, batches, history, and disposition against the current artifacts. A successful validation says that this evidence satisfies those checks. It does not independently establish that the simulator accurately represents a particular physical device.

Archive the matching contract and implementation context with published results. If the current schema changes, an older record may require its original validator. Rewriting its hash to match a new schema would conceal the change instead of documenting a migration. Testing, Releases, and Compatibility develops that release boundary.

Exercise and worked answer

The second baseline XX batch contains 51 counts of 00, zero of 01, three of 10, and 46 of 11. Combine it with the first table. What is the cumulative XX correlation, and can the record establish that unfavorable outcomes were evenly spread in time?

Worked answer: The cumulative counts are 99, 1, 3, and 97. They total 200, and the correlation is (99 + 97 − 1 − 3)/200 = 0.96. The histogram cannot establish temporal spacing because it has discarded ordering. The correct conclusion is a reproducible aggregate correlation under the stated sampling assumptions. Investigating time dependence requires a different retained data product, not an inference from absent timestamps.

Related reference readings