pygsti.tools.internalgates.is_gate_pauli_equivalent_to_this_standard_unitary

pygsti.tools.internalgates.is_gate_pauli_equivalent_to_this_standard_unitary#

is_gate_pauli_equivalent_to_this_standard_unitary(gate_unitary, standard_gate_name)#

Whether a unitary is the standard gate specified by standard_gate_name.

This equivalence is tested up to pre- and post-multiplication by some Pauli and up to a phase, The correspondence between the standard names and unitaries is w.r.t the internally-used gatenames (see internal_gate_unitaries()).

Currently only supported for Clifford gates.

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 and Pauli-multiplication, the unitary specified standard_gate_name. False otherwise.

Return type:

bool