Quanlse/Utils/Bloch.py
def rho2Coordinate(rho: np.ndarray) -> list:
    """
    Convert a density matrix to the list of Cartesian coordinates.

    :param rho: The density matrix.
    :return: The list of Cartesian coordinates for given density matrix.
    """

    x1 = 2 * rho[0][1].real
    x2 = 2 * rho[1][0].imag
    x3 = (rho[0][0] - rho[1][1]).real

    return [x1, x2, x3]

    Convert a density matrix to the list of Cartesian coordinates.

    :param rho: The density matrix.
    :return: The list of Cartesian coordinates for given density matrix.
    
Convert a density matrix to the list of Cartesian coordinates.
Convert a density matrix to the list of Cartesian coordinates .
def rho2Coordinate(rho: np.ndarray) -> list:
    x1 = 2 * rho[0][1].real
    x2 = 2 * rho[1][0].imag
    x3 = (rho[0][0] - rho[1][1]).real
    return [x1, x2, x3]
def rho2Coordinate ( rho : np . ndarray ) -> list : x1 = 2 * rho [ 0 ] [ 1 ] . real x2 = 2 * rho [ 1 ] [ 0 ] . imag x3 = ( rho [ 0 ] [ 0 ] - rho [ 1 ] [ 1 ] ) . real return [ x1 , x2 , x3 ]
Convert a density matrix to the list of Cartesian coordinates.
Convert a density matrix to the list of Cartesian coordinates .
"""
    Convert a density matrix to the list of Cartesian coordinates.

    :param rho: The density matrix.
    :return: The list of Cartesian coordinates for given density matrix.
    """
The list of Cartesian coordinates for given density matrix.
The list of Cartesian coordinates for given density matrix .
rho
np.ndarray
The density matrix.
The density matrix .