cirq.decompose_multi_controlled_x

cirq.decompose_multi_controlled_x(controls: List[cirq.Qid], target: cirq.Qid, free_qubits: List[cirq.Qid]) → List[cirq.Operation][source]

Implements action of multi-controlled Pauli X gate.

Result is guaranteed to consist exclusively of 1-qubit, CNOT and CCNOT
gates.
If free_qubits has at least 1 element, result has lengts
O(len(controls)).
Parameters
  • - control qubits. (controls) –

  • - target qubits. (targets) –

  • - qubits which are neither controlled nor target. Can be (free_qubits) – modified by algorithm, but will end up in their initial state.