Skip to content

Commit

Permalink
improve gate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
1ucian0 committed Aug 16, 2023
1 parent d1836a9 commit a504bb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qiskit/circuit/gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ def control(
"""Return controlled version of gate. See :class:`.ControlledGate` for usage.
Args:
num_ctrl_qubits: number of controls to add to gate (default:: 1)
num_ctrl_qubits: number of controls to add to gate (default: ``1``)
label: optional gate label
ctrl_state: The control state in decimal or as a bitstring
(e.g. ``'111'``). If None, use 2**``num_ctrl_qubits``-1.
(e.g. ``'111'``). If ``None``, use ``2**num_ctrl_qubits-1``.
Returns:
qiskit.circuit.ControlledGate: Controlled version of gate. This default algorithm
uses ``num_ctrl_qubits``-1 ancilla qubits so returns a gate of size
``num_qubits`` + 2``*num_ctrl_qubits`` - 1.
uses ``num_ctrl_qubits-1`` ancilla qubits so returns a gate of size
``num_qubits + 2*num_ctrl_qubits - 1``.
Raises:
QiskitError: unrecognized mode or invalid ctrl_state
Expand Down

0 comments on commit a504bb0

Please sign in to comment.