Skip to content

Commit

Permalink
Remove references from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Oct 23, 2023
1 parent a2e81cf commit 2a96ff0
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 48 deletions.
6 changes: 0 additions & 6 deletions docs/apidoc/algorithms.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/apidoc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ Deprecated Modules
.. toctree::
:maxdepth: 1

algorithms
opflow
14 changes: 7 additions & 7 deletions docs/migration_guides/algorithms_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Algorithms Migration Guide
TL;DR
=====

The :mod:`qiskit.algorithms` module has been fully refactored to use the :mod:`~qiskit.primitives`, for circuit execution, instead of the :class:`~qiskit.utils.QuantumInstance`, which is now deprecated.
The ``qiskit.algorithms`` module has been fully refactored to use the :mod:`~qiskit.primitives`, for circuit execution, instead of the :class:`~qiskit.utils.QuantumInstance`, which is now deprecated.

There have been **3 types of refactoring**:

Expand All @@ -15,7 +15,7 @@ There have been **3 types of refactoring**:
.. attention::

**Careful with import paths!!** The legacy algorithms are still importable directly from
:mod:`qiskit.algorithms`. Until the legacy imports are removed, this convenience import is not available
``qiskit.algorithms``. Until the legacy imports are removed, this convenience import is not available
for the refactored algorithms. Thus, to import the refactored algorithms you must always
**specify the full import path** (e.g., ``from qiskit.algorithms.eigensolvers import VQD``)

Expand All @@ -31,7 +31,7 @@ There have been **3 types of refactoring**:
- `Phase Estimators`_


3. Algorithms that were deprecated and are now removed entirely from :mod:`qiskit.algorithms`. These are algorithms that do not currently serve
3. Algorithms that were deprecated and are now removed entirely from ``qiskit.algorithms``. These are algorithms that do not currently serve
as building blocks for applications. Their main value is educational, and as such, will be kept as tutorials
in the qiskit textbook. You can consult the tutorials in the following links:

Expand All @@ -40,18 +40,18 @@ There have been **3 types of refactoring**:


The remainder of this migration guide will focus on the algorithms with migration alternatives within
:mod:`qiskit.algorithms`, that is, those under refactoring types 1 and 2.
``qiskit.algorithms``, that is, those under refactoring types 1 and 2.

Background
==========

*Back to* `TL;DR`_

The :mod:`qiskit.algorithms` module was originally built on top of the :mod:`qiskit.opflow` library and the
The ``qiskit.algorithms`` module was originally built on top of the :mod:`qiskit.opflow` library and the
:class:`~qiskit.utils.QuantumInstance` utility. The development of the :mod:`~qiskit.primitives`
introduced a higher-level execution paradigm, with the ``Estimator`` for computation of
expectation values for observables, and ``Sampler`` for executing circuits and returning probability
distributions. These tools allowed to refactor the :mod:`qiskit.algorithms` module, and deprecate both
distributions. These tools allowed to refactor the ``qiskit.algorithms`` module, and deprecate both
:mod:`qiskit.opflow` and :class:`~qiskit.utils.QuantumInstance`.

.. attention::
Expand All @@ -75,7 +75,7 @@ How to choose a primitive configuration for your algorithm
*Back to* `TL;DR`_

The classes in
:mod:`qiskit.algorithms` are initialized with any implementation of :class:`qiskit.primitive.BaseSampler` or class:`qiskit.primitive.BaseEstimator`.
``qiskit.algorithms`` are initialized with any implementation of :class:`qiskit.primitive.BaseSampler` or class:`qiskit.primitive.BaseEstimator`.

Once the kind of primitive is known, you can choose between the primitive implementations that better adjust to your case. For example:

Expand Down
4 changes: 2 additions & 2 deletions docs/migration_guides/opflow_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ are used "under the hood" in the original code:
- :class:`~qiskit.quantum_info.Operator`

