Skip to content

Commit

Permalink
Fix bad Sphinx syntax in several release notes and in API documentait…
Browse files Browse the repository at this point in the history
…on (backport #12604) (#12703)

* Fix bad Sphinx syntax in several release notes and in API documentaiton (#12604)

* Fix ' into `

* More typos on release notes and on API documentation

* change `self.filter` for `Schedule.filter`

* change `Schedule` -> `ScheduleBlock` in its `filter()` reference

(cherry picked from commit 05d5b98)

# Conflicts:
#	releasenotes/notes/1.1/pauli-apply-layout-cdcbc1bce724a150.yaml
#	releasenotes/notes/outcome_bitstring_target_for_probabilities_dict-e53f524d115bbcfc.yaml

* Fix merge conflicts

* Fix conflict

---------

Co-authored-by: Guillermo Abad López <109400222+GuillermoAbadLopez@users.noreply.github.com>
Co-authored-by: Elena Peña Tapia <epenatap@gmail.com>
Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
  • Loading branch information
4 people committed Jul 2, 2024
1 parent c8aa1a5 commit 6d8a870
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions qiskit/pulse/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def children(self) -> tuple[tuple[int, "ScheduleComponent"], ...]:
Notes:
Nested schedules are returned as-is. If you want to collect only instructions,
use py:meth:`~Schedule.instructions` instead.
use :py:meth:`~Schedule.instructions` instead.
Returns:
A tuple, where each element is a two-tuple containing the initial
Expand Down Expand Up @@ -490,7 +490,7 @@ def exclude(
) -> "Schedule":
"""Return a ``Schedule`` with only the instructions from this Schedule *failing*
at least one of the provided filters.
This method is the complement of py:meth:`~self.filter`, so that::
This method is the complement of :py:meth:`~Schedule.filter`, so that::
self.filter(args) | self.exclude(args) == self
Expand Down Expand Up @@ -1309,7 +1309,7 @@ def exclude(
):
"""Return a new ``ScheduleBlock`` with only the instructions from this ``ScheduleBlock``
*failing* at least one of the provided filters.
This method is the complement of py:meth:`~self.filter`, so that::
This method is the complement of :py:meth:`~ScheduleBlock.filter`, so that::
self.filter(args) + self.exclude(args) == self in terms of instructions included.
Expand Down
10 changes: 5 additions & 5 deletions releasenotes/notes/1.1/pauli-apply-layout-cdcbc1bce724a150.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
features_quantum_info:
- |
Added a new :meth:`.Pauli.apply_layout` that is equivalent to the
:meth:`.SparsePauliOp.apply_layout`. This method is
used to apply a :class:`~.TranspileLayout` layout from the transpiler to a :class:`~.Pauli`
Added a new :meth:`~.Pauli.apply_layout` method that is equivalent to
:meth:`~.SparsePauliOp.apply_layout`. This method is used to apply
a :class:`~.TranspileLayout` layout from the transpiler to a :class:`~.Pauli`
observable that was built for an input circuit. This enables working with
:class:`~.BaseEstimator` / :class:`~.BaseEstimatorV2` implementations and
:class:`~.BaseEstimator` / :class:`~.BaseEstimatorV2` implementations and
local transpilation when the input is of type :class:`~.Pauli`. For example:
.. code-block:: python
Expand All @@ -30,4 +30,4 @@ features_quantum_info:
:meth:`~.BaseEstimator.run`. Transpilation expands the original
circuit from 2 to 7 qubits (the size of ``backend``) and permutes its layout,
which is then applied to ``H1`` using :meth:`~.Pauli.apply_layout`
to reflect the transformations performed by ``pm.run()``.
to reflect the transformations performed by ``pm.run()``.

0 comments on commit 6d8a870

Please sign in to comment.