ketOperation

ketOperation(D)

Performs the operation on the pure state.

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

    The state to apply the operation to in ket form.

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

    The operation to apply to the state.

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

    The state with the operation applied.


Contact

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