utils

utils.CQMI(rhoABC, dim)
\[I(A:C|B) = I(A:B) + I(B:C) - H(B) - H(ABC)\]
Parameters:
  • rhoABC (numeric) – The density matrix of the tripartite state.

  • dim (numeric) – The dimensions of subsystems A, B and C.

Returns:

\(I(A:C|B)\) conditional mutual information.

Return type:

numeric

utils.KetBra(dim, i, j)

This function produces a matrix for |i><j|.

Parameters:
  • dim (numeric) – Dimension of the matrix.

  • i (numeric) – The index of ket.

  • j (numeric) – The index of bra.

Returns:

The matrix for |i><j|.

Return type:

numeric

utils.SwapGenerator(n, d)

Provide a left shift swap operator \(S\).

\[S(\ket{ijk}\bra{ijk}) = \ket{jki}\bra{ijk}\]
Parameters:
  • n (numeric) – The number of subsystems.

  • d (numeric) – The dimension of each subsystem.

Returns:

The unitary of the swap operator.

Return type:

mat (matrix)

utils.UnitaryChannel(unitary)

UnitaryChannel Provide the Choi matrix of a unitary channel

Parameters:

unitary (numeric) – The unitary matrix.

Returns:

The Choi matrix of the unitary channel.

Return type:

numeric