iqm.benchmarks.utils_shadows.get_negativity

Contents

iqm.benchmarks.utils_shadows.get_negativity#

iqm.benchmarks.utils_shadows.get_negativity(rho: ndarray, NA: int, NB: 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 NA = NB = 1. For more qubits per subsystems it is merely a necessary condition. :param rho: Density matrix. :type rho: np.ndarray :param NA: Number of qubits for subsystem A. :type NA: int :param NB: Number of qubits for subsystem B. :type NB: int

Returns:

the negativity of the input density matrix.

Return type:

float

Parameters:
  • rho (ndarray) –

  • NA (int) –

  • NB (int) –