qiskit.extensions.UCRYGate.control¶
- UCRYGate.control(num_ctrl_qubits=1, label=None, ctrl_state=None)¶
Return controlled version of gate. See
ControlledGate
for usage.- Paramètres
num_ctrl_qubits (int) – number of controls to add to gate (default=1)
label (str | None) – optional gate label
ctrl_state (int | str | None) – The control state in decimal or as a bitstring (e.g. “111”). If None, use 2**num_ctrl_qubits-1.
- Renvoie
Controlled version of gate. This default algorithm uses num_ctrl_qubits-1 ancillae qubits so returns a gate of size num_qubits + 2*num_ctrl_qubits - 1.
- Type renvoyé
- Lève
QiskitError – unrecognized mode or invalid ctrl_state