Controlled#
- class discopy.quantum.gates.Controlled(name=None, dom=None, cod=None, data=None, *args, **kwargs)[source]#
Bases:
QuantumGateAbstract 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.(Controlled(CX.l (>>> circuit =)
distance=3)
Controlled(Controlled(CZ.l (... >>)
distance=2)
distance=-1))
circuit.draw( (>>>)
wire_labels=False (...)
:param : :param … doctest=”docs/_static/quantum/long-controlled.svg”): :param .. image:: /_static/quantum/long-controlled.svg: :align: center