Skip to content

Commit d4537c1

Browse files
mergify[bot]Cryorisjakelishman
authored
Fix doc format in circuit library (Qiskit#14988) (Qiskit#14992)
* fix references * consistent circuit lib * remove dangling "Create new thing" from inits * Apply suggestions from code review * more headers done right * review comments - consistent indentation - missed some boldfaces - fix R,U,U3 argument docs * tackle the U docs * missed some ** --------- (cherry picked from commit d6a1706) Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: Jake Lishman <[email protected]>
1 parent 8481789 commit d4537c1

File tree

90 files changed

+852
-753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+852
-753
lines changed

qiskit/circuit/gate.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ def __init__(
3232
params: list,
3333
label: str | None = None,
3434
) -> None:
35-
"""Create a new gate.
36-
35+
"""
3736
Args:
38-
name: The Qobj name of the gate.
37+
name: The name of the gate.
3938
num_qubits: The number of qubits the gate acts on.
4039
params: A list of parameters.
4140
label: An optional label for the gate.

qiskit/circuit/instruction.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class Instruction(Operation):
5858
_standard_gate = None
5959

6060
def __init__(self, name, num_qubits, num_clbits, params, label=None):
61-
"""Create a new instruction.
62-
61+
"""
6362
.. deprecated:: 1.3
6463
The parameters ``duration`` and ``unit`` are deprecated since
6564
Qiskit 1.3, and they will be removed in 2.0 or later.

qiskit/circuit/library/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,8 @@
770770
:class:`~qiskit.circuit.library.CXGate`,
771771
and :class:`~qiskit.circuit.library.CCXGate` (Toffoli) gates.
772772
773-
**Reference:**
773+
References:
774+
774775
Maslov, D. and Dueck, G. W. and Miller, D. M.,
775776
Techniques for the synthesis of reversible Toffoli networks, 2007
776777
http://dx.doi.org/10.1145/1278349.1278355

qiskit/circuit/library/arithmetic/adders/cdkm_ripple_carry_adder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class CDKMRippleCarryAdder(Adder):
9090
:class:`.FullAdderGate`: A generic inplace adder, with a carry-in bit. This
9191
is functionally equivalent to ``kind="full"``.
9292
93-
**References:**
93+
References:
9494
9595
[1] Cuccaro et al., A new quantum ripple-carry addition circuit, 2004.
9696
`arXiv:quant-ph/0410184 <https://arxiv.org/pdf/quant-ph/0410184.pdf>`_

qiskit/circuit/library/arithmetic/adders/draper_qft_adder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class DraperQFTAdder(Adder):
5757
:class:`.AdderGate`: A generic inplace adder. This
5858
is functionally equivalent to ``kind="half"``.
5959
60-
**References:**
60+
References:
6161
6262
[1] T. G. Draper, Addition on a Quantum Computer, 2000.
6363
`arXiv:quant-ph/0008033 <https://arxiv.org/pdf/quant-ph/0008033.pdf>`_

qiskit/circuit/library/arithmetic/adders/vbe_ripple_carry_adder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class VBERippleCarryAdder(Adder):
6666
:class:`.FullAdderGate`: A generic inplace adder, with a carry-in bit. This
6767
is functionally equivalent to ``kind="full"``.
6868
69-
**References:**
69+
References:
7070
7171
[1] Vedral et al., Quantum Networks for Elementary Arithmetic Operations, 1995.
7272
`arXiv:quant-ph/9511018 <https://arxiv.org/pdf/quant-ph/9511018.pdf>`_

qiskit/circuit/library/arithmetic/functional_pauli_rotations.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ class FunctionalPauliRotations(BlueprintCircuit, ABC):
2525
def __init__(
2626
self, num_state_qubits: Optional[int] = None, basis: str = "Y", name: str = "F"
2727
) -> None:
28-
r"""Create a new functional Pauli rotation circuit.
29-
28+
r"""
3029
Args:
3130
num_state_qubits: The number of qubits representing the state :math:`|x\rangle`.
3231
basis: The kind of Pauli rotation to use. Must be 'X', 'Y' or 'Z'.

qiskit/circuit/library/arithmetic/integer_comparator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def __init__(
4747
geq: bool = True,
4848
name: str = "cmp",
4949
) -> None:
50-
"""Create a new fixed value comparator circuit.
51-
50+
"""
5251
Args:
5352
num_state_qubits: Number of state qubits. If this is set it will determine the number
5453
of qubits required for the circuit.

qiskit/circuit/library/arithmetic/linear_amplitude_function.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,11 @@ class LinearAmplitudeFunction(QuantumCircuit):
6969
7070
References:
7171
72-
[1]: Woerner, S., & Egger, D. J. (2018).
73-
Quantum Risk Analysis.
74-
`arXiv:1806.06893 <http://arxiv.org/abs/1806.06893>`_
72+
[1] Woerner, S., & Egger, D. J. (2018). Quantum Risk Analysis.
73+
`arXiv:1806.06893 <http://arxiv.org/abs/1806.06893>`_
7574
76-
[2]: Gacon, J., Zoufal, C., & Woerner, S. (2020).
77-
Quantum-Enhanced Simulation-Based Optimization.
78-
`arXiv:2005.10780 <http://arxiv.org/abs/2005.10780>`_
75+
[2] Gacon, J., Zoufal, C., & Woerner, S. (2020). Quantum-Enhanced Simulation-Based Optimization.
76+
`arXiv:2005.10780 <http://arxiv.org/abs/2005.10780>`_
7977
"""
8078

8179
@deprecate_func(
@@ -229,13 +227,13 @@ class LinearAmplitudeFunctionGate(Gate):
229227
230228
References:
231229
232-
[1]: Woerner, S., & Egger, D. J. (2018).
233-
Quantum Risk Analysis.
234-
`arXiv:1806.06893 <http://arxiv.org/abs/1806.06893>`_
230+
[1] Woerner, S., & Egger, D. J. (2018).
231+
Quantum Risk Analysis.
232+
`arXiv:1806.06893 <http://arxiv.org/abs/1806.06893>`_
235233
236-
[2]: Gacon, J., Zoufal, C., & Woerner, S. (2020).
237-
Quantum-Enhanced Simulation-Based Optimization.
238-
`arXiv:2005.10780 <http://arxiv.org/abs/2005.10780>`_
234+
[2] Gacon, J., Zoufal, C., & Woerner, S. (2020).
235+
Quantum-Enhanced Simulation-Based Optimization.
236+
`arXiv:2005.10780 <http://arxiv.org/abs/2005.10780>`_
239237
"""
240238

241239
def __init__(

qiskit/circuit/library/arithmetic/linear_pauli_rotations.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ def __init__(
5858
basis: str = "Y",
5959
name: str = "LinRot",
6060
) -> None:
61-
r"""Create a new linear rotation circuit.
62-
61+
r"""
6362
Args:
6463
num_state_qubits: The number of qubits representing the state :math:`|x\rangle`.
6564
slope: The slope of the controlled rotation.

0 commit comments

Comments
 (0)