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.

RC3XGate.assemble()

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.

RC3XGate.inverse()

Invert this instruction.

RC3XGate.is_parameterized()

Return True .IFF.

RC3XGate.mirror()

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

RC3XGate.power(exponent)

Creates a unitary gate as gate^exponent.

RC3XGate.qasm()

Return a default OpenQASM string for the instruction.

RC3XGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

RC3XGate.to_matrix()

Return a numpy.array for the RC3X gate.