Simulating Quantum Channels
This notebook guide specifies a reproducible finite-dimensional calculation for applying and validating quantum channels. The goal is not only to produce noisy density matrices, but to make every representation checkable: Kraus operators, Choi matrices, trace preservation, complete positivity, Bloch-vector action, and limiting cases.
As of this review, no executable notebook under notebooks/density-open-systems/quantum-channels/ is promoted as a reproduced artifact. This page is the admission contract for that notebook family: it states what the notebook should compute, what it should check, and what output is trustworthy enough to cite.
Purpose
Section titled “Purpose”The notebook should demonstrate how to:
- represent density matrices as finite arrays;
- apply channels from Kraus operators;
- build a Choi matrix with a declared convention;
- test trace preservation and complete positivity;
- compare numerical channel action with analytic formulas;
- compose channels without losing conventions;
- diagnose unphysical maps before using them as noise models.
The calculation should stay small enough that every expected result can be checked analytically. Qubit channels are the primary test bed.
Directory Plan
Section titled “Directory Plan”Use a dedicated directory:
notebooks/density-open-systems/quantum-channels/ simulating-quantum-channels.ipynb README.mdThe opening notebook cell or README.md should state:
- Python and package versions;
- basis ordering;
- vectorization convention;
- Choi input-output ordering;
- numerical tolerance;
- random seed, if random states are generated;
- whether all plots are exploratory or accepted outputs.
Mathematical Objects
Section titled “Mathematical Objects”The notebook should represent a density matrix as a Hermitian positive semidefinite matrix with
A channel in Kraus form is
The adjoint channel is
With the output-input Choi convention used by Choi Matrix,
The notebook should explicitly state this convention before any vectorization helper appears.
Baseline Channel Set
Section titled “Baseline Channel Set”Implement at least four channels.
Identity and unitary channels
Section titled “Identity and unitary channels”The identity channel is
A unitary channel is
These are sanity checks: trace, purity, spectrum, and positivity should be preserved exactly up to roundoff.
Dephasing channel
Section titled “Dephasing channel”For real ,
The expected Bloch-vector action is
Use Dephasing Channel as the analytic reference.
Depolarizing channel
Section titled “Depolarizing channel”For a qubit with shrink factor ,
Complete positivity requires
The notebook should test values inside and outside this interval and confirm that the Choi matrix detects the unphysical cases.
Amplitude-damping channel
Section titled “Amplitude-damping channel”For zero-temperature damping with probability ,
The expected action is
Use Amplitude-Damping Channel as the reference for conventions.
Numerical Workflow
Section titled “Numerical Workflow”The notebook should follow a validation-first workflow:
- Define basis ordering and Pauli matrices.
- Define helpers for Hermiticity, trace, eigenvalue positivity, and matrix norms.
- Define channel application from Kraus operators.
- Verify Kraus completeness before applying a channel.
- Build the Choi matrix from basis operators, not from an unexplained reshaping trick.
- Verify Choi positivity and trace-preservation partial trace.
- Apply each channel to a fixed set of test states.
- Compare against analytic matrix-element or Bloch-vector formulas.
- Compose channels and verify the composed channel again.
The first version should not use random states as the only tests. Fixed states make failures easier to diagnose.
Test States
Section titled “Test States”Use a minimal but revealing set:
and
Also test the maximally mixed state . It distinguishes unital channels from nonunital channels: dephasing and depolarizing are unital, but amplitude damping is not.
Validation Checks
Section titled “Validation Checks”The notebook should report pass/fail checks with numerical tolerances.
| Check | Requirement |
|---|---|
| Hermiticity | |
| Trace | $ |
| Positivity | smallest eigenvalue |
| Kraus completeness | |
| Choi positivity | eigenvalues of nonnegative within tolerance |
| Trace preservation | |
| Analytic action | matrix elements match the linked formula page |
| Composition | composition remains CPTP when each factor is CPTP |
Use a tolerance appropriate to double precision, such as for exact formulas, while keeping the tolerance declared in one place.
Expected Output
Section titled “Expected Output”The notebook should produce tables rather than only plots:
- Kraus-completeness residuals for each channel;
- Choi eigenvalues for representative parameters;
- trace and minimum-eigenvalue checks for every output state;
- analytic-versus-numerical residuals;
- Bloch-vector input and output table;
- optional plots of Bloch-vector contraction or affine shift.
Plots are helpful, but the validation table is the evidence.
Parameter Sweeps
Section titled “Parameter Sweeps”Use small parameter grids:
and
The depolarizing value should fail complete positivity for a qubit. Keeping one controlled failure in the notebook is useful: it proves the validation test can catch an invalid channel.
Composition Tests
Section titled “Composition Tests”Channel composition should be implemented explicitly:
The notebook should compare two ways to compute the same composition:
- applying and then to test states;
- constructing composed Kraus operators .
For
the composed channel has Kraus operators
This test catches ordering mistakes.
Reproducibility Metadata
Section titled “Reproducibility Metadata”Record:
- programming language and version;
- NumPy or linear-algebra backend version;
- exact basis ordering;
- vectorization and Choi convention;
- norm used for residuals;
- tolerance values;
- parameter grids;
- random seed if random states are included;
- date and commit identifier when the notebook is promoted.
The calculation should run from a clean kernel without hidden global state. See Notebook Index and Reproducibility Status for the repository-wide policy.
Common Numerical Failures
Section titled “Common Numerical Failures”- Building a Choi matrix with the opposite tensor-factor order and interpreting the wrong partial trace.
- Testing positivity on system states but forgetting complete positivity with a reference system.
- Treating small negative eigenvalues from roundoff the same way as real physical violations.
- Using an amplitude-damping channel with the excited and ground labels swapped.
- Forgetting that amplitude damping is nonunital.
- Composing Kraus operators in the wrong order.
- Reporting only plots, with no residual table.
- Promoting a notebook without a clean-kernel rerun.
Exercises
Section titled “Exercises”Kraus completeness residual
Section titled “Kraus completeness residual”For the amplitude-damping Kraus operators above, compute .
Solution
One has
Adding gives
Unitality test
Section titled “Unitality test”Which baseline channels in this notebook are unital?
Solution
The identity, unitary, dephasing, and depolarizing channels are unital: they map to for a qubit. Amplitude damping is not unital for because
Choi failure for depolarizing noise
Section titled “Choi failure for depolarizing noise”Why should the qubit depolarizing channel with fail the notebook’s complete-positivity test?
Solution
For a qubit depolarizing shrink factor, complete positivity requires
Since , the Choi matrix must have a negative eigenvalue. A correct Choi-positivity test should flag this parameter value as invalid.
Composition order
Section titled “Composition order”If and , what Kraus operators represent ?
Solution
By definition,
Thus the composed Kraus operators are
The order matters: acts first, then .
Cross-Links
Section titled “Cross-Links”- Noise Simulation
- Completely Positive Maps
- Kraus Representation
- Choi Matrix
- Common Noise Channels
- Formula Sheet
- How to Use Computational Notebooks
- Validation Tests
References
Section titled “References”- K. Kraus, States, Effects, and Operations: Fundamental Notions of Quantum Theory, Springer (1983).
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press (2010).
- J. Watrous, The Theory of Quantum Information, Cambridge University Press (2018).
- C. R. Harris et al., “Array programming with NumPy,” Nature 585, 357–362 (2020).
- L. N. Trefethen and D. Bau III, Numerical Linear Algebra, SIAM (1997).