Quanlse/ErrorMitigation/Utils/Visualization.py
def stateToPolarVector(state) -> List:
    """
    From the state representation to the polar vector representation.

    :param state: state vector or density matrix
    :return: polar vector
    """
    ops = [FixedGate.X.getMatrix(), FixedGate.Y.getMatrix(), FixedGate.Z.getMatrix()]
    return [expect(ops[i], state) for i in range(3)]

    From the state representation to the polar vector representation.

    :param state: state vector or density matrix
    :return: polar vector
    
From the state representation to the polar vector representation.
From the state representation to the polar vector representation .
def stateToPolarVector(state) -> List:
    ops = [FixedGate.X.getMatrix(), FixedGate.Y.getMatrix(), FixedGate.Z.getMatrix()]
    return [expect(ops[i], state) for i in range(3)]
def stateToPolarVector ( state ) -> List : ops = [ FixedGate . X . getMatrix ( ) , FixedGate . Y . getMatrix ( ) , FixedGate . Z . getMatrix ( ) ] return [ expect ( ops [ i ] , state ) for i in range ( 3 ) ]
From the state representation to the polar vector representation.
From the state representation to the polar vector representation .
"""
    From the state representation to the polar vector representation.

    :param state: state vector or density matrix
    :return: polar vector
    """
None
state
state vector or density matrix
state vector or density matrix