utils¶
- utils.CQMI(rhoABC, dim)¶
- \[I(A:C|B) = I(A:B) + I(B:C) - H(B) - H(ABC)\]
- utils.SwapGenerator(n, d)¶
Provide a left shift swap operator \(S\).
\[S(\ket{ijk}\bra{ijk}) = \ket{jki}\bra{ijk}\]
- utils.UnitaryChannel(unitary)¶
UnitaryChannel Provide the Choi matrix of a unitary channel.
\[J_{\mathcal{U}} = d\,(\mathbb{I}\otimes U)\,|\Phi_d\rangle\langle\Phi_d|\, (\mathbb{I}\otimes U^\dagger),\]where \(|\Phi_d\rangle = \tfrac{1}{\sqrt{d}}\sum_{i=0}^{d-1} |i\rangle\otimes|i\rangle\) is the maximally entangled state and \(d\) is the input (and output) dimension.
- Parameters:¶
unitary (
numeric
) – A \(d\times d\) unitary matrix \(U\). (Assumed unitary; no validation performed.)- Returns:¶
Choi matrix \(J_{\mathcal{U}} \in \mathbb{C}^{d^2 \times d^2}\) of the unitary channel \(\mathcal{U}(\cdot)=U(\cdot)U^\dagger\).
- Return type:¶
numeric
Note
Uses the (unnormalized) Choi–Jamiołkowski representation consistent with the project convention (factor \(d\) included).