toqito.matrix_props.trace_norm

Computes the trace norm metric of a density matrix.

Module Contents

toqito.matrix_props.trace_norm.trace_norm(rho)[source]

Compute the trace norm of the state [@Quantiki_TrNorm].

Also computes the operator 1-norm when inputting an operator.

The trace norm (||rho||_1) of a density matrix (rho) is the sum of the singular values of (rho). The singular values are the roots of the eigenvalues of (rho rho^*).

Examples

Consider the following Bell state

[

u = frac{1}{sqrt{2}} left( |00 rangle + |11 rangle right) in mathcal{X}.

]

The corresponding density matrix of (u) may be calculated by:

[
rho = u u^* = begin{pmatrix}

1 & 0 & 0 & 1 \ 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 \ 1 & 0 & 0 & 1

end{pmatrix} in text{D}(mathcal{X}).

]

It can be observed using |toqito⟩ that (||rho||_1 = 1) as follows.

```python exec=”1” source=”above” from toqito.states import bell from toqito.matrix_props import trace_norm

rho = bell(0) @ bell(0).conj().T

print(trace_norm(rho)) ```

Parameters:

rho (numpy.ndarray) – Density operator.

Returns:

The trace norm of rho.

Return type:

float | numpy.floating