Skip to content

Commit

Permalink
small doc improvements (backport #12553) (#12555)
Browse files Browse the repository at this point in the history
* small doc improvements (#12553)

* small doc improvements

* Update qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py

Co-authored-by: Jake Lishman <jake@binhbar.com>

---------

Co-authored-by: Jake Lishman <jake@binhbar.com>
(cherry picked from commit 8d2144c)

# Conflicts:
#	qiskit/transpiler/preset_passmanagers/__init__.py

* Apply suggestions from code review

---------

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent 76803d5 commit 749c6c4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qiskit/dagcircuit/dagcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def remove_qubits(self, *qubits):

def remove_qregs(self, *qregs):
"""
Remove classical registers from the circuit, leaving underlying bits
Remove quantum registers from the circuit, leaving underlying bits
in place.
Raises:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SparsePauliOp(LinearOp):
:class:`~qiskit.quantum_info.Operator` in terms of N-qubit
:class:`~qiskit.quantum_info.PauliList` and complex coefficients.
It can be used for performing operator arithmetic for hundred of qubits
It can be used for performing operator arithmetic for hundreds of qubits
if the number of non-zero Pauli basis terms is sufficiently small.
The Pauli basis components are stored as a
Expand Down
28 changes: 27 additions & 1 deletion qiskit/transpiler/preset_passmanagers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,34 @@ def generate_preset_pass_manager(
This function is used to quickly generate a preset pass manager. A preset pass
manager are the default pass managers used by the :func:`~.transpile`
function. This function provides a convenient and simple method to construct
a standalone :class:`~.PassManager` object that mirrors what the transpile
a standalone :class:`~.PassManager` object that mirrors what the :func:`~.transpile`
function internally builds and uses.
The target constraints for the pass manager construction can be specified through a :class:`.Target`
instance, a :class:`.BackendV1` or :class:`.BackendV2` instance, or via loose constraints
(``basis_gates``, ``inst_map``, ``coupling_map``, ``backend_properties``, ``instruction_durations``,
``dt`` or ``timing_constraints``).
The order of priorities for target constraints works as follows: if a ``target``
input is provided, it will take priority over any ``backend`` input or loose constraints.
If a ``backend`` is provided together with any loose constraint
from the list above, the loose constraint will take priority over the corresponding backend
constraint. This behavior is independent of whether the ``backend`` instance is of type
:class:`.BackendV1` or :class:`.BackendV2`, as summarized in the table below. The first column
in the table summarizes the potential user-provided constraints, and each cell shows whether
the priority is assigned to that specific constraint input or another input
(`target`/`backend(V1)`/`backend(V2)`).
============================ ========= ======================== =======================
User Provided target backend(V1) backend(V2)
============================ ========= ======================== =======================
**basis_gates** target basis_gates basis_gates
**coupling_map** target coupling_map coupling_map
**instruction_durations** target instruction_durations instruction_durations
**inst_map** target inst_map inst_map
**dt** target dt dt
**timing_constraints** target timing_constraints timing_constraints
**backend_properties** target backend_properties backend_properties
============================ ========= ======================== =======================
Args:
optimization_level (int): The optimization level to generate a
Expand Down

0 comments on commit 749c6c4

Please sign in to comment.