Skip to main content
KetQat

Appearance

Randomized benchmarking suite (Clifford RB)

Standard, interleaved and simultaneous Clifford RB in one run: error per Clifford, gate error with Magesan bounds, bootstrap CIs, report.

Officially provided by KetQat — method by Knill et al. (2008), Magesan et al. (2011) and others. KetQat prepares, verifies and maintains this product; it does not claim to have invented the method. Read the origin statement.

What it does and who it is for

Runs Clifford randomized benchmarking on one or two simulated qubits, exactly with Stim, as one workflow: standard RB always, interleaved RB when a gate is named, and simultaneous RB (two independent single-qubit sequences driven together, each compared with the same sequence run alone) when a crosstalk rate is given. Every sequence's survival is kept, the decay S(m) = A lambda^m + 1/d is fitted by weighted nonlinear least squares in survival space with the asymptote fixed, and a non-parametric bootstrap over sequences gives 95% intervals for the decay parameter, the error per Clifford, the interleaved gate error and the addressability error. The interleaved gate may carry its own depolarizing rate, so a gate better or worse than the Cliffords around it can be resolved; its error is reported with the systematic bound of Magesan et al. (2012). Because the noise is a known depolarizing model, the analytic expectation of every quantity is reported beside the fit, and the open SDK's linearized fit is shown for comparison. Everything is written to one JSON result and a Markdown report.

For people who want the three RB protocols run consistently on one seed with uncertainties they can quote, as a reference for their own analysis code or for teaching.

This is a KetQat Pro product: it runs locally like every catalog product, from a signed bundle installed with ketqat pro install under a time-limited entitlement. Its implementation is not part of the open SDK.

Use cases

  • Report an error per Clifford with a bootstrap confidence interval and compare it with the analytic value of the noise model
  • Isolate one gate's error by interleaved RB, with the Magesan systematic bound, including a gate noisier or cleaner than the Cliffords
  • Measure addressability (crosstalk) by simultaneous RB with per-qubit intervals

Use it on your computer

This page never runs anything. Copy the commands into your own terminal; the product runs locally.
  1. Install and get the Pro bundle

    Installs the KetQat SDK from commit 2cedabbd814f, the exact version whose product definition this page shows. The SDK is not on PyPI yet, so pip install ketqat alone will not work.

    Terminal
    pip install "ketqat[pro,qec] @ git+https://github.com/ketqat/ketqat-sdk@2cedabbd814fd199b1989c8ceb1e9efa1744c2c0#subdirectory=python" && ketqat pro login && ketqat pro install [email protected]
  2. Run the example

    Save it as example.py and run python example.py. Or use the CLI: ketqat catalog run [email protected].

    Python
    import json
    from ketqat_runner import catalog
    
    record = catalog.run("[email protected]", seed=2026, qubits=1, depolarizing_rate=0.005)
    result = record.result
    interval = result["standard"]["bootstrap"]["error_per_clifford"]
    print(json.dumps({
        "status": record.status,
        "qubits": result["qubits"],
        "fit_conclusive": not result["standard"]["fit"]["inconclusive"],
        "interval_brackets_estimate": interval["lower"] <= result["error_per_clifford"] <= interval["upper"],
        "within_ten_percent_of_analytic": abs(result["error_per_clifford"] - 2 * 0.005 / 3) < 0.1 * (2 * 0.005 / 3),
    }))
    
    Expected output (fields the example must print)
    {
      "qubits": 1,
      "status": "succeeded",
      "fit_conclusive": true,
      "interval_brackets_estimate": true,
      "within_ten_percent_of_analytic": true
    }

    Verified with

    No verification run of this example is recorded in its definition. Pro examples need an entitlement, which the public SDK CI does not have.

  3. Optional: tell us it ran

    ketqat report RUN_ID sends an opt-in usage report: product, version, succeeded/failed, time and SDK version only. It shows you the exact payload first and needs an API token from Settings. Nothing is sent unless you run it.

This is a Pro product

What Pro adds over Free

The open SDK already enumerates the 1- and 2-qubit Clifford groups, builds and samples standard, interleaved and simultaneous RB sequences with Stim, fits the decay by a weighted linearized least squares with a propagated standard error, computes the interleaved gate error with the Magesan systematic bound and the addressability error, and runs standard RB from a manifest (randomized_benchmarking.py, runner.py). Nothing of that moves behind Pro, and this product calls those functions. Pro adds the suite as one catalog run: all three protocols on one seed with every sequence's survival kept, a weighted nonlinear fit in survival space that also handles the noiseless case, bootstrap intervals over sequences for every reported quantity, a separate noise rate for the interleaved gate, cx as an interleaved gate, analytic expectations beside every estimate, and a Markdown report.

Steps after you subscribe

  1. Terminal
    ketqat pro login
  2. Terminal
    ketqat pro install [email protected]
  3. Terminal
    ketqat catalog run [email protected]

