Skip to main content
edited body
Source Link
Martin Vesely
  • 14.9k
  • 4
  • 31
  • 73

Use StateVectorStateVector class to get the state vector. Then convert the StatevectorStatevector into array to do matrix operations.

U = Statevector(result.get_statevector())

 U = Statevector(result.get_statevector())  
U_array = U.data.reshape(-1, 1)
    U_conj_transpose = U_array.conj().T will works  

This would work.

Use StateVector class to get the state vector. convert the Statevector into array to do matrix operations.

U = Statevector(result.get_statevector())

    U_array = U.data.reshape(-1, 1)
    U_conj_transpose = U_array.conj().T will works  

Use StateVector class to get the state vector. Then convert the Statevector into array to do matrix operations.

U = Statevector(result.get_statevector())  
U_array = U.data.reshape(-1, 1)
U_conj_transpose = U_array.conj().T 

This would work.

Source Link

Use StateVector class to get the state vector. convert the Statevector into array to do matrix operations.

U = Statevector(result.get_statevector())

    U_array = U.data.reshape(-1, 1)
    U_conj_transpose = U_array.conj().T will works