iqm.pulse.circuit_operations.get_unitary_from_op

iqm.pulse.circuit_operations.get_unitary_from_op#

iqm.pulse.circuit_operations.get_unitary_from_op(op, table, qubits)#

Unitary matrix representing an operation within the context of the circuit.

First, fetches the unitary corresponding to the correct operation from the QuantumOpTable. If that unitary is a function, gets the matrix by calling the function with values of quantum operation params stored in the operation. Checks whether the size of the unitary is correct. Then, optionally extends that unitary to act on the Hilbert space of the entire circuit.

Parameters:
Returns:

Unitary matrix representing op on the Hilbert space of the circuit.

Return type:

ndarray