ketqat pro login stores a signed entitlement valid for up to 7 days; runs start offline while it is valid. Cancelling stops new Pro runs and updates after it expires. Your results are never deleted, and Free products are unaffected. This is not DRM.

See Pro and subscribe

Inputs and outputs

Inputs

Inputs of Randomized benchmarking suite (Clifford RB)
NameTypeDefaultAllowed valuesDescription
qubitsinteger1enum: 1, 2Qubits benchmarked by the standard and interleaved protocols (the Clifford group is enumerated for 1 or 2).
sequence_lengthsinteger[][1,2,4,8,16,32,64]maxItems: 12; minItems: 3; itemMaximum: 512; itemMinimum: 1; uniqueItems: trueNumbers of random Cliffords per sequence (distinct, at least three).
sequences_per_lengthinteger20maximum: 200; minimum: 2Independent random sequences at every length; the bootstrap resamples these.
depolarizing_ratenumber0.005maximum: 0.5; minimum: 0Probability of DEPOLARIZE1 (one qubit) or DEPOLARIZE2 (two qubits) after every Clifford.
shotsinteger200maximum: 10000; minimum: 1Measurements per sequence.
interleaved_gatestringnullenum: i, x, y, z, h, s, cxGate for interleaved RB, applied to every qubit after each random Clifford; cx (control 0, target 1) needs qubits = 2. null skips interleaved RB.
interleaved_gate_depolarizing_ratenumbernullmaximum: 0.5; minimum: 0Depolarizing probability after the interleaved gate. null uses depolarizing_rate (gate-independent noise).
simultaneous_crosstalk_ratenumbernullmaximum: 0.5; minimum: 0Probability of a correlated DEPOLARIZE2 on the two qubits per step of simultaneous single-qubit RB. null skips simultaneous RB; 0 runs it without crosstalk.

Outputs

Outputs of Randomized benchmarking suite (Clifford RB)
NameTypeDescription
decay_parameternumberFitted lambda of standard RB (null when the fit is inconclusive).
error_per_cliffordnumberr = (d-1)/d (1 - lambda) of standard RB (null when the fit is inconclusive).
standardobjectPer-length survival points, the nonlinear fit, bootstrap intervals, the open SDK's linearized fit and the analytic expectation.
interleavedobjectnull unless requested: points, fit, gate_error with the Magesan systematic bound, gate_error_bootstrap and the analytic expectation.
simultaneousobjectnull unless requested: per qubit the isolated and simultaneous fits, addressability error with a bootstrap interval, the mean and the analytic expectation.
reportstringMarkdown report of every protocol run, with caveats.

Sample result

Not generated in the open SDK: running this product needs a Pro entitlement and bundle, which this repository's CI does not have. Maintainer run of the private bundle (one qubit, p = 0.005, lengths 1 to 64, 20 sequences, 200 shots, seed 2026, Stim 1.16.0): decay parameter 0.99321, error per Clifford 0.003397 with 95% bootstrap interval [0.003221, 0.003579] against the analytic 2p/3 = 0.003333 (0.65 bootstrap sigma away); the open SDK's linearized fit gave 0.003331. With interleaved x at its own rate 0.01 and simultaneous RB at crosstalk 0.01 on the same seed: gate error 0.00703 [0.00644, 0.00749] with systematic bound 0.0104 against the analytic 0.00667, and addressability error 0.005296 against the analytic 0.005298.

Assumptions, scope and limitations

Assumptions

  • Uniformly random Cliffords from the enumerated 1- or 2-qubit Clifford group, inverted exactly from the composed tableau; survival is every qubit measured 0.
  • Gate-independent depolarizing noise after every Clifford (and, in interleaved RB, after the interleaved gate at its own rate); simultaneous RB adds a correlated two-qubit depolarizing channel per step as the crosstalk.
  • The decay model S(m) = A lambda^m + 1/d with the asymptote fixed at the fully depolarized value.

Scope

  • Standard RB on 1 or 2 qubits; interleaved RB with i, x, y, z, h, s (and cx on two qubits); simultaneous RB of two single-qubit sequences.
  • Decay parameter, error per Clifford, interleaved gate error with the Magesan bound, addressability error, each with a 95% bootstrap interval over sequences, and the analytic value for the simulated noise model.

Limitations

  • A simulated depolarizing device: the analytic expectations hold for this noise model only and are not hardware predictions.
  • Bootstrap intervals are statistical; they exclude error from the single-exponential model being wrong, which dominates when gate errors are not gate-independent.
  • With gate-independent noise and the same rate for the interleaved gate, every gate reports the same error by construction; the separate gate rate is what makes interleaved RB diagnostic here.
  • Interleaved RB's systematic bound can be comparable to the estimate; the report then says the gate error is bounded, not resolved.
  • Sequence lengths above the depolarized floor are needed for a fit; a run whose survivals all sit at 1/d is reported as inconclusive.
  • The implementation is delivered as a Pro bundle and is not open source; its validation tests live in the private repository, not here.
  • Tested on macOS and Linux only; Windows is untested.

