qiskit/tools/qi/qi.py
def __eof_qubit(rho):
    """
    Compute the Entanglement of Formation of a 2-qubit density matrix.

    Args:
        rho ((array_like): (4,4) array_like, input density matrix.

    Returns:
        float: The entanglement of formation.
    """
    c = concurrence(rho)
    c = 0.5 + 0.5 * np.sqrt(1 - c * c)
    return shannon_entropy([c, 1 - c])
def __eof_qubit(rho):
    c = concurrence(rho)
    c = 0.5 + 0.5 * np.sqrt(1 - c * c)
    return shannon_entropy([c, 1 - c])
def __eof_qubit ( rho ) : c = concurrence ( rho ) c = 0.5 + 0.5 * np . sqrt ( 1 - c * c ) return shannon_entropy ( [ c , 1 - c ] )
Compute the Entanglement of Formation of a 2-qubit density matrix.

    Args:
        rho ((array_like): (4,4) array_like, input density matrix.

    Returns:
        float: The entanglement of formation.
Compute the Entanglement of Formation of a 2 - qubit density matrix .