MCXVChain

class MCXVChain(num_ctrl_qubits=None, dirty_ancillas=False, label=None, ctrl_state=None)[source]

Implement the multi-controlled X gate using a V-chain of CX gates.

Create new MCX gate.

Attributes

MCXVChain.ctrl_state

Return the control state of the gate as a decimal integer.

MCXVChain.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

MCXVChain.definition

Return definition in terms of other basic gates.

MCXVChain.label

Return gate label

MCXVChain.num_ancilla_qubits

The number of ancilla qubits.

MCXVChain.num_ctrl_qubits

Get number of control qubits.

MCXVChain.params

return instruction params.

Methods

MCXVChain.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

MCXVChain.assemble()

Assemble a QasmQobjInstruction

MCXVChain.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

MCXVChain.c_if(classical, val)

Add classical condition on register classical and value val.

MCXVChain.control([num_ctrl_qubits, label, …])

Return a multi-controlled-X gate with more control lines.

MCXVChain.copy([name])

Copy of the instruction.

MCXVChain.get_num_ancilla_qubits(num_ctrl_qubits)

Get the number of required ancilla qubits.

MCXVChain.inverse()

Invert this gate.

MCXVChain.is_parameterized()

Return True .IFF.

MCXVChain.mirror()

DEPRECATED: use instruction.reverse_ops().

MCXVChain.power(exponent)

Creates a unitary gate as gate^exponent.

MCXVChain.qasm()

Return a default OpenQASM string for the instruction.

MCXVChain.repeat(n)

Creates an instruction with gate repeated n amount of times.

MCXVChain.reverse_ops()

For a composite instruction, reverse the order of sub-instructions.

MCXVChain.to_matrix()

Return a Numpy.array for the gate unitary matrix.