# C3XGate¶

class C3XGate(angle=0.7853981633974483, label=None, ctrl_state=None)[source]

The 3-qubit controlled X gate.

This implementation is based on Page 17 of [1].

References

[1] Barenco et al., 1995. https://arxiv.org/pdf/quant-ph/9503016.pdf

Create a new 3-qubit controlled X gate.

Parameters
• angle (float) – The angle used in the controlled-U1 gates. An angle of π/4 yields the 3-qubit controlled X gate, an angle of π/8 the 3-qubit controlled sqrt(X) gate.

• label (str or None) – An optional label for the gate [Default: None]

• ctrl_state (int or str or None) – control state expressed as integer, string (e.g. ‘110’), or None. If None, use all 1s.

Attributes

 C3XGate.ctrl_state Return the control state of the gate as a decimal integer. C3XGate.decompositions Get the decompositions of the instruction from the SessionEquivalenceLibrary. C3XGate.definition Return definition in terms of other basic gates. C3XGate.label Return gate label C3XGate.num_ctrl_qubits Get number of control qubits. C3XGate.params return instruction params.

Methods

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