Use this file to discover all available pages before exploring further.
View on GitHub
Open this notebook in GitHub to run it yourself
The multi-control-X applies X gate to one target qubit bit only if the logical AND of all control qubits is satisfied.The multi-control-X function incorporates numerous implementations for the multi-control-X gate,
each with a different depth and number of auxiliary qubits.These implementations generically outperform the Gray-code, V-chain and recursive implementations of Ref. [1],
as well as the relative-phase Toffoli implementation of Ref. [2].Given a sufficient number of auxiliary qubits, some implementations allow for logarithmic depth and linear CX-count.The synthesis process selects the appropriate implementation depending on the defined constraints.Operator: controlArguments:
ctrl: Union[QBit, QArray[QBit]]
stmt_block: QCallable
Operator control takes a qubit array of length one or more as ctrl, and applies the stmt_block operand if all qubits are in the 1 state