MCXGrayCode
class qiskit.circuit.library.MCXGrayCode(num_ctrl_qubits=None, label=None, ctrl_state=None, *, _base_label=None)
Bases: MCXGate
Implement the multi-controlled X gate using the Gray code.
This delegates the implementation to the MCU1 gate, since .
Create new MCX gate.
Methods
Parameters
inverse
inverse(annotated=False)
Invert this gate. The MCX is its own inverse.
Parameters
annotated (bool) – when set to True
, this is typically used to return an AnnotatedOperation
with an inverse modifier set instead of a concrete Gate
. However, for this class this argument is ignored as this gate is self-inverse.
Returns
inverse gate (self-inverse).
Return type