qwz/qwz_utils.py
def distance(state1, state2):
    """Return the quantum distance between state1 and state2.

    Args:
        state1 (np.array): a quantum state
        state2 (np.array): a quantum state
    Returns:
        float: quantum distance between state1 and state2, sqrt(1-abs(<state1|state2>)**2)
    """
    return np.sqrt(abs(1.0 - abs(state1.conjugate().transpose() @ state2).item()**2))
Return the quantum distance between state1 and state2.

    Args:
        state1 (np.array): a quantum state
        state2 (np.array): a quantum state
    Returns:
        float: quantum distance between state1 and state2, sqrt(1-abs(<state1|state2>)**2)
    
Return the quantum distance between state1 and state2.
Return the quantum distance between state1 and state2 .
def distance(state1, state2):
    return np.sqrt(abs(1.0 - abs(state1.conjugate().transpose() @ state2).item()**2))
def distance ( state1 , state2 ) : return np . sqrt ( abs ( 1.0 - abs ( state1 . conjugate ( ) . transpose ( ) @ state2 ) . item ( ) ** 2 ) )
Return the quantum distance between state1 and state2.
Return the quantum distance between state1 and state2 .
"""Return the quantum distance between state1 and state2.

    Args:
        state1 (np.array): a quantum state
        state2 (np.array): a quantum state
    Returns:
        float: quantum distance between state1 and state2, sqrt(1-abs(<state1|state2>)**2)
    """
quantum distance between state1 and state2, sqrt(1-abs()**2)
quantum distance between state1 and state2 sqrt ( 1 - abs () ** 2 )
float
state1
a quantum state
a quantum state
state2
a quantum state
a quantum state