removeGlobalPhase

removeGlobalPhase(D)

Factors out the global phase of the given state by dividing the entire state by the phase of the first component.

Parameters:
  • pure_state : 1darray with length = 2^nQubits

    The state in ket form.

Returns:
  • psi : ndarray with shape = (2^nQubits, 2^nQubits)

    The state with global phase factored out.


Contact

In case you have any further questions about the Python code, you should direct them to Scott Turro or Joey Shallat.