partial_trace

Function partial_trace 

Source
pub fn partial_trace(
    rho: &Array2<Complex64>,
    dim_traced: usize,
    trace_first: bool,
) -> Result<Array2<Complex64>, QuantumInfoError>
Expand description

Compute the partial trace of a bipartite density matrix.

§Arguments

  • rho - Bipartite density matrix of dimension dim_A × dim_B
  • dim_traced - Dimension of the subsystem to trace out
  • trace_first - If true, trace out the first subsystem; otherwise trace out the second

§Returns

The reduced density matrix