diff --git a/.github/workflows/ahr-qpu-01r-recovery.yml b/.github/workflows/ahr-qpu-01r-recovery.yml new file mode 100644 index 00000000..7f9361e7 --- /dev/null +++ b/.github/workflows/ahr-qpu-01r-recovery.yml @@ -0,0 +1,42 @@ +name: AHR-QPU-01R recovered IBM Q2 source and receipt tests + +on: + pull_request: + paths: + - 'research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/**' + - 'research/arithmetic_holonomy_rotor/ibm_qpu_01/receipts/hardware_q2/**' + - '.github/workflows/ahr-qpu-01r-recovery.yml' + push: + branches: [main] + paths: + - 'research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/**' + - 'research/arithmetic_holonomy_rotor/ibm_qpu_01/receipts/hardware_q2/**' + - '.github/workflows/ahr-qpu-01r-recovery.yml' + +permissions: + contents: read + +jobs: + recovered-q2-offline: + runs-on: ubuntu-latest + timeout-minutes: 25 + defaults: + run: + working-directory: research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: pip + cache-dependency-path: research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/requirements.txt + - name: Install pinned original Q2 numerical and Qiskit requirements + run: python -m pip install -r requirements.txt + - name: Static syntax checks + run: python -m compileall -q . + - name: Original ten tests plus recovered hardware and authorization regressions + run: python -m pytest -q tests + - name: Recompute original Q2 analysis from immutable IBM hardware receipts + run: python offline_replay.py + - name: Independently replay counts and compiled/calibration integrity + run: python ../hardware_q2_replay.py diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/README.md b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/README.md new file mode 100644 index 00000000..4ddd6f47 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/README.md @@ -0,0 +1,46 @@ +# AHR-QPU-01R: recovery of the original IBM Q2 execution implementation + +**Status:** Draft integration of historical implementation from [MathCan PR #254](https://github.com/patrickdugan/MathCan/pull/254), pinned at commit `981b07b6d555b268ce0f28add39176bf3f39beb4`. Run offline tests before review. This directory is separate from the live simulator introduced by merged PR #255. + +The November 23 IBM Fez Q2 experiment succeeded on physical qubits 9 and 10, with 73,728 shots, signed forward and reverse phase estimates +38.90° / −42.86°, and 21 free QPU seconds charged. The **immutable evidence was already merged** in [PR #262](https://github.com/patrickdugan/MathCan/pull/262) at `../receipts/hardware_q2/`, along with an independent standard-library replay. + +This recovery preserves the original Q2 compiler, full statistical analysis, hardware submission preflight and interrupted-job collection logic. Source imports resolve within this directory; the newer simulator's modules and tests remain untouched. + +## Source provenance and modifications + +All recovered module blobs, the original ten protocol tests, and the historical public calibration fixture come from the pinned #254 commit. Their Git blob hashes remain unchanged **except `experiment.py`**, which has an added independent authorization gate. This is a recovery/replication package, not a replacement for the current QPU-01 simulator. + +## Offline reproduction + +Run from this directory with Python 3.12: + +```sh +python -m pip install -r requirements.txt +python -m pytest -q tests +python offline_replay.py +python ../hardware_q2_replay.py +python experiment.py simulate --out runs/local-reproduction +``` + +The archived hardware data are read from `../receipts/hardware_q2/`. The original project-local `receipts/calibration.json` is the captured input fixture used by the historical compiler and its tests. + +The first four commands perform local computation and read stored data. They never request an IBM hardware job or connect to the live IBM account. Simulation also stays local. + +## Recovery-specific cloud safeguards + +The original historical Q2 pilot authorization does **not** authorize a new execution. + +This recovery adds four independent submission requirements, in addition to the original verified Open Plan, current calibration, bounded resource estimate, physical layout, QPY and case-order checks: + +- Explicit `--confirm-free-qpu` operator action. +- `AHR_QPU_ALLOW_LIVE_SUBMISSION=YES`. +- `AHR_QPU_FREE_PLAN_VERIFIED=YES`. +- `AHR_QPU_LEGACY_RECOVERY_APPROVED=YES` and `AHR_QPU_APPROVED_MANIFEST_SHA256` equal to the exact planned `manifest.json` file SHA256. + +The entire recovered package remains HOLD for new cloud submission. Each future job requires separate approval of its exact manifest, present calibration, shot budget, and free allocation. Q3 stays simulation-only. + +## Verification gates + +Run the original 10 tests, the replay-equality check against stored `hardware_analysis.json`, explicit denial of unauthorized QPU submissions, and simulated interruption/recovery using a fake IBM service. The CI workflow installs the original versions recorded in `requirements.txt` and performs no cloud operations. + +This mathematical experiment establishes signed finite-dimensional magnetic holonomy under measured controls. It does not establish a quantum advantage, a new proof of RH, or machine consciousness. diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/circuit_synthesis.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/circuit_synthesis.py new file mode 100644 index 00000000..48b3bf6d --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/circuit_synthesis.py @@ -0,0 +1,247 @@ +"""Two-qubit synthesis and replayable calibration snapshots.""" + +from datetime import UTC, datetime +from importlib.metadata import version +from inspect import signature +from math import isfinite + +import numpy as np +from qiskit import ClassicalRegister, QuantumCircuit, QuantumRegister +from qiskit.circuit import Measure, Parameter +from qiskit.circuit.library import ( + CXGate, + CZGate, + ECRGate, + IGate, + PauliEvolutionGate, + RZGate, + SXGate, + XGate, +) +from qiskit.quantum_info import SparsePauliOp, Statevector +from qiskit.synthesis import SuzukiTrotter +from qiskit.transpiler import ( + InstructionProperties, + Target, + generate_preset_pass_manager, +) +from qiskit_aer import AerSimulator +from qiskit_aer.noise import NoiseModel +from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 +from qiskit_ibm_runtime.executor_sampler import Sampler +from scipy.linalg import expm + +from exact_oracle import harmonic, spectral_return +from hamiltonian import PRIMARY_TIME, square, square_paulis + +SEED = 314159 +P_TOL = 0.005 +Z_TOL = 0.005 +METHODS = ("exact", "suzuki_2", "suzuki_4", "suzuki_8") + + +def now(): + return datetime.now(UTC).isoformat(timespec="seconds") + + +def gate_dictionary(): + return { + "id": IGate(), "rz": RZGate(Parameter("a")), "sx": SXGate(), "x": XGate(), + "cz": CZGate(), "cx": CXGate(), "ecr": ECRGate(), "measure": Measure(), + } + + +def _calibrated(prop): + return prop is not None and prop.error is not None and isfinite(prop.error) and 0 <= prop.error < 1 + + +def capture(backend, *, account=None, live=False): + """Select an adjacent pair, reduce the ISA and NoiseModel, and redact account metadata.""" + target = backend.target + choices = [] + for name in ("cz", "ecr", "cx"): + if name not in target: + continue + for pair, properties in target[name].items(): + if pair is None or not _calibrated(properties): + continue + readout = [target["measure"].get((q,)) for q in pair] + if all(_calibrated(item) for item in readout): + choices.append((3*properties.error + sum(item.error for item in readout), pair, name)) + if not choices: + raise ValueError("no adjacent pair with native two-qubit and readout calibrations") + score, pair, native = min(choices) + instructions = [] + for operation in sorted(set(gate_dictionary()) & set(target.operation_names)): + for qargs, properties in target[operation].items(): + if qargs and set(qargs).issubset(pair): + instructions.append({ + "gate": operation, "physical": qargs, + "duration_s": None if properties is None else properties.duration, + "error": None if properties is None else properties.error, + }) + model = NoiseModel.from_backend(backend).to_dict(serializable=True) + selected = [] + for item in model["errors"]: + if "gate_qubits" not in item: + selected.append(item) + continue + local = [tuple(pair.index(q) for q in scope) for scope in item["gate_qubits"] if set(scope).issubset(pair)] + if local: + selected.append({**item, "gate_qubits": local}) + properties = backend.properties() + if SamplerV2 is not Sampler: + raise RuntimeError("requires the client-side SamplerV2 default from Runtime >=0.52") + return { + "target_type": "live_snapshot" if live else "archived_backend", + "captured_utc": now(), "backend": backend.name, "backend_width": backend.num_qubits, + "dt_s": target.dt, "physical_pair_xy": pair, "native_pair_interaction": native, "pair_score": score, + "calibration_id": getattr(backend, "calibration_id", None), + "calibration_timestamp": properties.last_update_date.isoformat() if properties else None, + "backend_version": backend.backend_version, "instructions": instructions, + "qubits": [ + {"physical": q, "t1_s": target.qubit_properties[q].t1, "t2_s": target.qubit_properties[q].t2, + "readout_error": target["measure"][(q,)].error} for q in pair + ], + "compact_noise_model": {"errors": selected}, "account": account, + "sdk": {"service": str(signature(QiskitRuntimeService)), "sampler_run": str(signature(SamplerV2.run)), + "implementation": SamplerV2.__module__}, + "versions": {name: version(name) for name in ("numpy", "scipy", "qiskit", "qiskit-aer", "qiskit-ibm-runtime")}, + } + + +def compact_target(snapshot): + pair = list(snapshot["physical_pair_xy"]) + target = Target(num_qubits=2, dt=snapshot["dt_s"]) + gates = gate_dictionary() + for gate in sorted({row["gate"] for row in snapshot["instructions"]}): + properties = { + tuple(pair.index(q) for q in row["physical"]): InstructionProperties( + duration=row["duration_s"], error=row["error"], + ) + for row in snapshot["instructions"] if row["gate"] == gate + } + target.add_instruction(gates[gate], properties, name=gate) + return target + + +def logical(case, method): + h = square(case.phase, case.energy, case.mask) + pauli = SparsePauliOp.from_list(square_paulis(case.phase, case.energy, case.mask)) + np.testing.assert_allclose(h, pauli.to_matrix(), atol=2e-13, rtol=0) + circuit = QuantumCircuit(2, name=case.id.replace(".", "p")) + circuit.metadata = {"case_id": case.id} + if method == "exact": + circuit.unitary(expm(-1j*case.time*h), [0, 1]) + else: + repetitions = int(method.rsplit("_", 1)[-1]) + formula = SuzukiTrotter(order=2, reps=repetitions, preserve_order=True) + circuit.append(PauliEvolutionGate(pauli, time=case.time, synthesis=formula), [0, 1]) + circuit.add_register(ClassicalRegister(2, "out")) + circuit.measure([0, 1], [0, 1]) + return circuit + + +def measurements(circuit): + mapping = { + circuit.find_bit(item.clbits[0]).index: circuit.find_bit(item.qubits[0]).index + for item in circuit.data if item.operation.name == "measure" + } + return mapping[0], mapping[1] + + +def metrics(circuit, target): + assert measurements(circuit) == (0, 1) + total = 0. + two = 0 + missing = set() + for item in circuit.data: + operation = item.operation.name + qargs = tuple(circuit.find_bit(bit).index for bit in item.qubits) + if not target.instruction_supported(operation_name=operation, qargs=qargs): + raise ValueError(f"Non-ISA instruction {operation} on {qargs}") + if len(qargs) == 2: + two += 1 + prop = target[operation].get(qargs) + if prop is not None and prop.duration is not None: + total += prop.duration + elif operation != "rz": + missing.add(operation) + return {"depth": circuit.depth(), "two_qubit_gates": two, "serial_duration_s": total, + "unknown_duration_gates": sorted(missing)} + + +def ideal_aer(circuits): + work = [] + for circuit in circuits: + bare = circuit.remove_final_measurements(inplace=False) + bare.save_probabilities([0, 1]) + work.append(bare) + simulator = AerSimulator(method="statevector", max_parallel_threads=2) + result = simulator.run(work, shots=1, seed_simulator=271828).result() + if not result.success: + raise RuntimeError("Aer ideal simulation failed") + return [float(result.data(i)["probabilities"][0]) for i in range(len(circuits))] + + +def grouped(cases, probabilities): + by_id = {} + for case, value in zip(cases, probabilities, strict=True): + key = f"{case.arm}_t{case.time:.1f}" + by_id.setdefault(key, [None] * 4)[case.quadrant] = value + return by_id + + +def benchmark(cases, snapshot): + target = compact_target(snapshot) + exact = [spectral_return(square(case.phase, case.energy, case.mask), case.time) for case in cases] + reference = grouped(cases, exact)[f"signal_t{PRIMARY_TIME:.1f}"] + suites, summary, predictions = {}, {}, {} + for method in METHODS: + manager = generate_preset_pass_manager( + optimization_level=3, target=target, initial_layout=[0, 1], routing_method="none", + seed_transpiler=SEED, approximation_degree=1.0, + ) + logicals = [logical(case, method) for case in cases] + compiled = manager.run(logicals, num_processes=1) + entries = [metrics(circuit, target) for circuit in compiled] + compiled_p = ideal_aer(compiled) + logical_p = [float(Statevector.from_instruction( + # Expand PauliEvolutionGate so Statevector uses the selected product formula. + circuit.remove_final_measurements(inplace=False).decompose(), + ).probabilities()[0]) for circuit in logicals] + np.testing.assert_allclose(compiled_p, logical_p, atol=8e-11, rtol=0) + error = max(abs(np.asarray(compiled_p)-exact)) + z_error = abs(harmonic(grouped(cases, compiled_p)[f"signal_t{PRIMARY_TIME:.1f}"])-harmonic(reference)) + summary[method] = { + "sum_depth": sum(row["depth"] for row in entries), + "max_depth": max(row["depth"] for row in entries), + "sum_two_qubit_gates": sum(row["two_qubit_gates"] for row in entries), + "max_absolute_probability_error": float(error), + "primary_absolute_harmonic_error": float(z_error), + "eligible": bool(error <= P_TOL and z_error <= Z_TOL), + } + suites[method] = compiled + predictions[method] = [ + {**case.record(), **entry, "p_exact": p, "p_uncompiled_statevector": sv, "p_compiled_ideal_aer": ia} + for case, entry, p, sv, ia in zip(cases, entries, exact, logical_p, compiled_p, strict=True) + ] + eligible = [method for method in METHODS if summary[method]["eligible"]] + if not eligible: + raise RuntimeError("no synthesis passed the fixed accuracy thresholds") + chosen = min(eligible, key=lambda method: tuple(summary[method][key] for key in ( + "sum_depth", "max_depth", "sum_two_qubit_gates", "max_absolute_probability_error", + ))) + return chosen, suites[chosen], summary, predictions + + +def embed(compact, snapshot): + physical = QuantumCircuit( + QuantumRegister(snapshot["backend_width"], "q"), ClassicalRegister(2, "out"), + name=compact.name, metadata=compact.metadata, + ) + pair = tuple(snapshot["physical_pair_xy"]) + physical.compose(compact, qubits=pair, clbits=[0, 1], inplace=True) + if measurements(physical) != pair: + raise ValueError("physical readout mapping is inconsistent with the snapshot") + return physical diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/exact_oracle.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/exact_oracle.py new file mode 100644 index 00000000..5d61d037 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/exact_oracle.py @@ -0,0 +1,124 @@ +"""Independent eigenvalue and exponential references for local return probabilities.""" + +from math import pi + +import numpy as np +from scipy.linalg import expm + +from hamiltonian import ( + ENERGIES, + FULL_MASK, + OFFSETS, + PLANTED_PHASE, + PRIMARY_TIME, + masks, + rephase, + square, +) + + +def spectral_return(h, time, site=0): + values, vectors = np.linalg.eigh(h) + return float(abs(np.vdot(abs(vectors[site])**2, np.exp(-1j*time*values)))**2) + + +def direct_square(phi, energies=ENERGIES, mask=FULL_MASK, j=1.0): + """Independent literal little-endian matrix, with AHR mask order.""" + a, b, c, d = energies + x, y, closing, top = [j * flag for flag in mask] + phase = closing * np.exp(1j * phi) + return np.array([[a, x, y, 0], [x, b, 0, phase.conjugate()], + [y, 0, c, top], [0, phase, top, d]], dtype=complex) + + +def direct_return(h, time, site=0): + return float(abs(expm(-1j*time*h)[site, site])**2) + + +def phase_scan(time, theta, offsets=OFFSETS, energies=ENERGIES, mask=FULL_MASK): + return np.array([spectral_return(square(theta+delta, energies, mask), time) for delta in offsets]) + + +def harmonic(probabilities): + values = np.asarray(probabilities) + n = values.shape[-1] + if n < 3: + raise ValueError("at least three equally spaced phase settings are required") + kernel = 2*np.exp(-2j*pi*np.arange(n)/n)/n + return values @ kernel + + +def cosine_coefficients(time, *, orders=12, n=256, energies=ENERGIES): + nodes = np.arange(n)*2*pi/n + coefficients = np.fft.fft(phase_scan(time, 0, nodes, energies)) / n + return coefficients[0].real, 2*coefficients[1:orders+1].real + + +def masked_probabilities(time, theta): + edge_masks = masks() + signs = np.array([(-1)**(4-sum(mask)) for mask in edge_masks]) + probabilities = np.stack([phase_scan(time, theta, mask=mask) for mask in edge_masks]) + return signs, probabilities + + +def wrap(phase): + return (phase + pi) % (2*pi) - pi + + +def audit_square(): + """Independent matrix, spectral, finite-difference and DFT checks.""" + maximum = dict.fromkeys(("direct_expm", "gauge_invariance", "tree_invariance", "masked_identity"), 0.0) + for angle in (0., 0.73, -0.73, pi/2, pi, 3*pi/2): + for time in (0.11, 0.8, 1.2, 1.6): + h = square(angle) + p = spectral_return(h, time) + maximum["direct_expm"] = max( + maximum["direct_expm"], abs(p-direct_return(direct_square(angle), time)), + ) + maximum["gauge_invariance"] = max(maximum["gauge_invariance"], abs( + p-direct_return(rephase(h, [0.57, -0.31, 0.24, -0.88]), time), + )) + for mask in masks()[:-1]: + maximum["tree_invariance"] = max(maximum["tree_invariance"], abs( + spectral_return(square(angle, mask=mask), 1.6)-direct_return(direct_square(0, mask=mask), 1.6), + )) + signs, probabilities = masked_probabilities(1.6, angle) + maximum["masked_identity"] = max(maximum["masked_identity"], abs( + harmonic(signs @ probabilities)-harmonic(phase_scan(1.6, angle)), + )) + assert max(maximum.values()) < 1e-12 + (_, amplitudes) = cosine_coefficients(PRIMARY_TIME) + np.testing.assert_allclose(amplitudes[:3], [-.255094, .039978, .000428], atol=8e-7, rtol=0) + theta = PLANTED_PHASE + probe = 0.31*np.cos(theta + OFFSETS) + 0.77*np.cos(2*(theta + OFFSETS)) + np.testing.assert_allclose(harmonic(probe), .31*np.exp(1j*theta), atol=1e-13, rtol=0) + thirds = .08*np.cos(3*(theta + OFFSETS)) + np.testing.assert_allclose(harmonic(thirds), .08*np.exp(-3j*theta), atol=1e-13, rtol=0) + raw = harmonic(phase_scan(PRIMARY_TIME, theta)) + reversed_ = harmonic(phase_scan(PRIMARY_TIME, -theta)) + np.testing.assert_allclose(reversed_, raw.conjugate(), atol=1e-13, rtol=0) + product = expm(-0.4j * direct_square(0, energies=(0, 0, 0, 0)))[:, 0] + gauge_copy = product * np.array([1, 1, 1, -1]) + concurrence = float(2*abs(np.linalg.det(gauge_copy.reshape(2, 2)))) + np.testing.assert_allclose(abs(product)**2, abs(gauge_copy)**2, atol=1e-13, rtol=0) + np.testing.assert_allclose(concurrence, np.sin(.8)**2, atol=1e-13, rtol=0) + return { + "maximum_discrepancies": maximum, "primary_first_three_cosine_harmonics": amplitudes[:3].tolist(), + "diagonal_gauge_concurrence_example": {"original": 0.0, "gauge_copy": concurrence}, + } + + +def aliasing(time, theta): + _, a = cosine_coefficients(time, orders=32) + target = a[0]*np.exp(1j*theta) + result = {"first_harmonic": [float(target.real), float(target.imag)]} + for n in (4, 8, 16, 64): + sampled = harmonic(phase_scan(time, theta, offsets=np.arange(n)*2*pi/n)) + remainder = sum(abs(value) for k, value in enumerate(a, 1) if k > 1 and k % n in (1, n-1)) + result[str(n)] = { + "harmonic": [float(sampled.real), float(sampled.imag)], + "alias_error": float(abs(sampled-target)), "alias_amplitude_bound": float(remainder), + "angular_bias_rad": float(wrap(np.angle(sampled/a[0])-theta)), + "angular_bound_rad": float(np.arcsin(remainder/abs(a[0]))) if remainder < abs(a[0]) else None, + } + return result diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/experiment.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/experiment.py new file mode 100644 index 00000000..525cb177 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/experiment.py @@ -0,0 +1,337 @@ +"""AHR-QPU-01 reproducible simulation, preparation and explicitly gated hardware CLI.""" + +import argparse +import csv +import hashlib +import json +import logging +import os +from math import ceil +from pathlib import Path +from uuid import uuid4 + +import numpy as np +from qiskit import qpy +from qiskit.exceptions import QiskitError +from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 +from qiskit_ibm_runtime.api.exceptions import RequestsApiError +from requests.exceptions import RequestException + +from circuit_synthesis import SEED, benchmark, capture, embed, grouped, now +from exact_oracle import aliasing, audit_square, harmonic +from hamiltonian import ( + ORDER_SEED, + PLANTED_PHASE, + PRIMARY_TIME, + REFERENCE_OFFSET, + TIMES, + pilot, +) +from noise_benchmark import benchmark_noise +from phase_estimator import ( + REPLICATES, + SYSTEMATIC_FLOOR, + acceptance, + complex_record, + estimate, + fisher, + shot_benchmark, +) +from phase_estimator import SEED as MC_SEED +from q3_curvature import run_q3 + +ROOT = Path(__file__).resolve().parent +SHOT_LEVELS = (2048, 8192) +PROTOCOL = "ahr-qpu-01" + + +class Hold(RuntimeError): + """A runtime condition did not pass the free-QPU gate.""" + + +def load(path): + return json.loads(path.read_text(encoding="utf-8")) + + +def write(path, value): + temp = path.with_suffix(path.suffix + ".tmp") + temp.write_text(json.dumps(value, indent=2, allow_nan=False)+"\n", encoding="utf-8", newline="\n") + temp.replace(path) + + +def digest(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def calibration_digest(path): + return hashlib.sha256(path.read_text(encoding="utf-8").encode("utf-8")).hexdigest() + + +def budget(rows, shots): + missing = sorted({gate for row in rows for gate in row["unknown_duration_gates"]}) + active = shots*sum(.0005 + row["serial_duration_s"] for row in rows) + return {"circuits": len(rows), "shots_per_circuit": shots, "shots_total": len(rows)*shots, + "serial_gate_measure_reset_allowance_s": active, "overhead_allowance_s": 60, + "required_free_qpu_seconds": ceil(active+60), "unknown_instruction_durations": missing} + + +def simulate(snapshot_path, out): + out.mkdir(parents=True, exist_ok=True) + snapshot = load(snapshot_path) + checks = audit_square() + q3 = run_q3() + cases = pilot() + chosen, compiled, costs, comparisons = benchmark(cases, snapshot) + noisy = benchmark_noise(compiled, snapshot) + exact = grouped(cases, [row["p_exact"] for row in comparisons[chosen]]) + ideal = grouped(cases, [row["p_compiled_ideal_aer"] for row in comparisons[chosen]]) + grouped_noise = {name: grouped(cases, values) for name, values in noisy.items()} + cycles = {} + for time in TIMES: + signal, reference = (f"{arm}_t{time:.1f}" for arm in ("signal", "reference")) + sources = {"compiled_ideal_aer": (ideal[signal], ideal[reference])} + sources.update({name: (values[signal], values[reference]) for name, values in grouped_noise.items()}) + primary_counts = np.rint(SHOT_LEVELS[0]*np.asarray(sources["calibrated_aer"][0])).astype(int) + primary_ref = np.rint(SHOT_LEVELS[0]*np.asarray(sources["calibrated_aer"][1])).astype(int) + cycles[f"t{time:.1f}"] = { + "exact_signal_Z": complex_record(harmonic(exact[signal])), + "exact_reference_Z": complex_record(harmonic(exact[reference])), + "calibrated_aer_signal_Z": complex_record(harmonic(sources["calibrated_aer"][0])), + "calibrated_aer_relative_phase_rad": float(np.angle( + harmonic(sources["calibrated_aer"][0])*harmonic(sources["calibrated_aer"][1]).conj(), + )), + "four_vs_eight_and_dense_aliasing": aliasing(time, PLANTED_PHASE+REFERENCE_OFFSET), + "planned_intervals_rounded_calibrated_counts": estimate(primary_counts, primary_ref, SHOT_LEVELS[0]), + "planned_acceptance_at_calibrated_means": acceptance( + primary_counts, SHOT_LEVELS[0], harmonic(exact[signal]), [values[signal] for values in grouped_noise.values()], + ), + "shot_monte_carlo": shot_benchmark(time, sources), + "conditional_fisher_bounds": [fisher(time, shots=shots) for shots in SHOT_LEVELS], + } + path = out / "q2_isa.qpy" + with path.open("wb") as handle: + qpy.dump([embed(circuit, snapshot) for circuit in compiled], handle) + input_snapshot = out / "calibration.json" + if snapshot_path.resolve() != input_snapshot.resolve(): + write(input_snapshot, snapshot) + outputs = out / "q2_cases.csv" + with outputs.open("w", newline="", encoding="utf-8") as stream: + writer = csv.writer(stream) + writer.writerow(["case_id", "arm", "time", "quadrant", "theta", "phase_programmed", + "exact", "compiled_aer_ideal", *noisy.keys()]) + for index, (case, row) in enumerate(zip(cases, comparisons[chosen], strict=True)): + writer.writerow([case.id, case.arm, case.time, case.quadrant, case.theta, case.phase, + row["p_exact"], row["p_compiled_ideal_aer"], *(values[index] for values in noisy.values())]) + manifest = { + "protocol": PROTOCOL, "prepared_utc": now(), "evidence": "simulation only", + "target_type": snapshot["target_type"], "backend": snapshot["backend"], + "physical_pair_xy": snapshot["physical_pair_xy"], "calibration_timestamp": snapshot["calibration_timestamp"], + "calibration_id": snapshot["calibration_id"], "calibration_sha256": calibration_digest(input_snapshot), + "qpy_sha256": digest(path), "selected_synthesis": chosen, "synthesis_bakeoff": costs, + "case_order": [case.id for case in cases], "cases": [case.record() for case in cases], + "primary": {"signal": f"signal_t{PRIMARY_TIME:.1f}", "reference": f"reference_t{PRIMARY_TIME:.1f}", + "per_setting_shots": SHOT_LEVELS[0], "systematic_floor_per_component": SYSTEMATIC_FLOOR}, + "seeds": {"transpiler": SEED, "case_order": ORDER_SEED, "monte_carlo": MC_SEED, "aer": 271828}, + "monte_carlo_replicates_per_configuration": REPLICATES, + "budget": {str(shots): budget(comparisons[chosen], shots) for shots in SHOT_LEVELS}, + } + write(out / "manifest.json", manifest) + write(out / "mathematical_audit.json", checks) + write(out / "q2_compilation.json", comparisons) + write(out / "q2_protocol.json", {"scans": {"exact": exact, "compiled_ideal": ideal, **grouped_noise}, + "phase_analysis": cycles}) + write(out / "q3_curvature.json", q3) + return manifest + + +def _credential(path): + if path: + text = path.read_text(encoding="utf-8-sig").strip() + if not text.startswith("{"): + return text + fields = json.loads(text) + key = fields.get("apikey") or fields.get("api_key") or fields.get("token") + if isinstance(key, str) and key: + return key + raise Hold("the key file must contain key text or IBM API-key JSON") + for variable in ("QISKIT_IBM_TOKEN", "IBM_QUANTUM_API_KEY"): + if token := os.getenv(variable): + return token + options = QiskitRuntimeService.saved_accounts(default=True, channel="ibm_quantum_platform") + if len(options) == 1: + return next(iter(options.values()))["token"] + raise Hold("no default IBM credential; use a supported environment variable or --token-file") + + +def live_service(path=None, instance=None): + token = _credential(path) + discovery = QiskitRuntimeService( + channel="ibm_quantum_platform", token=token, instance="auto", plans_preference=["open"], + ) + instances = [row for row in discovery.instances() if row.get("plan") == "open" + and row.get("pricing_type", "free") == "free" + and (instance is None or instance in (row["name"], row["crn"]))] + if len(instances) != 1: + raise Hold("select one existing verified Open Plan instance") + return QiskitRuntimeService(channel="ibm_quantum_platform", token=token, instance=instances[0]["crn"]) + + +def free_balance(service): + crn = service.active_instance() + if not crn or not any(row["crn"] == crn and row.get("plan") == "open" + and row.get("pricing_type", "free") == "free" for row in service.instances()): + raise Hold("active IBM instance is not verified as Open Plan") + usage = service.usage() + values = [usage.get("usage_remaining_seconds")] + if isinstance(usage.get("usage_remaining_ru"), (int, float)): + values.append(60 * usage["usage_remaining_ru"]) + values = [float(value) for value in values if isinstance(value, (int, float)) and np.isfinite(value)] + if not values: + raise Hold("IBM did not report remaining allocation") + remaining = 0 if usage.get("usage_limit_reached") else max(0, min(values)) + return {"plan": "open", "checked_utc": now(), "remaining_qpu_seconds": remaining} + + +def submission(service, out, shots, *, authorized=False): + if not authorized: + raise Hold("hardware submission requires separate approval and --confirm-free-qpu") + if any(os.environ.get(name) != "YES" for name in ( + "AHR_QPU_ALLOW_LIVE_SUBMISSION", + "AHR_QPU_FREE_PLAN_VERIFIED", + "AHR_QPU_LEGACY_RECOVERY_APPROVED", + )): + raise Hold("recovered Q2 submission requires separate approval and all three explicit YES guards") + expected_manifest_hash = os.environ.get("AHR_QPU_APPROVED_MANIFEST_SHA256", "") + if not expected_manifest_hash or expected_manifest_hash != digest(out / "manifest.json"): + raise Hold("recovered Q2 submission requires approval bound to the exact manifest SHA256") + manifest = load(out / "manifest.json") + if manifest["target_type"] != "live_snapshot" or shots not in SHOT_LEVELS: + raise Hold("a live calibration and a prespecified shot level are required") + snapshot, qpy_path = out / "calibration.json", out / "q2_isa.qpy" + if (manifest["calibration_sha256"] not in (calibration_digest(snapshot), digest(snapshot)) + or digest(qpy_path) != manifest["qpy_sha256"]): + raise Hold("simulation or ISA receipt integrity check failed") + estimate = manifest["budget"][str(shots)] + account = free_balance(service) + if estimate["unknown_instruction_durations"] or account["remaining_qpu_seconds"] < estimate["required_free_qpu_seconds"]: + raise Hold("insufficient verified free time or incomplete gate timing") + backend = service.backend(manifest["backend"], instance=service.active_instance()) + props = backend.properties() + if not backend.status().operational or backend.configuration().simulator or not props: + raise Hold("the prepared backend is no longer an operational QPU") + if props.last_update_date.isoformat() != manifest["calibration_timestamp"]: + raise Hold("capture a fresh calibration and regenerate simulations before submitting") + if getattr(backend, "calibration_id", None) != manifest["calibration_id"]: + raise Hold("backend calibration ID has changed") + with qpy_path.open("rb") as stream: + circuits = qpy.load(stream) + if [c.metadata["case_id"] for c in circuits] != manifest["case_order"]: + raise Hold("the proposed IBM circuit order differs from the registered workload") + tag = f"ahr-qpu-01-{uuid4().hex[:16]}" + cap = estimate["required_free_qpu_seconds"] + sampler = SamplerV2(mode=backend, options={ + "max_execution_time": cap, "environment": {"job_tags": [tag]}, + "twirling": {"enable_gates": False, "enable_measure": False}, + "dynamical_decoupling": {"enable": False}, + }) + checkpoint = out / "hardware_job.json" + record = {"tag": tag, "job_id": None, "submitted_utc": now(), "backend": backend.name, + "shots_per_circuit": shots, "free_balance_checked": account, "max_execution_time_s": cap} + with checkpoint.open("x", encoding="utf-8") as stream: + json.dump(record, stream, indent=2) + record["job_id"] = sampler.run(circuits, shots=shots).job_id() + write(checkpoint, record) + return record + + +def collect(service, out): + free_balance(service) + record = load(out / "hardware_job.json") + if record["job_id"] is None: + matches = service.jobs(job_tags=[record["tag"]], instance=service.active_instance(), limit=2) + if len(matches) != 1: + raise Hold("use the recorded job tag in IBM Workloads to resolve submission status") + record["job_id"] = matches[0].job_id() + write(out / "hardware_job.json", record) + job = service.job(record["job_id"]) + status = job.status() + if status != "DONE": + return {"job_id": record["job_id"], "status": status} + manifest = load(out / "manifest.json") + result = job.result() + counts = {key: pub.data.out.get_counts() for key, pub in zip(manifest["case_order"], result, strict=True)} + shots = record["shots_per_circuit"] + if any(sum(values.values()) != shots or set(values).difference({"00", "01", "10", "11"}) + for values in counts.values()): + raise Hold("IBM counts do not match the registered shot and outcome space") + measured = {} + for case in manifest["cases"]: + key = f'{case["arm"]}_t{case["time"]:.1f}' + measured.setdefault(key, [None]*4)[case["quadrant"]] = counts[case["id"]].get("00", 0) + references = load(out / "q2_protocol.json")["scans"] + primary = manifest["primary"] + signal, ref = primary["signal"], primary["reference"] + data = { + **record, "status": "DONE", "counts_source": "IBM Quantum hardware", "retrieved_utc": now(), + "qpu_seconds": job.usage(), "counts": counts, + "primary_phase": estimate(measured[signal], measured[ref], shots), + "primary_acceptance": acceptance( + measured[signal], shots, harmonic(references["exact"][signal]), + [rows[signal] for name, rows in references.items() if name not in {"exact", "compiled_ideal"}], + ), + } + write(out / "hardware_counts.json", data) + return data + + +def main(argv=None): + parser = argparse.ArgumentParser(prog="experiment.py") + commands = parser.add_subparsers(dest="command", required=True) + simulation = commands.add_parser("simulate") + simulation.add_argument("--snapshot", type=Path, default=ROOT / "receipts/calibration.json") + simulation.add_argument("--out", type=Path, required=True) + calibration = commands.add_parser("capture") + calibration.add_argument("--output", type=Path, required=True) + calibration.add_argument("--backend") + submit = commands.add_parser("submit") + submit.add_argument("--out", type=Path, required=True) + submit.add_argument("--shots", type=int, choices=SHOT_LEVELS, default=SHOT_LEVELS[0]) + submit.add_argument("--confirm-free-qpu", action="store_true", required=True) + retrieve = commands.add_parser("collect") + retrieve.add_argument("--out", type=Path, required=True) + for command in (calibration, submit, retrieve): + command.add_argument("--token-file", type=Path) + command.add_argument("--instance") + args = parser.parse_args(argv) + if args.command == "simulate": + result = simulate(args.snapshot, args.out) + print(json.dumps({"selected": result["selected_synthesis"], "budget": result["budget"]}, indent=2)) + return 0 + logging.getLogger("qiskit_ibm_runtime").setLevel(logging.CRITICAL) + try: + service = live_service(args.token_file, args.instance) + if args.command == "capture": + account = free_balance(service) + backend = (service.backend(args.backend, instance=service.active_instance()) if args.backend + else service.least_busy(instance=service.active_instance(), operational=True, simulator=False)) + if not backend.status().operational or backend.configuration().simulator: + raise Hold("snapshot must use an operational QPU") + result = capture(backend, account=account, live=True) + write(args.output, result) + result = {"backend": result["backend"], "physical_pair_xy": result["physical_pair_xy"], "account": account} + elif args.command == "submit": + result = submission(service, args.out, args.shots, authorized=args.confirm_free_qpu) + else: + result = collect(service, args.out) + except Hold as exc: + print(f"HOLD: {exc}") + return 2 + except (QiskitError, RequestsApiError, RequestException, OSError, ValueError) as exc: + print(f"HOLD: IBM operation failed ({type(exc).__name__})") + return 2 + print(json.dumps(result, indent=2)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/hamiltonian.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/hamiltonian.py new file mode 100644 index 00000000..c9594e15 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/hamiltonian.py @@ -0,0 +1,98 @@ +"""AHR-QPU-01 square, endianness and protocol fixtures.""" + +from dataclasses import asdict, dataclass +from itertools import product +from math import pi + +import numpy as np + +PRIMES = (2, 3) +ENERGIES = (0.0, np.log(2), np.log(3), np.log(6)) +GENERIC_MATCH = (0.0, np.log(6), np.log(3), np.log(2)) +EDGES = ((0, 1), (0, 2), (1, 3), (2, 3)) +CLOSING = (1, 3) +FULL_MASK = (True,) * 4 +TREE_MASK = (True, True, True, False) +OFFSETS = np.arange(4) * pi/2 +TIMES = (0.8, 1.2, 1.6) +PRIMARY_TIME = 1.6 +PLANTED_PHASE = 0.73 +REFERENCE_OFFSET = 0.19 +ORDER_SEED = 144739 + + +@dataclass(frozen=True) +class Case: + arm: str + time: float + quadrant: int + theta: float + energy: tuple = ENERGIES + mask: tuple = FULL_MASK + reference_offset: float = REFERENCE_OFFSET + + @property + def phase(self): + return float(self.theta + self.reference_offset + OFFSETS[self.quadrant]) + + @property + def id(self): + return f"{self.arm}_t{self.time:.1f}_q{self.quadrant}" + + def record(self): + return {"id": self.id, **asdict(self), "programmed_phase": self.phase} + + +def pilot(): + cases = [Case(arm, time, q, theta) for time in TIMES + for arm, theta in (("reference", 0), ("signal", PLANTED_PHASE)) for q in range(4)] + cases += [Case(arm, PRIMARY_TIME, q, theta, energies, mask) for arm, theta, energies, mask in ( + ("reversed", -PLANTED_PHASE, ENERGIES, FULL_MASK), + ("tree", PLANTED_PHASE, ENERGIES, TREE_MASK), + ("matched_detuning", PLANTED_PHASE, GENERIC_MATCH, FULL_MASK), + ) for q in range(4)] + indices = np.random.default_rng(ORDER_SEED).permutation(len(cases)) + return [cases[index] for index in indices] + + +def square(phi, energies=ENERGIES, mask=FULL_MASK, j=1.0): + """H[dest, source] is positive-phase hopping along (1,3).""" + h = np.diag(energies).astype(complex) + for edge, active in zip(EDGES, mask, strict=True): + if active: + low, high = edge + value = j * np.exp(1j * phi) if edge == CLOSING else j + h[high, low], h[low, high] = value, np.conj(value) + return h + + +def square_paulis(phi, energies=ENERGIES, mask=FULL_MASK, j=1.0): + """Direct projector expansion. The left Pauli character acts on q1=y.""" + a, b, c, d = energies + coefficients = { + "II": (a+b+c+d)/4, "IZ": (a-b+c-d)/4, + "ZI": (a+b-c-d)/4, "ZZ": (a-b-c+d)/4, + } + for (low, high), active in zip(EDGES, mask, strict=True): + if not active: + continue + axis = (high ^ low).bit_length() - 1 + control = 1 - axis + angle = phi if (low, high) == CLOSING else 0.0 + for axis_pauli, strength in (("X", j*np.cos(angle)), ("Y", j*np.sin(angle))): + for projector in ("I", "Z"): + label = ["I", "I"] + label[1-axis], label[1-control] = axis_pauli, projector + sign = -1 if projector == "Z" and (low >> control) & 1 else 1 + key = "".join(label) + coefficients[key] = coefficients.get(key, 0.0) + strength*sign/2 + return [(label, float(value)) for label, value in coefficients.items() if abs(value) > 1e-15] + + +def masks(): + return tuple(product((False, True), repeat=4)) + + +def rephase(h, vertex_angles): + phase = np.exp(1j * np.asarray(vertex_angles)) + return phase[:, None] * h * phase.conj()[None, :] diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/hardware_analysis.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/hardware_analysis.py new file mode 100644 index 00000000..b2863fbe --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/hardware_analysis.py @@ -0,0 +1,80 @@ +"""Reproduce the hardware-only analysis from archived counts and simulations.""" + +import argparse +from pathlib import Path + +import numpy as np + +from exact_oracle import harmonic +from experiment import load, write +from phase_estimator import acceptance, complex_record, estimate, rectangle + + +def summarize(manifest, scans, hardware): + counts = hardware["counts"] + shots = hardware["shots_per_circuit"] + if len(manifest["case_order"]) != 36 or len(set(manifest["case_order"])) != 36 or shots != 2048: + raise ValueError("the approved hardware workload requires 36 cases at 2,048 shots") + if set(counts) != set(manifest["case_order"]): + raise ValueError("hardware cases differ from the registered workload") + if any(set(values).difference({"00", "01", "10", "11"}) or sum(values.values()) != shots + for values in counts.values()): + raise ValueError("hardware outcome labels or shots do not match the plan") + groups = {} + for case in manifest["cases"]: + name = f'{case["arm"]}_t{case["time"]:.1f}' + groups.setdefault(name, [None]*4)[case["quadrant"]] = counts[case["id"]].get("00", 0) + if any(None in values for values in groups.values()): + raise ValueError("a four-offset group is incomplete") + + details = {} + for name, values in sorted(groups.items()): + probabilities = np.asarray(values)/shots + results = { + "counts_00": values, "observed_probabilities": probabilities.tolist(), + "exact_probabilities": scans["exact"][name], + "calibrated_aer_probabilities": scans["calibrated_aer"][name], + "observed_harmonic": complex_record(harmonic(probabilities)), + "exact_harmonic": complex_record(harmonic(scans["exact"][name])), + "calibrated_aer_harmonic": complex_record(harmonic(scans["calibrated_aer"][name])), + "raw_joint_95_rectangle": rectangle(values, shots), + } + if name.startswith(("signal_", "reversed_")): + reference = groups["reference_"+name.rsplit("_", 1)[1]] + results["reference_calibrated_phase"] = estimate(values, reference, shots) + details[name] = results + primary = manifest["primary"]["signal"] + result = acceptance( + groups[primary], shots, harmonic(scans["exact"][primary]), + [rows[primary] for name, rows in scans.items() if name not in {"exact", "compiled_ideal"}], + ) + saved = hardware.get("primary_acceptance") + if saved is not None and saved != result: + raise ValueError("recomputed acceptance differs from the collected result") + tree = next(row for name, row in details.items() if name.startswith("tree_")) + tree_rectangle = tree["raw_joint_95_rectangle"] + return { + "job_id": hardware["job_id"], "counts_source": "IBM Quantum hardware", + "shots_per_circuit": shots, "shots_total": len(counts)*shots, + "primary_group": primary, "primary_acceptance": result, "four_phase_groups": details, + "tree_rectangle_contains_origin": all( + tree_rectangle[axis][0] <= 0 <= tree_rectangle[axis][1] for axis in ("real", "imag") + ), + } + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("run", type=Path) + args = parser.parse_args() + path = args.run + result = summarize( + load(path / "manifest.json"), load(path / "q2_protocol.json")["scans"], + load(path / "hardware_counts.json"), + ) + write(path / "hardware_analysis.json", result) + print(f"Verified and analyzed {result['shots_total']:,} hardware shots.") + + +if __name__ == "__main__": + main() diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/noise_benchmark.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/noise_benchmark.py new file mode 100644 index 00000000..ab286851 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/noise_benchmark.py @@ -0,0 +1,68 @@ +"""Replay a calibrated two-qubit Aer model and perturb two noise sources.""" + +from copy import deepcopy + +import numpy as np +from qiskit_aer import AerSimulator +from qiskit_aer.noise import NoiseModel, QuantumError + +SCENARIOS = { + "calibrated_aer": (1.0, 1.0), + "readout_half": (.5, 1.0), + "readout_off": (0.0, 1.0), + "two_qubit_half": (1.0, .5), + "two_qubit_off": (1.0, 0.0), +} + + +def prepared_noise(snapshot, readout_scale, twoq_scale): + model = NoiseModel() + readout = [np.eye(2), np.eye(2)] + for original in snapshot["compact_noise_model"]["errors"]: + item = deepcopy(original) + name, = item["operations"] + if item["type"] == "roerror": + if any(len(scope) != 1 for scope in item["gate_qubits"]): + raise ValueError("correlated readout requires a different measurement model") + transition = np.asarray(item["probabilities"]) + for (q,) in item["gate_qubits"]: + readout[q] = np.eye(2) + readout_scale*(transition-np.eye(2)) + continue + if name in {"cz", "cx", "ecr"}: + if twoq_scale == 0: + continue + if twoq_scale < 1: + item["instructions"] = [ + [{"name": "id", "qubits": [0]}, {"name": "id", "qubits": [1]}], + *item["instructions"], + ] + item["probabilities"] = [1-twoq_scale, *(twoq_scale*p for p in item["probabilities"])] + channel = QuantumError.from_dict(item) + if "gate_qubits" in item: + for qargs in item["gate_qubits"]: + model.add_quantum_error(channel, name, qargs) + else: + model.add_all_qubit_quantum_error(channel, name) + # Rightmost compact bit is q0. Rows are true states, columns measured states. + readout_zero = np.kron(readout[1][:, 0], readout[0][:, 0]) + return model, readout_zero + + +def benchmark_noise(circuits, snapshot): + saved = [] + for circuit in circuits: + bare = circuit.remove_final_measurements(inplace=False) + bare.save_probabilities([0, 1]) + saved.append(bare) + result = {} + for name, (readout, twoq) in SCENARIOS.items(): + noise_model, measured_zero = prepared_noise(snapshot, readout, twoq) + simulator = AerSimulator(method="density_matrix", noise_model=noise_model, max_parallel_threads=2) + observed = simulator.run(saved, shots=1, seed_simulator=271828).result() + if not observed.success: + raise RuntimeError(f"Aer density-matrix simulation failed for {name}") + result[name] = [ + float(np.clip(np.asarray(observed.data(index)["probabilities"]) @ measured_zero, 0, 1)) + for index in range(len(saved)) + ] + return result diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/offline_replay.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/offline_replay.py new file mode 100644 index 00000000..8d1ce77a --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/offline_replay.py @@ -0,0 +1,55 @@ +"""Replay the archived IBM Q2 experiment through the original #254 analyzer. + +Read-only: no IBM service access or hardware submission. +Run from the recovered_q2 directory with its pinned requirements installed. +""" +from __future__ import annotations + +import json +import math +from pathlib import Path +from hardware_analysis import summarize + +ROOT = Path(__file__).resolve().parent +ARCHIVE = ROOT.parent / "receipts" / "hardware_q2" +EXPECTED_JOB = "dc1vksqnj2vs73dfu0n0" + + +def read(name: str): + return json.loads((ARCHIVE / name).read_text(encoding="utf-8")) + + +def replay() -> dict: + manifest = read("manifest.json") + protocol = read("q2_protocol.json") + hardware = read("hardware_counts.json") + expected = read("hardware_analysis.json") + observed = summarize(manifest, protocol["scans"], hardware) + if observed != expected: + raise AssertionError("reconstructed analysis differs from the immutable IBM Q2 receipt") + if observed["job_id"] != EXPECTED_JOB or observed["shots_total"] != 73_728: + raise AssertionError("the IBM job identity or shot total changed") + if not observed["primary_acceptance"]["passes"]: + raise AssertionError("the prespecified primary criterion did not pass") + if not observed["tree_rectangle_contains_origin"]: + raise AssertionError("the tree control does not contain the origin") + positive = observed["four_phase_groups"]["signal_t1.6"]["reference_calibrated_phase"] + reversed_phase = observed["four_phase_groups"]["reversed_t1.6"]["reference_calibrated_phase"] + fwd = math.degrees(positive["relative_phase_rad"]) + rev = math.degrees(reversed_phase["relative_phase_rad"]) + if abs(fwd - 38.90366216407) > 1e-7 or abs(rev + 42.85997335229) > 1e-7: + raise AssertionError("the signed phase estimates diverge from Q2 counts") + return { + "status": "PASS_READ_ONLY", + "source": "MathCan #254 archived IBM job, independently replayed on current main", + "job_id": EXPECTED_JOB, + "shots_total": observed["shots_total"], + "forward_degrees": fwd, + "reversed_degrees": rev, + "primary_passes": True, + "tree_contains_zero": True, + } + + +if __name__ == "__main__": + print(json.dumps(replay(), indent=2)) diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/phase_estimator.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/phase_estimator.py new file mode 100644 index 00000000..fc87fbfa --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/phase_estimator.py @@ -0,0 +1,134 @@ +"""Signed phase calibration, Bernoulli intervals, information and shot comparisons.""" + +import numpy as np +from scipy.stats import beta + +from exact_oracle import harmonic, masked_probabilities, phase_scan, wrap +from hamiltonian import PLANTED_PHASE, REFERENCE_OFFSET + +SEED = 20261123 +REPLICATES = 2500 +SYSTEMATIC_FLOOR = 0.003 + + +def rectangle(successes, shots, coverage=.95): + """Simultaneous Clopper–Pearson rectangles propagated through the 4-phase DFT.""" + hits = np.asarray(successes, dtype=int) + n = np.broadcast_to(np.asarray(shots, dtype=int), (4,)) + if hits.shape != (4,) or np.any(n <= 0) or np.any(hits < 0) or np.any(hits > n): + raise ValueError("four valid binomial counts are required") + tail = (1-coverage)/8 + low = np.where(hits == 0, 0, beta.ppf(tail, hits, n-hits+1)) + high = np.where(hits == n, 1, beta.ppf(1-tail, hits+1, n-hits)) + return { + "coverage_at_least": coverage, + "probability_intervals": np.stack([low, high], axis=1).tolist(), + "real": [(low[0]-high[2])/2, (high[0]-low[2])/2], + "imag": [(low[3]-high[1])/2, (high[3]-low[1])/2], + } + + +def _angle_radius(value, box): + r = np.hypot(max(abs(value.real-i) for i in box["real"]), + max(abs(value.imag-i) for i in box["imag"])) + return float(np.arcsin(r/abs(value))) if r < abs(value) else None + + +def estimate(signal_counts, reference_counts, shots): + signal, reference = np.asarray(signal_counts), np.asarray(reference_counts) + a, b = harmonic(signal/shots), harmonic(reference/shots) + # Bonferroni over the separately sampled signal and reference. + a_rect, b_rect = rectangle(signal, shots, .975), rectangle(reference, shots, .975) + ar, br = _angle_radius(a, a_rect), _angle_radius(b, b_rect) + calibrated = float(np.angle(a*b.conjugate())) if abs(a)*abs(b) > 1e-14 else None + return { + "signal_harmonic": complex_record(a), "reference_harmonic": complex_record(b), + "signal_rectangle": a_rect, "reference_rectangle": b_rect, + "relative_phase_rad": calibrated, + "joint_95_phase_halfwidth_rad": min(np.pi, ar+br) if ar is not None and br is not None else None, + "phase_identifiable_at_95": ar is not None and br is not None and ar+br < np.pi, + } + + +def complex_record(value): + return [float(value.real), float(value.imag)] + + +def acceptance(counts, shots, target, modeled_probabilities): + """One declared primary test: exact target inside inflated 95% joint rectangle.""" + measured = harmonic(np.asarray(counts)/shots) + rect = rectangle(counts, shots) + residuals = [harmonic(p) - target for p in modeled_probabilities] + allowances = [float(max([0.0, *[abs(z.real if axis == "real" else z.imag) for z in residuals]])) + + SYSTEMATIC_FLOOR for axis in ("real", "imag")] + enlarged = [[rect[name][0]-allowance, rect[name][1]+allowance] + for name, allowance in zip(("real", "imag"), allowances, strict=True)] + return { + "observed": complex_record(measured), "target": complex_record(target), + "unexpanded_joint_95_rectangle": rect, "systematic_allowances_real_imag": allowances, + "policy_floor_per_component": SYSTEMATIC_FLOOR, "expanded_joint_rectangle": enlarged, + "passes": all(lo <= x <= hi for x, (lo, hi) in zip(complex_record(target), enlarged, strict=True)), + } + + +def _statistics(angles, truth): + residual = wrap(angles-truth) + return { + "replicates": len(residual), + "circular_bias_deg": float(np.degrees(np.angle(np.exp(1j*residual).mean()))), + "angular_rmse_deg": float(np.degrees(np.sqrt(np.mean(residual**2)))), + "angular_error_2p5_97p5_deg": np.degrees(np.quantile(residual, [.025, .975])).tolist(), + } + + +def shot_benchmark(time, probabilities, *, seed=SEED): + """The fully masked estimator pays for all arms, including all reference shots.""" + result = {} + exact_signal = phase_scan(time, PLANTED_PHASE+REFERENCE_OFFSET) + exact_ref = phase_scan(time, REFERENCE_OFFSET) + signs, masked_signal = masked_probabilities(time, PLANTED_PHASE+REFERENCE_OFFSET) + _, masked_ref = masked_probabilities(time, REFERENCE_OFFSET) + for shots in (2048, 8192): + rng = np.random.default_rng(seed+shots) + outcomes = {} + for name, (a, b) in probabilities.items(): + sample_a = rng.binomial(shots, a, size=(REPLICATES, 4)) / shots + sample_b = rng.binomial(shots, b, size=(REPLICATES, 4)) / shots + za, zb = harmonic(sample_a), harmonic(sample_b) + outcomes[name] = { + **_statistics(np.angle(za*zb.conj()), PLANTED_PHASE), + "empirical_signal_Z95_real": np.quantile(za.real, [.025, .975]).tolist(), + "empirical_signal_Z95_imag": np.quantile(za.imag, [.025, .975]).tolist(), + } + reduced = shots // len(signs) + a = rng.binomial(reduced, masked_signal, size=(REPLICATES, len(signs), 4))/reduced + b = rng.binomial(reduced, masked_ref, size=(REPLICATES, len(signs), 4))/reduced + za, zb = harmonic(signs @ a), harmonic(signs @ b) + outcomes["exhaustive_ideal_equal_total"] = _statistics(np.angle(za*zb.conj()), PLANTED_PHASE) + outcomes["total_shots_both_arms_each_protocol"] = 8*shots + outcomes["exhaustive_shots_per_setting"] = reduced + outcomes["exact_exhaustive_mean_residual"] = float(max( + abs(harmonic(signs @ masked_signal)-harmonic(exact_signal)), + abs(harmonic(signs @ masked_ref)-harmonic(exact_ref)), + )) + result[str(shots)] = outcomes + return result + + +def fisher(time, theta=PLANTED_PHASE, offset=REFERENCE_OFFSET, shots=2048): + """Exact-probability conditional Fisher information for theta and shared offset.""" + def information(angle): + probabilities = phase_scan(time, angle) + eps = 1e-5 + coarse = (phase_scan(time, angle+eps)-phase_scan(time, angle-eps))/(2*eps) + fine = (phase_scan(time, angle+eps/2)-phase_scan(time, angle-eps/2))/eps + np.testing.assert_allclose(coarse, fine, atol=1e-8, rtol=0) + return float(shots*np.sum(fine**2/(probabilities*(1-probabilities)))) + + signal, reference = information(theta+offset), information(offset) + return { + "shots_per_setting_per_arm": shots, "signal_info_if_reference_phase_known": signal, + "reference_info": reference, "joint_fisher_theta_beta": [[signal, signal], [signal, signal+reference]], + "known_reference_cr_sd_deg": float(np.degrees(np.sqrt(1/signal))), + "estimated_reference_cr_sd_deg": float(np.degrees(np.sqrt(1/signal+1/reference))), + } diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/q3_curvature.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/q3_curvature.py new file mode 100644 index 00000000..17cdd414 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/q3_curvature.py @@ -0,0 +1,238 @@ +"""AHR-08 local face spectroscopy and AHR-09 cubical reconstruction.""" + +from itertools import combinations, pairwise +from math import ceil, pi, sqrt + +import numpy as np +from scipy.linalg import expm + +from exact_oracle import direct_return, harmonic, spectral_return, wrap +from hamiltonian import OFFSETS + +EDGES = tuple(sorted((s, s | (1 << i)) for i in range(3) for s in range(8) if not s & (1 << i))) +FACES = tuple((i, j, layer) for i, j in combinations(range(3), 2) for layer in range(2)) +TREE = {(0, 1), (0, 2), (0, 4), (1, 3), (1, 5), (2, 6), (3, 7)} +CHORDS = tuple(edge for edge in EDGES if edge not in TREE) +PROBES = ((0, 1), (2, 6), (5, 7)) +BIANCHI = np.array([-1, 1, 1, -1, -1, 1]) +ENERGIES = np.array([sum(np.log(p) for i, p in enumerate((2, 3, 5)) if s & (1 << i)) for s in range(8)]) + + +def incidence(): + d0 = np.zeros((12, 8), dtype=int) + d1 = np.zeros((6, 12), dtype=int) + for row, (low, high) in enumerate(EDGES): + d0[row, low], d0[row, high] = -1, 1 + for row, (i, j, layer) in enumerate(FACES): + fixed = 3-i-j + low = layer << fixed + corners = (low, low | 1 << i, low | 1 << i | 1 << j, low | 1 << j, low) + for a, b in pairwise(corners): + d1[row, EDGES.index(tuple(sorted((a, b))))] = 1 if a < b else -1 + return d0, d1 + + +def addresses(): + """One forward probe per face, unique starting corner and orientation correction.""" + _, d1 = incidence() + result = [] + for row, (i, j, layer) in enumerate(FACES): + probe, = (edge for edge in PROBES if d1[row, EDGES.index(edge)]) + axis = (probe[0]^probe[1]).bit_length()-1 + other = j if axis == i else i + start = probe[0] ^ (1 << other) + result.append({ + "face": [i, j, layer], "edge": probe, "sign": int(d1[row, EDGES.index(probe)]), "start": start, + }) + return result + + +def cube(angles, probe=None, delta=0., mask=None): + h = np.diag(ENERGIES).astype(complex) + masks = {} if mask is None else mask + for edge, angle in zip(EDGES, angles, strict=True): + if not masks.get(edge, True): + continue + lo, hi = edge + value = np.exp(1j*(angle + (delta if probe == edge else 0.0))) + h[hi, lo], h[lo, hi] = value, value.conjugate() + return h + + +def face_probabilities(angles, address, time, offsets=OFFSETS, *, independent=False, mask=None): + calculate = direct_return if independent else spectral_return + return np.array([calculate( + cube(angles, address["edge"], address["sign"]*delta, mask=mask), time, address["start"], + ) for delta in offsets]) + + +def face_circuit(angles, address, time, delta): + """Qiskit local-probe circuit, with little-endian basis-state preparation.""" + from qiskit import QuantumCircuit + + circuit = QuantumCircuit(3) + for bit in range(3): + if address["start"] & (1 << bit): + circuit.x(bit) + h = cube(angles, address["edge"], address["sign"]*delta) + circuit.unitary(expm(-1j*time*h), range(3)) + return circuit + + +def project(face_angles, covariance=None): + """Local wrapped GLS projection onto the nearest Bianchi-compatible branch.""" + cov = np.eye(6) if covariance is None else np.asarray(covariance) + direction = cov @ BIANCHI + denominator = BIANCHI @ direction + if denominator <= 0: + raise ValueError("positive variance along the Bianchi row is required") + bianchi = wrap(np.asarray(face_angles) @ BIANCHI) + return wrap(np.asarray(face_angles) - bianchi[..., None]*(direction/denominator)) + + +def chords(face_angles): + _, d1 = incidence() + matrix = d1[:, [EDGES.index(edge) for edge in CHORDS]] + assert all(abs(round(np.linalg.det(np.delete(matrix, i, axis=0)))) == 1 for i in range(6)) + inverse = np.rint(np.linalg.inv(matrix[:5])).astype(int) + return wrap(np.asarray(face_angles)[..., :5] @ inverse.T) + + +def _tree_gauge(angles): + phases = {0: 0.0} + while len(phases) < 8: + for lo, hi in TREE: + raw = angles[EDGES.index((lo, hi))] + if lo in phases and hi not in phases: + phases[hi] = phases[lo] - raw + elif hi in phases and lo not in phases: + phases[lo] = phases[hi] + raw + return wrap(np.array([angles[EDGES.index((lo, hi))]+phases[hi]-phases[lo] for lo, hi in CHORDS])) + + +def _scheduled_draws(angles, cases, time, shots, rng, samples): + probabilities = np.stack([face_probabilities(angles, case, time) for case in cases]) + draws = {} + result = [] + for i, case in enumerate(cases): + fields = [] + for q, delta in enumerate(OFFSETS): + # Only the probe-free offset can share a circuit across different edges. + key = (case["start"], case["edge"] if q else None, case["sign"]*delta) + if key not in draws: + draws[key] = rng.binomial(shots, probabilities[i, q], samples) / shots + fields.append(draws[key]) + result.append(harmonic(np.stack(fields, axis=1))) + return np.stack(result, axis=1), len(draws) + + +def run_q3(*, seed=20261123, time=.4, shots=2048, samples=2500): + from qiskit.quantum_info import Statevector + + d0, d1 = incidence() + ranks = [int(np.linalg.matrix_rank(matrix)) for matrix in (d0, d1, BIANCHI[None, :])] + assert ranks == [7, 5, 1] and not np.any(d1 @ d0) and not np.any(BIANCHI @ d1) + rng = np.random.default_rng(seed) + angles = rng.uniform(-pi, pi, 12) + truth = wrap(d1 @ angles) + cases = addresses() + # Independent path classification: each starting corner lies in exactly one face incident to the probe. + for row, case in enumerate(cases): + touching = [f for f, values in enumerate(d1) if values[EDGES.index(case["edge"])] + and any(case["start"] in EDGES[k] for k, value in enumerate(values) if value)] + assert touching == [row] + np.testing.assert_allclose(wrap(chords(truth)-_tree_gauge(angles)), 0, atol=1e-12, rtol=0) + + short = time/sqrt(2) + long_q = np.array([6/time**4 * harmonic(face_probabilities(angles, case, time)) for case in cases]) + short_q = np.array([6/short**4 * harmonic(face_probabilities(angles, case, short)) for case in cases]) + improved = 2*short_q-long_q + residuals = wrap(np.angle(improved)-truth) + independent_error = max(float(np.max(abs(face_probabilities(angles, case, time) - + face_probabilities(angles, case, time, independent=True)))) + for case in cases) + qiskit_error = max( + abs(Statevector.from_instruction(face_circuit(angles, case, time, delta)).probabilities()[case["start"]] + - spectral_return(cube(angles, case["edge"], case["sign"]*delta), time, case["start"])) + for case in cases for delta in OFFSETS + ) + assert independent_error < 1e-12 + assert qiskit_error < 1e-12 + + # A wrong corner sees the other face incident to the same probe at leading order. + face = 0 + correct_case = cases[face] + other_face = next(index for index, case in enumerate(cases) + if index != face and case["edge"] == correct_case["edge"]) + wrong_case = {**cases[other_face], "sign": correct_case["sign"]} + tiny = .04 + near = 6/tiny**4 * harmonic(face_probabilities(angles, correct_case, tiny)) + wrong = 6/tiny**4 * harmonic(face_probabilities(angles, wrong_case, tiny)) + assert abs(near-np.exp(1j*truth[face])) < .01 + assert abs(wrong-np.exp(1j*truth[face])) > .1 + other_sign = cases[other_face]["sign"] + expected_wrong = np.exp(1j*(truth[other_face] if other_sign == correct_case["sign"] else -truth[other_face])) + assert abs(wrong-expected_wrong) < .01 + + # Removing a marked edge need not eliminate probe dependence on an intact cube. + selected_edges = [edge for edge, value in zip(EDGES, d1[face], strict=True) if value] + parity_scan = np.zeros(4) + for m in range(16): + mask = {edge: bool(m & (1 << i)) for i, edge in enumerate(selected_edges)} + parity_scan += (-1)**(4-m.bit_count())*face_probabilities(angles, correct_case, 1.3, mask=mask) + overlapping_cycle_gap = float(abs(harmonic(parity_scan)-harmonic(face_probabilities(angles, correct_case, 1.3)))) + assert overlapping_cycle_gap > 1e-4 + + q_long, long_settings = _scheduled_draws(angles, cases, time, shots, rng, samples) + q_short, short_settings = _scheduled_draws(angles, cases, short, shots, rng, samples) + noisy_local = np.angle(q_long) + noisy_richardson = np.angle(12*q_short/short**4 - 6*q_long/time**4) + noise = rng.normal(0, .08, size=(20_000, 6)) + raw = wrap(truth+noise) + fitted = project(raw) + projection_ratio = float(np.mean(wrap(fitted-truth)**2)/np.mean(wrap(raw-truth)**2)) + assert abs(projection_ratio-5/6) < .02 + fitted_ideal = project(np.angle(improved)) + zero_branch = float(wrap(BIANCHI @ fitted_ideal)) + np.testing.assert_allclose(zero_branch, 0, atol=1e-12) + reconstructed = chords(fitted_ideal) + rebuilt_faces = d1[:, [EDGES.index(edge) for edge in CHORDS]] @ reconstructed + chord_face_error = float(max(abs(wrap(rebuilt_faces-fitted_ideal)))) + assert chord_face_error < 1e-12 + lower_per_face = ceil(216 / (time**6 * (10*pi/180)**2)) + return { + "status": "simulation only", "cochain_ranks": ranks, "time": time, "short_time": short, + "edge_order": EDGES, "probe_edges": PROBES, "chord_order": CHORDS, "face_addresses": cases, + "true_face_phases": truth.tolist(), "local_face_phases": np.angle(long_q).tolist(), + "richardson_face_phases": np.angle(improved).tolist(), "richardson_bias_rad": residuals.tolist(), + "projected_richardson_face_phases": fitted_ideal.tolist(), "projected_bianchi_residual_rad": zero_branch, + "projected_chord_round_trip_face_error_rad": chord_face_error, + "true_chord_phases": _tree_gauge(angles).tolist(), "reconstructed_chord_phases": reconstructed.tolist(), + "independent_probabilities_max_error": independent_error, + "qiskit_probabilities_max_error": float(qiskit_error), + "wrong_corner_complex_error": float(abs(wrong-np.exp(1j*truth[face]))), + "overlapping_cycle_failure_of_unicyclic_identity": overlapping_cycle_gap, + "gaussian_projection_mse_ratio": projection_ratio, + "shot_monte_carlo": { + "replicates": samples, "shots_per_setting": shots, + "raw_rmse_deg": float(np.degrees(np.sqrt(np.mean(wrap(noisy_local-truth)**2)))), + "richardson_rmse_deg": float(np.degrees(np.sqrt(np.mean(wrap(noisy_richardson-truth)**2)))), + "projected_richardson_rmse_deg": float(np.degrees(np.sqrt(np.mean(wrap(project(noisy_richardson)-truth)**2)))), + }, + "schedule": { + "single_time_simple": 24, "single_time_deduplicated": long_settings, + "two_time_simple": 48, "two_time_deduplicated": long_settings+short_settings, + "single_time_shots": long_settings*shots, "two_time_shots": (long_settings+short_settings)*shots, + "shared_counts_couple_face_errors": True, + }, + "planning": { + "timing_assumption_per_shot_s": 0.00052, + "job_overhead_allowance_s": 60, + "single_time_nominal_s": 60+long_settings*shots*.00052, + "two_time_nominal_s": 60+(long_settings+short_settings)*shots*.00052, + "target_phase_sd_deg": 10, + "leading_order_shots_for_target_per_face": lower_per_face, + "leading_order_seconds_six_faces": 60+6*lower_per_face*.00052, + "richardson_short_long_allocation_ratio": sqrt(32), + }, + } diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/receipts/calibration.json b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/receipts/calibration.json new file mode 100644 index 00000000..c29158f9 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/receipts/calibration.json @@ -0,0 +1,8660 @@ +{ + "target_type": "live_snapshot", + "captured_utc": "2026-11-23T06:21:59+00:00", + "backend": "ibm_fez", + "backend_width": 156, + "dt_s": 4e-09, + "physical_pair_xy": [ + 9, + 10 + ], + "native_pair_interaction": "cz", + "pair_score": 0.016968622081484114, + "calibration_id": null, + "calibration_timestamp": "2026-11-23T13:57:23+08:00", + "backend_version": "1.3.37", + "instructions": [ + { + "gate": "cz", + "physical": [ + 9, + 10 + ], + "duration_s": 6.8e-08, + "error": 0.0021568584021613713 + }, + { + "gate": "cz", + "physical": [ + 10, + 9 + ], + "duration_s": 6.8e-08, + "error": 0.0021568584021613713 + }, + { + "gate": "id", + "physical": [ + 9 + ], + "duration_s": 2.4e-08, + "error": 0.00023766642162191407 + }, + { + "gate": "id", + "physical": [ + 10 + ], + "duration_s": 2.4e-08, + "error": 0.0004110106430532702 + }, + { + "gate": "measure", + "physical": [ + 9 + ], + "duration_s": 1.66e-06, + "error": 0.0042724609375 + }, + { + "gate": "measure", + "physical": [ + 10 + ], + "duration_s": 1.66e-06, + "error": 0.0062255859375 + }, + { + "gate": "rz", + "physical": [ + 9 + ], + "duration_s": 0.0, + "error": 0.0 + }, + { + "gate": "rz", + "physical": [ + 10 + ], + "duration_s": 0.0, + "error": 0.0 + }, + { + "gate": "sx", + "physical": [ + 9 + ], + "duration_s": 2.4e-08, + "error": 0.00023766642162191407 + }, + { + "gate": "sx", + "physical": [ + 10 + ], + "duration_s": 2.4e-08, + "error": 0.0004110106430532702 + }, + { + "gate": "x", + "physical": [ + 9 + ], + "duration_s": 2.4e-08, + "error": 0.00023766642162191407 + }, + { + "gate": "x", + "physical": [ + 10 + ], + "duration_s": 2.4e-08, + "error": 0.0004110106430532702 + } + ], + "qubits": [ + { + "physical": 9, + "t1_s": 0.00018384272551384673, + "t2_s": 2.524130751501063e-05, + "readout_error": 0.0042724609375 + }, + { + "physical": 10, + "t1_s": 0.00020945289360089147, + "t2_s": 3.4173413994143376e-05, + "readout_error": 0.0062255859375 + } + ], + "compact_noise_model": { + "errors": [ + { + "type": "qerror", + "id": "04331a1dd11f458fa5638eb189f3df45", + "operations": [ + "sx" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9994595458325521, + 0.0004099163207928616, + 0.0001305378466549545 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "75cb2b6557464a5c92596d8d29a7fd0c", + "operations": [ + "sx" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9993548164154603, + 0.0002936684467529077, + 0.00011455052161951336, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "7e5ec5e82bdb49c1a9be4180fecc2877", + "operations": [ + "measure_reset" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9631713108421389, + 0.02771051073604638, + 0.009118178421814727 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "8ccc10cd773745788d253c6712343dc0", + "operations": [ + "measure_reset" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9719543153474686, + 0.020037924995668723, + 0.008007759656862734 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "93a5cb4a43c34e41895e7ec186161d96", + "operations": [ + "id" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9994595458325521, + 0.0004099163207928616, + 0.0001305378466549545 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "c8d2dbfed05241edba4bbd89b56d3ac9", + "operations": [ + "id" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9993548164154603, + 0.0002936684467529077, + 0.00011455052161951336, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "47791120daa344508f6a4fe4f7515924", + "operations": [ + "xslow" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9778661255868422, + 0.016709209359036175, + 0.005424665054121647 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "29030424ff2e42ea8fa3a40e90d41ad4", + "operations": [ + "xslow" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9831992617600691, + 0.012037774091889589, + 0.004762964148041338 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "17a9c1eabf0b407bacaddb8fb5f89f63", + "operations": [ + "reset" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9631713108421389, + 0.02771051073604638, + 0.009118178421814727 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "9f88d54b63ca4031a88be8269f93824f", + "operations": [ + "reset" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9719543153474686, + 0.020037924995668723, + 0.008007759656862734 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "bf5ee0a88d454e969755312ac7e1ad4e", + "operations": [ + "measure_2" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9705173073788063, + 0.02222035293536704, + 0.00726233968582668 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "69dbf1236f24457c9eec5bb5af5d2afd", + "operations": [ + "measure_2" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9775849317294214, + 0.016037869569556145, + 0.006377198701022491 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "b14e6e4bcce94027bdba9193a72a8b2a", + "operations": [ + "cz" + ], + "instructions": [ + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ] + ], + "probabilities": [ + 0.9971305477619965, + 0.001158722689037454, + 0.0003693169049880872, + 0.0008302085100538223, + 9.647497405334303e-07, + 3.0749237210314933e-07, + 0.0003240458855621264, + 3.7655984036675296e-07, + 1.2002001523123892e-07, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.4323651098385551e-08, + 4.565342977946966e-09, + 1.0262694559644618e-08, + 1.1925837658480657e-11, + 3.801093648281954e-12, + 4.00572134176035e-09, + 4.654877152321633e-12, + 1.4836378360928235e-12 + ], + "gate_qubits": [ + [ + 0, + 1 + ] + ] + }, + { + "type": "qerror", + "id": "b36e5e39471f41e3be3d87306f9eb941", + "operations": [ + "cz" + ], + "instructions": [ + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "II" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "IZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "XZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "YZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZI" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZX" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZY" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ], + [ + { + "name": "pauli", + "qubits": [ + 0, + 1 + ], + "params": [ + "ZZ" + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 1 + ] + } + ] + ], + "probabilities": [ + 0.9971305477619965, + 0.0008302085100538223, + 0.0003240458855621264, + 0.001158722689037454, + 9.647497405334303e-07, + 3.7655984036675296e-07, + 0.0003693169049880872, + 3.0749237210314933e-07, + 1.2002001523123892e-07, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12, + 1.2326115817710757e-05, + 1.0262694559644618e-08, + 4.00572134176035e-09, + 1.4323651098385551e-08, + 1.1925837658480657e-11, + 4.654877152321633e-12, + 4.565342977946966e-09, + 3.801093648281954e-12, + 1.4836378360928235e-12 + ], + "gate_qubits": [ + [ + 1, + 0 + ] + ] + }, + { + "type": "qerror", + "id": "cef88f416fc8416cb0a785da79cc87f4", + "operations": [ + "measure_reset_2" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9700018957407751, + 0.0226061747369275, + 0.007391929522297391 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "052b5e0e385d44648cea1a0ea1a89eed", + "operations": [ + "measure_reset_2" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9771904793620863, + 0.016318474949001658, + 0.006491045688912123 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "0a0ce95f4338474b978a0c7c8a31d1e6", + "operations": [ + "x" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9994595458325521, + 0.0004099163207928616, + 0.0001305378466549545 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "7e8e465a022c417fb16ff5c05c6ec495", + "operations": [ + "x" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "id", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "x", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "y", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + }, + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9993548164154603, + 0.0002936684467529077, + 0.00011455052161951336, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09, + 7.895595326279188e-05, + 2.32018416039132e-08, + 9.050284726359586e-09 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "qerror", + "id": "fd63c74ada0643feb6fd39475d530d9c", + "operations": [ + "reset_2" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9700018957407751, + 0.0226061747369275, + 0.007391929522297391 + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "qerror", + "id": "165ebf1f7da14b1399a19bdf8dd95920", + "operations": [ + "reset_2" + ], + "instructions": [ + [ + { + "name": "id", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "z", + "qubits": [ + 0 + ] + } + ], + [ + { + "name": "reset", + "qubits": [ + 0 + ] + } + ] + ], + "probabilities": [ + 0.9771904793620863, + 0.016318474949001658, + 0.006491045688912123 + ], + "gate_qubits": [ + [ + 1 + ] + ] + }, + { + "type": "roerror", + "operations": [ + "measure" + ], + "probabilities": [ + [ + 0.9957275390625, + 0.0042724609375 + ], + [ + 0.0042724609375, + 0.9957275390625 + ] + ], + "gate_qubits": [ + [ + 0 + ] + ] + }, + { + "type": "roerror", + "operations": [ + "measure" + ], + "probabilities": [ + [ + 0.9937744140625, + 0.0062255859375 + ], + [ + 0.0062255859375, + 0.9937744140625 + ] + ], + "gate_qubits": [ + [ + 1 + ] + ] + } + ] + }, + "account": { + "plan": "open", + "checked_utc": "2026-11-23T06:21:46+00:00", + "remaining_qpu_seconds": 536.0 + }, + "sdk": { + "service": "(*args: 'Any', **kwargs: 'Any') -> 'QiskitRuntimeService'", + "sampler_run": "(self, pubs: 'Iterable[SamplerPubLike]', *, shots: 'int | None' = None, dry_run: 'bool' = False) -> 'RuntimeJobV2 | LocalRuntimeJob'", + "implementation": "qiskit_ibm_runtime.executor_sampler.sampler" + }, + "versions": { + "numpy": "2.5.5", + "scipy": "1.18.1", + "qiskit": "2.6.2", + "qiskit-aer": "0.18.4", + "qiskit-ibm-runtime": "0.52.1" + } +} diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/requirements.txt b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/requirements.txt new file mode 100644 index 00000000..0cbc15fd --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/requirements.txt @@ -0,0 +1,6 @@ +numpy==2.5.5 +scipy==1.18.1 +qiskit==2.6.2 +qiskit-aer==0.18.4 +qiskit-ibm-runtime==0.52.1 +pytest==9.2.0 diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/tests/test_protocol.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/tests/test_protocol.py new file mode 100644 index 00000000..24e59fe0 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/tests/test_protocol.py @@ -0,0 +1,158 @@ +from pathlib import Path + +import numpy as np +import pytest +from qiskit import QuantumCircuit +from qiskit.quantum_info import SparsePauliOp + +from circuit_synthesis import benchmark, compact_target, embed, measurements +from exact_oracle import ( + aliasing, + audit_square, + direct_square, + harmonic, + phase_scan, + wrap, +) +from experiment import Hold, calibration_digest, digest, load, submission +from hamiltonian import ( + PLANTED_PHASE, + PRIMARY_TIME, + REFERENCE_OFFSET, + pilot, + square_paulis, +) +from hardware_analysis import summarize +from noise_benchmark import benchmark_noise +from phase_estimator import acceptance, estimate, fisher, rectangle, shot_benchmark +from q3_curvature import BIANCHI, addresses, chords, incidence, project, run_q3 + +ROOT = Path(__file__).resolve().parents[1] + + +def test_independent_square_and_aliases(): + audit = audit_square() + assert max(audit["maximum_discrepancies"].values()) < 1e-12 + result = aliasing(PRIMARY_TIME, PLANTED_PHASE + REFERENCE_OFFSET) + assert result["4"]["alias_error"] < result["4"]["alias_amplitude_bound"] < .001 + assert result["8"]["alias_error"] < result["4"]["alias_error"] + + +def test_little_endian_y_edge_and_reverse(): + for case in pilot(): + a = direct_square(case.phase, case.energy, case.mask) + b = SparsePauliOp.from_list(square_paulis(case.phase, case.energy, case.mask)).to_matrix() + np.testing.assert_allclose(a, b, atol=1e-12, rtol=0) + assert direct_square(np.pi/2)[3, 1].imag == 1 + assert direct_square(-np.pi/2)[3, 1].imag == -1 + assert len(pilot()) == len({case.id for case in pilot()}) == 36 + + +def test_calibration_recovers_both_signs_and_short_time_reference(): + for time in (0.8, 1.6): + for theta in (-PLANTED_PHASE, PLANTED_PHASE): + n = 8192 + signal = np.rint(n*phase_scan(time, theta+REFERENCE_OFFSET)).astype(int) + reference = np.rint(n*phase_scan(time, REFERENCE_OFFSET)).astype(int) + result = estimate(signal, reference, n) + assert abs(wrap(result["relative_phase_rad"]-theta)) < .008 + assert result["phase_identifiable_at_95"] + dark = estimate([50]*4, [51]*4, 100) + assert dark["relative_phase_rad"] is None + assert not dark["phase_identifiable_at_95"] + + +def test_intervals_and_acceptance(): + assert rectangle([0, 8, 0, 8], 8)["probability_intervals"][0][0] == 0 + p = np.array([.35, .12, .28, .4]) + shots = 8192 + counts = np.rint(shots*p).astype(int) + assert acceptance(counts, shots, harmonic(p), [p])["passes"] + unexpected = np.rint(shots*(p + [0, 0, 0, .20])).astype(int) + assert not acceptance(unexpected, shots, harmonic(p), [p])["passes"] + + +def test_matched_total_budget_and_fisher(): + time = 1.6 + a = phase_scan(time, PLANTED_PHASE+REFERENCE_OFFSET) + b = phase_scan(time, REFERENCE_OFFSET) + trials = shot_benchmark(time, {"intact": (a, b)}) + for shots, row in trials.items(): + assert 128*row["exhaustive_shots_per_setting"] == row["total_shots_both_arms_each_protocol"] + assert 8*int(shots) == row["total_shots_both_arms_each_protocol"] + assert row["exhaustive_ideal_equal_total"]["angular_rmse_deg"] > row["intact"]["angular_rmse_deg"] + bound = fisher(time) + assert bound["estimated_reference_cr_sd_deg"] > bound["known_reference_cr_sd_deg"] + + +def test_cube_face_addresses_and_tree_inverse(): + assert len({tuple(row["edge"]) for row in addresses()}) == 3 + _, d1 = incidence() + assert not np.any(BIANCHI @ d1) + phases = d1 @ np.arange(12)/4 + corrected = project(phases+.03*BIANCHI) + np.testing.assert_allclose(wrap(corrected-phases), 0, atol=1e-12) + assert chords(corrected).shape == (5,) + receipt = run_q3() + assert receipt["qiskit_probabilities_max_error"] < 1e-12 + assert receipt["schedule"]["single_time_deduplicated"] == 23 + + +def test_calibrated_compiled_q2_subset(): + snapshot = load(ROOT / "receipts/calibration.json") + cases = pilot()[:4] + [case for case in pilot() if case.arm == "signal" and case.time == 1.6] + # The benchmark requires a complete primary signal scan; discard any overlap. + unique = list({case.id: case for case in cases}.values()) + chosen, circuits, metrics, _ = benchmark(unique, snapshot) + assert metrics[chosen]["eligible"] and compact_target(snapshot).num_qubits == 2 + assert all(measurements(embed(c, snapshot)) == tuple(snapshot["physical_pair_xy"]) for c in circuits) + noise = benchmark_noise(circuits[:1], snapshot) + assert all(0 <= probs[0] <= 1 for probs in noise.values()) + + +def test_readout_order_and_explicit_hardware_gate(tmp_path): + circuit = QuantumCircuit(2) + circuit.x(0) + snapshot = {"compact_noise_model": {"errors": [ + {"type": "roerror", "operations": ["measure"], "gate_qubits": [[0]], + "probabilities": [[0., 1.], [1., 0.]]}, + ]}} + probabilities = benchmark_noise([circuit], snapshot) + assert abs(probabilities["calibrated_aer"][0] - 1) < 1e-12 + assert abs(probabilities["readout_off"][0]) < 1e-12 + with pytest.raises(Hold, match="separate approval"): + submission(None, tmp_path, 2048, authorized=False) + + +def test_hardware_analysis_keeps_phases_and_tree_separate(): + cases = pilot() + counts = {} + exact = {} + for case in cases: + name = f"{case.arm}_t{case.time:.1f}" + probabilities = phase_scan( + case.time, case.theta + case.reference_offset, energies=case.energy, mask=case.mask, + ) + exact[name] = probabilities + zeros = round(2048*probabilities[case.quadrant]) + counts[case.id] = {"00": zeros, "01": 2048-zeros} + manifest = { + "case_order": [case.id for case in cases], "cases": [case.record() for case in cases], + "primary": {"signal": "signal_t1.6"}, + } + hardware = {"counts": counts, "job_id": "local-test", "shots_per_circuit": 2048} + rows = summarize(manifest, {"exact": exact, "calibrated_aer": exact}, hardware) + groups = rows["four_phase_groups"] + assert rows["primary_acceptance"]["passes"] and rows["tree_rectangle_contains_origin"] + assert groups["signal_t1.6"]["reference_calibrated_phase"]["relative_phase_rad"] > 0 + assert groups["reversed_t1.6"]["reference_calibrated_phase"]["relative_phase_rad"] < 0 + assert "reference_calibrated_phase" not in groups["matched_detuning_t1.6"] + + +def test_calibration_digest_survives_git_line_ending_conversion(tmp_path): + snapshot = tmp_path / "calibration.json" + snapshot.write_bytes(b'{\r\n "sample": 1\r\n}\r\n') + normalized = calibration_digest(snapshot) + assert normalized != digest(snapshot) + snapshot.write_bytes(snapshot.read_bytes().replace(b"\r\n", b"\n")) + assert calibration_digest(snapshot) == digest(snapshot) == normalized diff --git a/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/tests/test_recovery.py b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/tests/test_recovery.py new file mode 100644 index 00000000..8cb0c704 --- /dev/null +++ b/research/arithmetic_holonomy_rotor/ibm_qpu_01/recovered_q2/tests/test_recovery.py @@ -0,0 +1,114 @@ +"""Safety gates and offline IBM job recovery for the historical #254 code.""" +from __future__ import annotations + +import json +from pathlib import Path +from types import SimpleNamespace + +import pytest + +from experiment import Hold, collect, submission +from offline_replay import ARCHIVE, replay + +ROOT = Path(__file__).resolve().parents[1] + + +def load(name: str): + return json.loads((ARCHIVE / name).read_text(encoding="utf-8")) + + +def test_archived_hardware_analysis_replays_identically(): + receipt = replay() + assert receipt["status"] == "PASS_READ_ONLY" + assert receipt["shots_total"] == 73_728 + assert 38 < receipt["forward_degrees"] < 40 + assert -44 < receipt["reversed_degrees"] < -42 + + +def test_legacy_submission_requires_independent_new_approval(tmp_path, monkeypatch): + for var in ( + "AHR_QPU_ALLOW_LIVE_SUBMISSION", + "AHR_QPU_FREE_PLAN_VERIFIED", + "AHR_QPU_LEGACY_RECOVERY_APPROVED", + "AHR_QPU_APPROVED_MANIFEST_SHA256", + ): + monkeypatch.delenv(var, raising=False) + with pytest.raises(Hold, match="separate approval"): + submission(None, tmp_path, 2048, authorized=False) + with pytest.raises(Hold, match="three explicit YES guards"): + submission(None, tmp_path, 2048, authorized=True) + for var in ( + "AHR_QPU_ALLOW_LIVE_SUBMISSION", + "AHR_QPU_FREE_PLAN_VERIFIED", + "AHR_QPU_LEGACY_RECOVERY_APPROVED", + ): + monkeypatch.setenv(var, "YES") + (tmp_path / "manifest.json").write_text('{"protocol":"test"}', encoding="utf-8") + monkeypatch.setenv("AHR_QPU_APPROVED_MANIFEST_SHA256", "0" * 64) + with pytest.raises(Hold, match="exact manifest SHA256"): + submission(None, tmp_path, 2048, authorized=True) + + +def test_interrupted_hardware_collection_recovers_tag_offline(tmp_path): + manifest = load("manifest.json") + counts = load("hardware_counts.json")["counts"] + protocol = load("q2_protocol.json") + job_id = "dc1vksqnj2vs73dfu0n0" + tag = "ahr-qpu-01-recovery-test" + + for filename, content in ( + ("manifest.json", manifest), + ("q2_protocol.json", protocol), + ("hardware_job.json", { + "tag": tag, + "job_id": None, + "backend": "ibm_fez", + "shots_per_circuit": 2048, + }), + ): + (tmp_path / filename).write_text(json.dumps(content), encoding="utf-8") + + class CountRegister: + def __init__(self, data): + self.data = data + def get_counts(self): + return dict(self.data) + + ordered_pubs = [ + SimpleNamespace(data=SimpleNamespace(out=CountRegister(counts[case]))) + for case in manifest["case_order"] + ] + + class FakeJob: + def job_id(self): + return job_id + def status(self): + return "DONE" + def result(self): + return ordered_pubs + def usage(self): + return 21 + + job = FakeJob() + + class FakeService: + def active_instance(self): + return "open-test" + def instances(self): + return [{"crn": "open-test", "plan": "open", "pricing_type": "free"}] + def usage(self): + return {"usage_remaining_seconds": 515} + def jobs(self, *, job_tags, instance, limit): + assert job_tags == [tag] and instance == "open-test" and limit == 2 + return [job] + def job(self, requested): + assert requested == job_id + return job + + result = collect(FakeService(), tmp_path) + assert result["job_id"] == job_id + assert result["status"] == "DONE" + assert result["counts"] == counts + assert result["primary_acceptance"]["passes"] + assert json.loads((tmp_path / "hardware_job.json").read_text())["job_id"] == job_id + assert json.loads((tmp_path / "hardware_counts.json").read_text())["counts"] == counts