Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.circuit.Gate.control

Gate.control(num_ctrl_qubits=1, label=None, ctrl_state=None)[source]

Return controlled version of gate. See ControlledGate for usage.

প্যারামিটার
  • num_ctrl_qubits (int) -- number of controls to add to gate (default=1)

  • label (Optional[str]) -- optional gate label

  • ctrl_state (Union[str, int, None]) -- The control state in decimal or as a bitstring (e.g. '111'). If None, use 2**num_ctrl_qubits-1.

রিটার্নস

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.

রিটার্ন টাইপ

qiskit.circuit.ControlledGate

রেইজেস

QiskitError -- unrecognized mode or invalid ctrl_state