Skip to main content
KetQat

Appearance

Quantum channel analysis

From Kraus operators: Choi matrix, CPTP check, Pauli transfer matrix, gate fidelities, unitarity and diamond distance in one report.

Officially provided by KetQat — method by Nielsen and Chuang (2010), Choi (1975) 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

Characterises a quantum channel given by its Kraus operators. It builds the Choi matrix and checks complete positivity and trace preservation, computes the Pauli transfer matrix, the average gate fidelity and entanglement fidelity against a target unitary (identity by default), and the unitarity of the noise. It reports the diamond distance to the target exactly when the error channel is a Pauli channel, and lower and upper bounds otherwise. Everything is written to one JSON result and, optionally, a Markdown report.

For people characterising gates or noise models on one to three qubits who want the standard channel metrics computed consistently and reported together.

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

  • Check that a noise model written as Kraus operators is a valid CPTP channel
  • Report average gate fidelity, entanglement fidelity and unitarity of an implemented gate against its target
  • Bound the worst-case (diamond-norm) error of a channel

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,qinfo] @ 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] --param kraus_file=path/to/kraus_file.npy.

    Python
    import json
    import numpy as np
    from ketqat_runner import catalog
    
    gamma = 0.1
    kraus = np.array([[[1, 0], [0, np.sqrt(1 - gamma)]], [[0, np.sqrt(gamma)], [0, 0]]], dtype=complex)
    np.save("amplitude_damping.npy", kraus)
    record = catalog.run("[email protected]", kraus_file="amplitude_damping.npy")
    print(json.dumps({"status": record.status, "trace_preserving": record.result["cptp"]["trace_preserving"]}))
    
    Expected output (fields the example must print)
    {
      "status": "succeeded",
      "trace_preserving": 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 converts between process-tomography representations (Pauli transfer matrix and Choi matrix, in process_tomography.py) and computes state measures such as fidelity and trace distance (the free quantum-state-measures product). Pro adds the integrated channel workflow: CPTP checks from Kraus operators, average gate and entanglement fidelity, unitarity, exact diamond distance for Pauli channels with bounds otherwise, and a single JSON/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] --param kraus_file=path/to/kraus_file.npy

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 Quantum channel analysis
NameTypeDefaultAllowed valuesDescription
kraus_filepathrequiredfileExtensions: .npy, .jsonKraus operators: .npy array of shape (k, d, d), or .json {"kraus": [{"real": ..., "imag": ...}, ...]}. d must be 2, 4 or 8.
target_unitary_filepathnullfileExtensions: .npy, .jsonTarget unitary (d x d) in the same formats. null means the identity.
report_formatstringjsonenum: json, markdownjson returns the metrics only; markdown also returns a Markdown report in the result.
tolerancenumber1e-8maximum: 0.001; exclusiveMinimum: 0Tolerance for the CPTP checks.

Outputs

Outputs of Quantum channel analysis
NameTypeDescription
cptpobjectcompletely_positive, trace_preserving, min_choi_eigenvalue and the trace-preservation deviation.
choi_matrixobjectThe normalised Choi matrix (real and imaginary parts).
pauli_transfer_matrixobjectThe Pauli transfer matrix.
average_gate_fidelitynumberAverage gate fidelity to the target unitary.
entanglement_fidelitynumberEntanglement (process) fidelity to the target unitary.
unitaritynumberUnitarity of the channel composed with the inverse target.
diamond_distanceobjectExact value for Pauli error channels; otherwise lower and upper bounds, with the method used.
reportstringMarkdown report when report_format is markdown.

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.

Assumptions, scope and limitations

Assumptions

  • The channel is given exactly by its Kraus operators on one to three qubits.
  • Fidelities are measured against a unitary target (identity by default).

Scope

  • Channels on dimension 2, 4 or 8.
  • Exact diamond distance only when the error channel (target inverse composed with the channel) is a Pauli channel; bounds otherwise.

Limitations

  • For non-Pauli error channels only lower and upper bounds on the diamond distance are reported, not the exact value.
  • Input is the channel itself; estimating a channel from measurement data is not included (the open SDK's process_tomography.py covers single-qubit reconstruction).
  • Dense matrices: limited to three qubits.
  • The implementation is delivered as a Pro bundle and is not open source; its validation tests are not in this public repository.

Environment and resources

Runs
Locally, on your computer
Type
Analysis
Python
>=3.10
Operating systems
Linux, macOS
Resources
One to three qubits: well under a second on a laptop.
SDK extras
pro, qinfo
Minimum SDK
0.3.0

Validation

Experimental: works, but validation is incomplete. Read the limitations before relying on results.

No validation tests are recorded for this product

Read the limitations above before relying on its results.

Versions and changelog

  1. 1.0.029 Oct 2026currentShown on this page

    • First catalog release.

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

All product changelogs

Origin, license and credits

KetQat implementation of published methods

The Choi-Jamiolkowski representation (Choi 1975), the average gate fidelity formula (Nielsen 2002), unitarity (Wallman et al. 2015) and the diamond norm (Kitaev; computable by semidefinite programming, Watrous 2009) are established results by their authors. KetQat wrote this implementation and its report format. KetQat did not invent any of the metrics.

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. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press.DOI 10.1017/CBO9780511976667
  2. Man-Duen Choi (1975). Completely positive linear maps on complex matrices. Linear Algebra and its Applications 10, 285-290.
  3. Michael A. Nielsen (2002). A simple formula for the average gate fidelity of a quantum dynamical operation. Physics Letters A 303, 249-252.arXiv:quant-ph/0205035
  4. Joel Wallman, Chris Granade, Robin Harper, Steven T. Flammia (2015). Estimating the coherence of noise. New Journal of Physics 17, 113020.arXiv:1503.07865
  5. John Watrous (2009). Semidefinite programs for completely bounded norms. Theory of Computing 5, 217-238.arXiv:0901.4709

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.