iqm.benchmarks.utils_shadows.get_negativity#
- iqm.benchmarks.utils_shadows.get_negativity(rho: ndarray, n_qubits_a: int, n_qubits_b: int) float#
Computes the negativity of a given density matrix.
Note that a negativity >0 is only a necessary and sufficient condition for entanglement if n_qubits_a = n_qubits_b = 1. For more qubits per subsystems it is merely a necessary condition.