* - :class:`~qiskit.opflow.primitive_ops.PauliOp`
- :class:`~qiskit.quantum_info.Pauli`. For direct compatibility with classes in :mod:`qiskit.algorithms`,
- :class:`~qiskit.quantum_info.Pauli`. For direct compatibility with classes in ``qiskit.algorithms``,
wrap in :class:`~qiskit.quantum_info.SparsePauliOp`.

* - :class:`~qiskit.opflow.primitive_ops.PauliSumOp`
Expand Down Expand Up @@ -1410,7 +1410,7 @@ Gradients

The opflow :mod:`~qiskit.opflow.gradients` framework has been replaced by the new :mod:`qiskit.algorithms.gradients`
module. The new gradients are **primitive-based subroutines** commonly used by algorithms and applications, which
can also be executed in a standalone manner. For this reason, they now reside under :mod:`qiskit.algorithms`.
can also be executed in a standalone manner. For this reason, they now reside under ``qiskit.algorithms``.

The former gradient framework contained base classes, converters and derivatives. The "derivatives"
followed a factory design pattern, where different methods could be provided via string identifiers
Expand Down
3 changes: 1 addition & 2 deletions qiskit/primitives/backend_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ class BackendEstimator(BaseEstimator[PrimitiveJob[EstimatorResult]]):
(or :class:`~.BackendV1`) object in the :class:`~.BaseEstimator` API. It
facilitates using backends that do not provide a native
:class:`~.BaseEstimator` implementation in places that work with
:class:`~.BaseEstimator`, such as algorithms in :mod:`qiskit.algorithms`
including :class:`~.qiskit.algorithms.minimum_eigensolvers.VQE`. However,
:class:`~.BaseEstimator`. However,
if you're using a provider that has a native implementation of
:class:`~.BaseEstimator`, it is a better choice to leverage that native
implementation as it will likely include additional optimizations and be
Expand Down
3 changes: 1 addition & 2 deletions qiskit/primitives/backend_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class BackendSampler(BaseSampler[PrimitiveJob[SamplerResult]]):
any measurement mitigation, it just computes the probability distribution
from the counts. It facilitates using backends that do not provide a
native :class:`~.BaseSampler` implementation in places that work with
:class:`~.BaseSampler`, such as algorithms in :mod:`qiskit.algorithms`
including :class:`~.qiskit.algorithms.minimum_eigensolvers.SamplingVQE`.
:class:`~.BaseSampler`.
However, if you're using a provider that has a native implementation of
:class:`~.BaseSampler`, it is a better choice to leverage that native
implementation as it will likely include additional optimizations and be
Expand Down
6 changes: 3 additions & 3 deletions qiskit/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@
backend. It also provides the :meth:`~qiskit.providers.BackendV2.run` method which can
run the :class:`~qiskit.circuit.QuantumCircuit` objects and/or
:class:`~qiskit.pulse.Schedule` objects. This enables users and other Qiskit
APIs, such as :func:`~qiskit.execute_function.execute` and higher level algorithms in
:mod:`qiskit.algorithms`, to get results from executing circuits on devices in a standard
APIs, such as :func:`~qiskit.execute_function.execute` to get results from
executing circuits on devices in a standard
fashion regardless of how the backend is implemented. At a high level the basic
steps for writing a provider are:
Expand Down Expand Up @@ -635,7 +635,7 @@ def status(self):
provider-specific :class:`~.Sampler` implementation that leverages the
``M3Mitigation`` class internally to run the circuits and return
quasi-probabilities directly from mthree in the result. Doing this would
enable algorithms from :mod:`qiskit.algorithms` to get the best results with
enable algorithms to get the best results with
mitigation applied directly from your backends. You can refer to the
documentation in :mod:`qiskit.primitives` on how to write custom
implementations. Also the built-in implementations: :class:`~.Sampler`,
Expand Down
2 changes: 1 addition & 1 deletion qiskit/transpiler/synthesis/aqc/aqc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
# (C) Copyright IBM 2022, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down
2 changes: 1 addition & 1 deletion qiskit/transpiler/synthesis/aqc/aqc_plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
# (C) Copyright IBM 2021, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down
5 changes: 2 additions & 3 deletions qiskit/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@
A QuantumInstance holds the Qiskit `backend` as well as a number of compile and
runtime parameters controlling circuit compilation and execution. Quantum
:mod:`algorithms <qiskit.algorithms>`
are run on a device or simulator by passing a QuantumInstance setup with the desired
backend etc.
algorithms are run on a device or simulator by passing a QuantumInstance setup
with the desired backend etc.
Optional Dependency Checkers (:mod:`qiskit.utils.optionals`)
Expand Down
2 changes: 1 addition & 1 deletion qiskit/utils/mitigation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
From these calibrations, it is possible to correct the average results
of another experiment of interest. These tools are intended for use solely
with the :class:`~qiskit.utils.QuantumInstance` class as part of
:mod:`qiskit.algorithms` and :mod:`qiskit.opflow`.
:mod:`qiskit.opflow`.
.. autosummary::
:toctree: ../stubs/
Expand Down
4 changes: 2 additions & 2 deletions releasenotes/notes/0.17/prepare-0.17-2ab9429b69e1d25c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
prelude: |
The Qiskit Terra 0.17.0 includes many new features and bug fixes. The major
new feature for this release is the introduction of the
:mod:`qiskit.algorithms` and :mod:`qiskit.opflow` modules which were
``qiskit.algorithms`` and :mod:`qiskit.opflow` modules which were
migrated and adapted from the :mod:`qiskit.aqua` project.
features:
- |
A new module :mod:`qiskit.algorithms` has been introduced. This module
A new module ``qiskit.algorithms`` has been introduced. This module
contains functionality equivalent to what has previously been
provided by the :mod:`qiskit.aqua.algorithms` module (which is now
deprecated) and provides the building blocks for constructing quantum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ upgrade:
was done because of the wide use of the
:class:`~qiskit.circuit.library.PhaseOracle` (which depends on
having tweedledum installed) with several algorithms
from :mod:`qiskit.algorithms`.
from ``qiskit.algorithms``.
- |
The optional extra ``full-featured-simulators`` which could previously used
to install ``qiskit-aer`` with something like
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ features:
on backends with measurement errors.
Readout mitigator classes have two main methods:
* :meth:`~.BaseReadoutMitigator.expectation_value` which computes an
mitigated expectation value and standard error of a diagonal operator from
a noisy :class:`~qiskit.result.Counts` object.
Expand All @@ -17,7 +17,7 @@ features:
mitigated :class:`~qiskit.result.QuasiDistribution`, including standard
error, from a noisy counts object.
Note that currently the :mod:`qiskit.algorithms` module and the
Note that currently the ``qiskit.algorithms`` module and the
:class:`~qiskit.utils.QuantumInstance` class still use the legacy mitigators
migrated from Qiskit Ignis in :mod:`qiskit.utils.mitigation`. It is planned
to upgrade the module to use the new mitigator classes and deprecate the legacy
Expand All @@ -26,12 +26,12 @@ features:
Added the :class:`~qiskit.result.LocalReadoutMitigator` class for
performing measurement readout error mitigation of local measurement
errors. Local measuerment errors are those that are described by a
tensor-product of single-qubit measurement errors.
tensor-product of single-qubit measurement errors.
This class can be initialized with a list of :math:`N` single-qubit of
measurement error assignment matrices or from a backend using the readout
error information in the backend properties.
Mitigation is implemented using local assignment-matrix inversion which has
complexity of :math:`O(2^N)` for :math:`N`-qubit mitigation of
:class:`~qiskit.result.QuasiDistribution` and expectation values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ upgrade:
fixes:
- |
The :class:`~.AmplitudeAmplifier` is now correctly available from the root
:mod:`qiskit.algorithms` module directly. Previously it was not included
``qiskit.algorithms`` module directly. Previously it was not included
in the re-exported classes off the root module and was only accessible
from ``qiskit.algorithms.amplitude_amplifiers``.
Fixed `#7751 <https://github.com/Qiskit/qiskit-terra/pull/7752>`__.
2 changes: 1 addition & 1 deletion releasenotes/notes/0.22/adapt-vqe-0f71234cb6ec92f8.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
features:
- |
Added a new algorithm class, :class:`~.AdaptVQE` to :mod:`qiskit.algorithms`
Added a new algorithm class, :class:`~.AdaptVQE` to ``qiskit.algorithms``
This algorithm uses a :class:`qiskit.algorithms.minimum_eigensolvers.VQE`
in combination with a pool of operators from which to build out an
:class:`qiskit.circuit.library.EvolvedOperatorAnsatz` adaptively.
Expand Down
2 changes: 1 addition & 1 deletion releasenotes/notes/0.22/prepare-0.22-118e15de86d36072.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ prelude: |
Additionally, :class:`~.BackendV2` backends can now optionally set
custom default plugins to use for the scheduling and translation stages.
* Updated algorithm implementations in :mod:`qiskit.algorithms` that leverage
* Updated algorithm implementations in ``qiskit.algorithms`` that leverage
the :mod:`~.primitives` classes that implement the :class:`~.BaseSampler` and
:class:`~.BaseEstimator`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
features:
- |
Added the :class:`~.PVQD` class to the time evolution framework in :mod:`qiskit.algorithms`.
Added the :class:`~.PVQD` class to the time evolution framework in ``qiskit.algorithms``.
This class implements the projected Variational Quantum Dynamics (p-VQD) algorithm
`Barison et al. <https://quantum-journal.org/papers/q-2021-07-28-512/>`_.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ upgrade:
- |
The deprecated modules ``factorizers`` and ``linear_solvers``, containing
``HHL`` and ``Shor`` have been removed from
:mod:`qiskit.algorithms`. These functionalities
``qiskit.algorithms``. These functionalities
were originally deprecated as part of the 0.22.0 release (released on
October 13, 2022). You can access the code through the Qiskit Textbook instead:
`Linear Solvers (HHL) <https://learn.qiskit.org/course/ch-applications/solving-linear-systems-of-equations-using-hhl-and-its-qiskit-implementation>`_ ,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
deprecations:
- |
The :mod:`qiskit.algorithms` module has been deprecated and will be removed
The ``qiskit.algorithms`` module has been deprecated and will be removed
in a future release. It has been superseded by a new standalone library
``qiskit-algorithms`` which can be found on PyPi or on Github here:
https://github.com/qiskit-community/qiskit-algorithms
The :mod:`qiskit.algorithms` will continue to work as before and bug fixes
The ``qiskit.algorithms`` module will continue to work as before and bug fixes
will be made to module until its future removal, but active development
of new features has moved to the new package.
If you're relying on :mod:`qiskit.algorithms` you should update your
If you're relying on ``qiskit.algorithms`` you should update your
requirements to also include ``qiskit-algorithms`` and update the imports
from ``qiskit.algorithms`` to ``qiskit_algorithms``. Please note that this
new package does not include already deprecated algorithms code, including
``opflow`` and ``QuantumInstance``-based algorithms. If you have not yet
migrated from ``QuantumInstance``-based to primitives-based algorithms,
you should follow the migration guidelines in https://qisk.it/algo_migration.
The decision to migrate the :mod:`~.algorithms` module to a
The decision to migrate the ``qiskit.algorithms`` module to a
separate package was made to clarify the purpose Qiskit and
make a distinction between the tools and libraries built on top of it.
Expand Down
3 changes: 2 additions & 1 deletion test/python/transpiler/aqc/test_aqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
from functools import partial

import unittest
from test.python.transpiler.aqc.sample_data import ORIGINAL_CIRCUIT, INITIAL_THETAS

import numpy as np
from scipy.optimize import minimize

from test.python.transpiler.aqc.sample_data import ORIGINAL_CIRCUIT, INITIAL_THETAS
from qiskit.quantum_info import Operator
from qiskit.test import QiskitTestCase
from qiskit.transpiler.synthesis.aqc.aqc import AQC
Expand Down
2 changes: 1 addition & 1 deletion test/python/transpiler/aqc/test_aqc_plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
# (C) Copyright IBM 2021, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down

0 comments on commit 2a96ff0

Please sign in to comment.