# RC3XGate¶

class RC3XGate(label=None)[source]

The simplified 3-controlled Toffoli gate.

The simplified Toffoli gate implements the Toffoli gate up to relative phases. Note, that the simplified Toffoli is not equivalent to the Toffoli. But can be used in places where the Toffoli gate is uncomputed again.

This concrete implementation is from https://arxiv.org/abs/1508.03273, the complete circuit of Fig. 4.

Create a new RC3X gate.

Attributes

 RC3XGate.decompositions Get the decompositions of the instruction from the SessionEquivalenceLibrary. RC3XGate.definition Return definition in terms of other basic gates. RC3XGate.label Return gate label RC3XGate.params return instruction params.

Methods

 RC3XGate.add_decomposition(decomposition) Add a decomposition of the instruction to the SessionEquivalenceLibrary. Assemble a QasmQobjInstruction RC3XGate.broadcast_arguments(qargs, cargs) Validation and handling of the arguments and its relationship. RC3XGate.c_if(classical, val) Add classical condition on register classical and value val. RC3XGate.control([num_ctrl_qubits, label, …]) Return controlled version of gate. RC3XGate.copy([name]) Copy of the instruction. Invert this instruction. Return True .IFF. DEPRECATED: use instruction.reverse_ops(). RC3XGate.power(exponent) 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 RC3X gate.