Environment and resources

Runs
Locally, on your computer
Type
Simulation
Python
>=3.10
Operating systems
Linux, macOS
Resources
Defaults (one qubit, seven lengths to 64, 20 sequences, 200 shots, standard RB only): about 1.5 s on a 2024 Apple-silicon laptop (maintainer measurement). Adding interleaved and simultaneous RB at the defaults takes about 30 s, dominated by circuit construction; two qubits add a 0.3 s Clifford enumeration. sum(sequence_lengths) x sequences_per_length above 500000 is refused before anything runs.
SDK extras
pro, qec
Minimum SDK
0.3.0

Validation

Implemented: works with validation tests, but not every verification condition is met yet.

No validation tests are recorded for this product

Read the limitations above before relying on its results.

Versions and changelog

  1. 1.0.01 Nov 2026currentShown on this page

    • First catalog release.

    Needs SDK 0.3.0 or later with extras: pro, qec.

All product changelogs

Origin, license and credits

KetQat integration of open-source software

Randomized benchmarking is due to Knill et al. (2008) and, in the Clifford-group form with its fidelity decay model, to Magesan, Gambetta and Emerson (2011, 2012); interleaved RB and its systematic bound to Magesan et al. (2012); simultaneous RB and addressability to Gambetta et al. (2012). Circuits are simulated exactly by Stim (Craig Gidney) through the open SDK's Clifford enumeration and sequence builders, and the statistics use NumPy. KetQat wrote the suite workflow: per-sequence collection, the nonlinear fit, the bootstrap, the separate gate rate, the analytic comparison, the report and this catalog entry. KetQat did not invent any of the protocols or bounds.

Upstream software

License of what you receive

LicenseRef-KetQat-Pro — the KetQat Pro license. See Licensing.

Contributors

People credited for this product. KetQat publishes and maintains it; contributors are credited for their work and are not sellers.

  • dorakingx · KetQat maintainer: implementation, validation and catalog entry

How to contribute

References

  1. Emanuel Knill, Dietrich Leibfried, Rolf Reichle, Joe Britton, R. Brad Blakestad, John D. Jost, Chris Langer, Roee Ozeri, Signe Seidelin, David J. Wineland (2008). Randomized benchmarking of quantum gates. Physical Review A 77, 012307.DOI 10.1103/PhysRevA.77.012307arXiv:0707.0963
  2. Easwar Magesan, Jay M. Gambetta, Joseph Emerson (2011). Scalable and robust randomized benchmarking of quantum processes. Physical Review Letters 106, 180504.DOI 10.1103/PhysRevLett.106.180504arXiv:1009.3639
  3. Easwar Magesan, Jay M. Gambetta, Joseph Emerson (2012). Characterizing quantum gates via randomized benchmarking. Physical Review A 85, 042311.DOI 10.1103/PhysRevA.85.042311arXiv:1109.6887
  4. Easwar Magesan, Jay M. Gambetta, Blake R. Johnson, Colm A. Ryan, Jerry M. Chow, Seth T. Merkel, Marcus P. da Silva, George A. Keefe, Mary B. Rothwell, Thomas A. Ohki, Mark B. Ketchen, Matthias Steffen (2012). Efficient measurement of quantum gate error by interleaved randomized benchmarking. Physical Review Letters 109, 080505.DOI 10.1103/PhysRevLett.109.080505arXiv:1203.4550
  5. Jay M. Gambetta, Antonio D. Corcoles, Seth T. Merkel, Blake R. Johnson, John A. Smolin, Jerry M. Chow, Colm A. Ryan, Chad Rigetti, Stefano Poletto, Thomas A. Ohki, Mark B. Ketchen, Matthias Steffen (2012). Characterization of addressability by simultaneous randomized benchmarking. Physical Review Letters 109, 240504.arXiv:1204.6308
  6. Craig Gidney (2021). Stim: a fast stabilizer circuit simulator. Quantum 5, 497.DOI 10.22331/q-2021-07-06-497
  7. Bradley Efron (1979). Bootstrap methods: Another look at the jackknife. The Annals of Statistics 7, 1-26.

Usage

No usage reports yet

Distinct signed-in accounts that chose to send at least one usage report (ketqat report) for this product in the last 90 days. KetQat staff, test and bot accounts are excluded. Reports are opt-in, so this is not a count of all users.

Computed 10 Nov 2026, 17:34 UTC.

Reviews

Not yet rated

Be the first to rate this product after you run it.

Mean of visible reviews. Hidden reviews and reviews by KetQat staff, test and bot accounts are excluded. Pro status gives no extra weight.

Sign in to review this product. One review per person; you can edit it later.

No reviews yet.