The simplified Toffoli gate, also referred to as Margolus gate.
The simplified Toffoli gate implements the Toffoli gate up to relative phases. This implementation requires three CX gates which is the minimal amount possible, as shown in https://arxiv.org/abs/quant-ph/0312225. 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 dashed box of Fig. 3.
Create a new simplified CCX gate.
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
Return definition in terms of other basic gates.
Return gate label
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.
RCCXGate.control([num_ctrl_qubits, label, …])
Return controlled version of gate.
Copy of the instruction.
Invert this instruction.
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 simplified CCX gate.