def _pass_single_clifford_gate_over( pauli_map: Dict[raw_types.Qid, pauli_gates.Pauli], gate: clifford_gate.SingleQubitCliffordGate, qubit: 'cirq.Qid', after_to_before: bool = False) -> bool: if qubit not in pauli_map: return False if not after_to_before: gate **= -1 pauli, inv = gate.transform(pauli_map[qubit]) pauli_map[qubit] = pauli return inv
def _pass_single_clifford_gate_over(pauli_map: Dict[raw_types.QubitId, Pauli], gate: SingleQubitCliffordGate, qubit: raw_types.QubitId, after_to_before: bool = False) -> bool: if qubit not in pauli_map: return False if not after_to_before: gate = gate.inverse() pauli, inv = gate.transform(pauli_map[qubit]) pauli_map[qubit] = pauli return inv