matrix_props.trace_norm¶
Computes the trace norm metric of a density matrix.
Functions¶
|
Compute the trace norm of the state [1]. |
Module Contents¶
- matrix_props.trace_norm.trace_norm(rho)¶
Compute the trace norm of the state [1].
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:
\[\begin{split}\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}).\end{split}\]It can be observed using
toqito
that \(||\rho||_1 = 1\) as follows.>>> from toqito.states import bell >>> from toqito.matrix_props import trace_norm >>> rho = bell(0) @ bell(0).conj().T >>> trace_norm(rho) np.float64(0.9999999999999999)
References
- Parameters:
rho (numpy.ndarray) – Density operator.
- Returns:
The trace norm of
rho
.- Return type:
float