Quantum Information · State analysis
Quantum state measures
Entropies, purity, fidelity, trace distance, mutual information, concurrence and negativity for a preset or your own state.
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.
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.
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.
pip install "ketqat[pro,qinfo] @ git+https://github.com/ketqat/ketqat-sdk@2cedabbd814fd199b1989c8ceb1e9efa1744c2c0#subdirectory=python" && ketqat pro login && ketqat pro install [email protected]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.
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"]}))
{
"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.
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
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.
ketqat pro loginketqat pro install [email protected]ketqat catalog run [email protected] --param kraus_file=path/to/kraus_file.npyketqat 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.
| Name | Type | Default | Allowed values | Description |
|---|---|---|---|---|
| kraus_file | path | required | fileExtensions: .npy, .json | Kraus operators: .npy array of shape (k, d, d), or .json {"kraus": [{"real": ..., "imag": ...}, ...]}. d must be 2, 4 or 8. |
| target_unitary_file | path | null | fileExtensions: .npy, .json | Target unitary (d x d) in the same formats. null means the identity. |
| report_format | string | json | enum: json, markdown | json returns the metrics only; markdown also returns a Markdown report in the result. |
| tolerance | number | 1e-8 | maximum: 0.001; exclusiveMinimum: 0 | Tolerance for the CPTP checks. |
| Name | Type | Description |
|---|---|---|
| cptp | object | completely_positive, trace_preserving, min_choi_eigenvalue and the trace-preservation deviation. |
| choi_matrix | object | The normalised Choi matrix (real and imaginary parts). |
| pauli_transfer_matrix | object | The Pauli transfer matrix. |
| average_gate_fidelity | number | Average gate fidelity to the target unitary. |
| entanglement_fidelity | number | Entanglement (process) fidelity to the target unitary. |
| unitarity | number | Unitarity of the channel composed with the inverse target. |
| diamond_distance | object | Exact value for Pauli error channels; otherwise lower and upper bounds, with the method used. |
| report | string | Markdown report when report_format is markdown. |
Not generated in the open SDK: running this product needs a Pro entitlement and bundle, which this repository's CI does not have.
No validation tests are recorded for this product
Read the limitations above before relying on its results.1.0.029 Oct 2026currentShown on this page
Needs SDK 0.3.0 or later with extras: pro, qinfo.
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.
LicenseRef-KetQat-Pro — the KetQat Pro license. See Licensing.
People credited for this product. KetQat publishes and maintains it; contributors are credited for their work and are not sellers.
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.
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.