UnitaryMatrix.get_statevector

UnitaryMatrix.get_statevector(in_state)[source]

Calculate the output state after applying this unitary to in_state.

Parameters:

in_state (StateLike) – The input state to apply self to.

Returns:

The output state.

Return type:

StateVector

Raises:

ValueError – If the state’s dimension doesn’t match the unitary’s dimension.