MCXRecursive(num_ctrl_qubits=None, label=None, ctrl_state=None)¶
Implement the multi-controlled X gate using recursion.
Using a single ancilla qubit, the multi-controlled X gate is recursively split onto four sub-registers. This is done until we reach the 3- or 4-controlled X gate since for these we have a concrete implementation that do not require ancillas.
Create new MCX gate.
Return the control state of the gate as a decimal integer.
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
Return definition in terms of other basic gates.
Return gate label
The number of ancilla qubits.
Get number of control qubits.
return instruction params.
Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
Validation and handling of the arguments and its relationship.
Add classical condition on register classical and value val.
Return a multi-controlled-X gate with more control lines.
Copy of the instruction.
Get the number of required ancilla qubits.
Invert this gate.
Return True .IFF.
DEPRECATED: use instruction.reverse_ops().
Creates a unitary gate as gate^exponent.
Return a default OpenQASM string for the instruction.
Creates an instruction with gate repeated n amount of times.
For a composite instruction, reverse the order of sub-instructions.
Return a Numpy.array for the gate unitary matrix.