uniqc.calibration.xeb.benchmarker module¶
XEB benchmarker: executes XEB circuits and fits fidelity curves.
The benchmarker integrates readout EM by optionally applying it to raw measurement counts before computing the linear XEB estimator against the noiseless ideal distribution.
- class uniqc.calibration.xeb.benchmarker.XEBenchmarker(adapter, shots=1000, readout_em=None, cache_dir=None, seed=None)[source]¶
Bases:
objectCross-entropy benchmarking engine.
Executes random XEB circuits on a quantum adapter (or dummy backend), computes normalized linear XEB values against the noiseless ideal distribution, and fits an exponential decay model to extract the per-layer fidelity
r.- Parameters:
adapter (QuantumAdapter) – A
QuantumAdapterinstance.shots (int) – Number of measurement shots per circuit.
readout_em (Any) – Optional
ReadoutEMinstance. If provided, raw counts are corrected via readout EM before computing fidelity.cache_dir (str | None) – Directory for saving XEB results.
seed (int | None) – Random seed for circuit generation.
- run_2q(qubit_u, qubit_v, depths, n_circuits=50, entangler_gate='CNOT')[source]¶
Run 2-qubit XEB on a single pair.
- run_parallel_2q(pairs, depth, n_circuits=50, entangler_gates=None)[source]¶
Run parallel 2-qubit XEB across multiple disjoint qubit pairs.
All pairs are executed simultaneously in one multi-qubit circuit, simulating full-chip parallel execution.
- Parameters:
- Returns:
XEBResultwithtype="xeb_2q_parallel".- Return type: