Density-matrix execution and Kraus channels
Design document · English reading edition
RFCs record designs and changes. A proposal appearing here does not mean its feature is ready to use. Explore current language support
Status recorded in the original: Proposed
Bound original source · SHA-25619c1dd4b47cff373a0caa34bd876ceff0f7d45b559cadfa95f39af7ae5c1f72a
Reading edition reviewed: 2026-10-02
Purpose and scope
Proposes evolving mixed quantum states with a density matrix distinct from finite-shot trajectories. Exact terminal probabilities and a sampled histogram drawn from them remain separate.
Core design rules
- The distinct
browser-density-matrixtarget is never selected automatically; the full gate plan and channels are resolved before execution. - Custom channels are exact-version
KrausChannel<1>orKrausChannel<2>package exports. - Channel dimensions and trace preservation, plus state Hermiticity, unit trace and positivity, are checked with bounded numerical tolerances.
Example from the original
This example illustrates the design recorded in the original. It is not by itself a claim of executable or stable support; check required options and the current version.
@target("browser-density-matrix");
@seed(42);
density profile relaxation {
after H on q[0] apply amplitude_damping(0.02);
after CNOT on q[0..1]
apply kraus("package.community.noise@1.2.0", "thermal_pair");
}
@density_noise_profile("relaxation");
qreg q[2];
sample 1024 {
H(q[0]);
CNOT(q[0], q[1]);
measure(q[0]);
measure(q[1]);
}Limits and interpretation
- The proposed slice has at most five qubits and terminal Z-basis measurements; mid-circuit measurement, feed-forward and leakage are excluded.
- A valid Kraus channel does not establish an accurate model of a physical device.
Status and implementation boundary
The proposal records approval and implementation gates separately. A merged design alone is not evidence of executable support or production stability.
| Review topic | Information to check |
|---|---|
| Source revision | SHA-256 digest bound to this reading edition |
| Availability | Current capability record and tool options |
| Evidence boundary | Model, size and interpretation limits above |