toqito.state_props.log_negativity ================================= .. py:module:: toqito.state_props.log_negativity .. autoapi-nested-parse:: Calculates the logarithmic negativity property of a quantum state. Module Contents --------------- .. py:function:: log_negativity(rho, dim = None) Compute the log-negativity of a bipartite quantum state [@WikiNeg]. 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). .. rubric:: Examples Example of the log-negativity of density matrix of Bell state. ```python exec="1" source="above" from toqito.states import bell from toqito.state_props import log_negativity rho = bell(0) @ bell(0).conj().T print(log_negativity(rho)) ``` !!!See Also [negativity()][toqito.state_props.negativity.negativity] :raises ValueError: If the input matrix is not a density matrix. :param rho: A density matrix of a pure state vector. :param dim: The default has both subsystems of equal dimension. :returns: A positive value that corresponds to the logarithmic negativity of \(\rho\).