def commutes_with_single_qubit_gate(self, gate: SingleQubitCliffordGate) -> bool:
        """Tests if the two circuits would be equivalent up to global phase:
        --self--gate-- and --gate--self--"""
        self_then_gate = self.clifford_tableau.then(gate.clifford_tableau)
        gate_then_self = gate.clifford_tableau.then(self.clifford_tableau)
        return self_then_gate == gate_then_self
Tests if the two circuits would be equivalent up to global phase:
        --self--gate-- and --gate--self--
cirq-core/cirq/ops/clifford_gate.py