toqito.state_props.log_negativity

toqito.state_props.log_negativity(rho, dim=None)[source]

Compute the log-negativity of a bipartite quantum state [WikLogNeg].

The log-negativity of a subsystem can be defined in terms of a density matrix \(\rho\):

\[E_\mathcal{N}(\rho) \equiv \text{log}_2\left( ||\rho^{\Gamma_A}||_1 \right).\]

Calculate the log-negativity of the quantum state \(\rho\), assuming that the two subsystems on which \(\rho\) acts are of equal dimension (if the local dimensions are unequal, specify them in the optional dim argument).

Examples

Example of the log-negativity of density matrix of Bell state.

>>> from toqito.states import bell
>>> from toqito.state_props import log_negativity
>>> rho = bell(0) * bell(0).conj().T
>>> log_negativity(rho)
0.9999999999999997

See also

negativity

References

[WikLogNeg]

Wikipedia page for negativity (quantum mechanics): https://en.wikipedia.org/wiki/Negativity_(quantum_mechanics)

Raises:

ValueError – If the input matrix is not a density matrix.

Parameters:
  • rho – A density matrix of a pure state vector.

  • dim – The default has both subsystems of equal dimension.

Returns:

A positive value that corresponds to the logarithmic negativity of \(\rho\).