Controlled#
- class discopy.quantum.gates.Controlled(name=None, dom=None, cod=None, data=None, *args, **kwargs)[source]#
Bases:
QuantumGate
Abstract class for controled quantum gates.
- Parameters:
controlled (QuantumGate) – Gate to control, e.g.
CX = Controlled(X)
.distance (int, optional) – Number of qubits from the control to the target, default is
0
. If negative, the control is on the right of the target.