apply_choi_matrix_2_state

forest.benchmarking.operator_tools.apply_superoperator.apply_choi_matrix_2_state(choi: numpy.ndarray, state: numpy.ndarray) → numpy.ndarray

Apply a quantum channel, specified by a Choi matrix (using the column stacking convention), to a state.

The Choi matrix is a dim**2 by dim**2 matrix and the state rho is a dim by dim matrix. The output state is

\[\rho_{out} = Tr_{A_{in}}[(\rho^T \otimes Id) \rm{Choi\_matrix} ],\]

where \(^T\) denotes transposition and \(Tr_{A_{in}}\) is the partial trace over input Hilbert space \(H_{A_{in}}\)

The Choi matrix representing a process mapping

\[\rho_{in} \in H_{A_{in}} \rightarrow \rho_{out} \in H_{B_{out}}\]

is regarded as an operator on the space \(H_{A_{in}} \otimes H_{B_{out}}\).

Parameters:
  • choi – a dim**2 by dim**2 matrix
  • state – A dim by dim ndarray which is the density matrix for the state
Returns:

a dim by dim matrix.