control(num_ctrl_qubits=1, label=None, ctrl_state=None)¶
Return controlled version of gate
num_ctrl_qubits (int) – number of controls to add to gate (default=1)
label (str) – optional gate label
ctrl_state (int or str or None) – The control state in decimal or as a bit string (e.g. ‘1011’). If None, use 2**num_ctrl_qubits-1.
controlled version of gate.
- 반환 형식
QiskitError – Invalid ctrl_state.
ExtensionError – Non-unitary controlled unitary.