pygsti.tools.internalgates.is_gate_this_standard_unitary#
- is_gate_this_standard_unitary(gate_unitary, standard_gate_name)#
Whether a unitary is, up to a phase, the standard gate specified by the name standard_gate_name.
The correspondence between the standard names and unitaries is w.r.t the internally-used gatenames (see internal_gate_unitaries()). For example, one use of this function is to check whether some gate specified by a user with the name ‘Ghadamard’ is the Hadamard gate, denoted internally by ‘H’.
- Parameters:
gate_unitary (complex np.array) – The unitary to test.
standard_gate_name (str) – The standard gatename to check whether the unitary gate_unitary is (e.g., ‘CNOT’).
- Returns:
True if the gate_unitary is, up to phase, the unitary specified standard_gate_name. False otherwise.
- Return type:
bool