Skip to content

A channel implementation should pass a test on the entire linear map, not only a few input states. Kraus completeness checks trace preservation; Choi positivity checks complete positivity. Together they expose errors that output-state normalization alone cannot detect.

Helpful background. Channel–state duality supplies the conceptual criterion; vectorization fixes the array convention used here.

For operators Ka:Cdin→CdoutK_a:\mathbb C^{d_{\rm in}}\to\mathbb C^{d_{\rm out}},

E(X)=∑aKaXKa†,∑aKa†Ka=Iin.\mathcal E(X)=\sum_a K_a X K_a^\dagger,\qquad \sum_aK_a^\dagger K_a=I_{\rm in}.

The second equation follows by moving Ka†K_a^\dagger around the trace. Define the unnormalized, input-first Choi matrix by

J=∑ij∣i⟩⟨j∣⊗E(∣i⟩⟨j∣).J=\sum_{ij}|i\rangle\langle j|\otimes\mathcal E(|i\rangle\langle j|).

With column stacking, J=∑avec⁡(Ka)vec⁡(Ka)†J=\sum_a\operatorname{vec}(K_a)\operatorname{vec}(K_a)^\dagger. Thus J≥0J\geq0, Tr⁡outJ=Iin\operatorname{Tr}_{\rm out}J=I_{\rm in}, and Tr⁡J=din\operatorname{Tr}J=d_{\rm in}. A normalized Choi state divides this matrix by dind_{\rm in}; its partial trace is then Iin/dinI_{\rm in}/d_{\rm in}. Document which convention is used before comparing files or libraries.

The linked channel–state duality page places the output factor first. Its Choi matrix is related to the input-first matrix here by swapping the two tensor factors, not by complex conjugation. Both conventions express the same map, but their partial-trace axes and array entries differ.

The superoperator is E=∑aKa∗⊗Ka\mathsf E=\sum_a K_a^*\otimes K_a. Conversion between E\mathsf E and JJ is an index reshuffling, not ordinary matrix transposition.

An explicit conversion removes the ambiguity. With input indices a,ba,b and output indices α,β\alpha,\beta,

Jadout+α, bdout+β=Eα+doutβ, a+dinb.J_{a d_{\rm out}+\alpha,\,b d_{\rm out}+\beta} =\mathsf E_{\alpha+d_{\rm out}\beta,\,a+d_{\rm in}b}.

Thus E\mathsf E has shape dout2×din2d_{\rm out}^2\times d_{\rm in}^2, while JJ is square of size dindoutd_{\rm in}d_{\rm out}. Verify conversions on a rectangular channel, such as an isometric embedding from a qubit to a three-level system, as well as on square maps. Swapping dimensions can otherwise pass every shape check.

For 0≤p≤10\leq p\leq1, choose

K0=(1001−p),K1=(0p00).K_0=\begin{pmatrix}1&0\\0&\sqrt{1-p}\end{pmatrix}, \qquad K_1=\begin{pmatrix}0&\sqrt p\\0&0\end{pmatrix}.

Direct multiplication gives

E(ρ)=(ρ00+pρ111−pρ011−pρ10(1−p)ρ11).\mathcal E(\rho)= \begin{pmatrix} \rho_{00}+p\rho_{11}&\sqrt{1-p}\rho_{01}\\ \sqrt{1-p}\rho_{10}&(1-p)\rho_{11} \end{pmatrix}.

In input-first ordering (00,01,10,11)(00,01,10,11), JJ has diagonal entries (1,0,p,1−p)(1,0,p,1-p) and corner entries 1−p\sqrt{1-p}. Its nonzero eigenvalues are 2−p2-p and pp. This single example tests a nonunital channel, complex coherences, and both endpoint limits.

A code test should compare three independent actions: direct Kraus summation, the superoperator applied to column-stacked input, and reconstruction from the Choi matrix,

E(X)=Tr⁡in[(XT⊗I)J].\mathcal E(X)=\operatorname{Tr}_{\rm in}[(X^{\mathsf T}\otimes I)J].

Use a complex input so that replacing the transpose by an adjoint fails visibly.

For F∘E\mathcal F\circ\mathcal E, Kraus operators are FbKaF_bK_a and the superoperator is FE\mathsf F\mathsf E. The reversed product describes a different experiment when operations do not commute.

Measure Hermiticity and negative eigenvalue weight of JJ, as well as the norm of Tr⁡outJ−I\operatorname{Tr}_{\rm out}J-I. Small negative values at roundoff scale can arise during eigendecomposition; a finite negative eigenvalue signals a nonphysical map or invalid reconstruction. Sampling many physical states cannot establish complete positivity.

To compress a redundant Kraus list, diagonalize the positive Choi matrix and reshape λava\sqrt{\lambda_a}v_a into dout×dind_{\rm out}\times d_{\rm in} operators using column order. Dropping small eigenvalues changes the channel and can violate trace preservation. In fact, keeping a subset of these Kraus operators gives ∑a∈keptKa†Ka≤I\sum_{a\in\mathrm{kept}}K_a^\dagger K_a\leq I: the retained map is generally trace-decreasing. Renormalizing its output separately for each input would produce a nonlinear conditional update, not a repaired trace-preserving channel. Report discarded Choi weight and recheck completeness after any repair.

Compose two amplitude-damping channels with probabilities pp and qq. Is their composition another amplitude-damping channel?

Solution

The excited population is multiplied by (1−p)(1−q)(1-p)(1-q), while each coherence is multiplied by its square root. Therefore peff=1−(1−p)(1−q)p_{\rm eff}=1-(1-p)(1-q). This gives a semigroup benchmark when p(t)=1−e−γtp(t)=1-e^{-\gamma t}, and a test of channel multiplication order that should be supplemented with a noncommuting unitary.

  • Choi, M.-D., “Completely positive linear maps on complex matrices,” Linear Algebra and its Applications 10, 285–290 (1975), doi:10.1016/0024-3795(75)90075-0.
  • Watrous, J., The Theory of Quantum Information, Cambridge University Press (2018), author’s text — Choi operators and channel representations.