Skip to content

Update intersphinx mapping and other URLs pointing to IQP Classic (backport #933) #940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ to solve classification or regression problems respectively. It is also compatib

Qiskit Machine Learning defines a generic interface for neural networks, implemented by two core (derived) primitives:

- **[`EstimatorQNN`](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.neural_networks.EstimatorQNN.html):** Leverages the [`Estimator`](https://docs.quantum.ibm.com/api/qiskit/qiskit.primitives.BaseEstimator) primitive, combining parametrized quantum circuits with quantum mechanical observables. The output is the expected value of the observable.
- **[`EstimatorQNN`](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.neural_networks.EstimatorQNN.html):** Leverages the [`Estimator`](https://quantum.cloud.ibm.com/docs/api/qiskit/1.4/qiskit.primitives.BaseEstimator) primitive, combining parametrized quantum circuits with quantum mechanical observables. The output is the expected value of the observable.

- **[`SamplerQNN`](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.neural_networks.SamplerQNN.html):** Leverages the [`Sampler`](https://docs.quantum.ibm.com/api/qiskit/qiskit.primitives.BaseSampler) primitive, translating bit-string counts into the desired outputs.
- **[`SamplerQNN`](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.neural_networks.SamplerQNN.html):** Leverages the [`Sampler`](https://quantum.cloud.ibm.com/docs/api/qiskit/1.4/qiskit.primitives.BaseSampler) primitive, translating bit-string counts into the desired outputs.

To train and use neural networks, Qiskit Machine Learning provides learning algorithms such as the [`NeuralNetworkClassifier`](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.algorithms.NeuralNetworkClassifier.html#qiskit_machine_learning.algorithms.NeuralNetworkClassifier)
and [`NeuralNetworkRegressor`](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.algorithms.NeuralNetworkRegressor.html#qiskit_machine_learning.algorithms.NeuralNetworkRegressor).
Expand Down Expand Up @@ -102,7 +102,7 @@ For more details on how to do so and much more, follow the instructions in the
> Learning, Qiskit `1.0` or above will be required. If you have a pre-`1.0` version of Qiskit
> installed in your environment (however it was installed), you should upgrade to `1.x` to
> continue using the latest features. You may refer to the
> official [Qiskit 1.0 Migration Guide](https://docs.quantum.ibm.com/api/migration-guides/qiskit-1.0)
> official [Qiskit 1.0 Migration Guide](https://quantum.cloud.ibm.com/docs/migration-guides/qiskit-1.0)
> for detailed instructions and examples on how to upgrade Qiskit.

----------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Qiskit Machine Learning supports one minor version release at a time, both for b
> For example, if the most recent release is `0.7.2`, then the current major release series is `0.x` the current minor
> release is `0.7.x`, with `0.7.2` being the current patch release.

As an additional resource, you can find more details on the release and support schedule of Qiskit in the [documentation](https://docs.quantum.ibm.com/start/install#release-schedule).
As an additional resource, you can find more details on the release and support schedule of Qiskit in the [documentation](https://quantum.cloud.ibm.com/docs/en/open-source/qiskit-sdk-version-strategy).

## Reporting a Vulnerability

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2024.
# (C) Copyright IBM 2021, 2025.
#
# 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 Expand Up @@ -176,7 +176,7 @@
"numpy": ("https://numpy.org/doc/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
"sklearn": ("https://scikit-learn.org/stable", None),
"qiskit": ("https://docs.quantum.ibm.com/api/qiskit", None),
"qiskit": ("https://quantum.cloud.ibm.com/docs/api/qiskit", None),
}

html_context = {"analytics_enabled": True}
Expand Down
8 changes: 4 additions & 4 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Installation
============

Qiskit Machine Learning depends on Qiskit, which has its own
`installation instructions <https://docs.quantum.ibm.com/start/install>`__ detailing
`installation instructions <https://quantum.cloud.ibm.com/docs/guides/install-qiskit>`__ detailing
installation options and its supported environments/platforms. You should refer to
that first. Then the information here can be followed which focuses on the additional installation
specific to Qiskit Machine Learning.
Expand All @@ -21,7 +21,7 @@ See :ref:`optional_installs` for more information.

.. tab-item:: Start locally

The simplest way to get started is to follow the installation guide for Qiskit `here <https://docs.quantum.ibm.com/start/install>`__
The simplest way to get started is to follow the installation guide for Qiskit `here <https://quantum.cloud.ibm.com/docs/guides/install-qiskit>`__

In your virtual environment, where you installed Qiskit, install ``qiskit-machine-learning`` as follows:

Expand All @@ -44,7 +44,7 @@ See :ref:`optional_installs` for more information.

Since Qiskit Machine Learning depends on Qiskit, and its latest changes may require new or changed
features of Qiskit, you should first follow Qiskit's `"Install from source"` instructions
`here <https://docs.quantum.ibm.com/start/install-qiskit-source>`__
`here <https://quantum.cloud.ibm.com/docs/guides/install-qiskit-source>`__

.. raw:: html

Expand Down Expand Up @@ -114,7 +114,7 @@ Migration to Qiskit 1.x
Learning, Qiskit ``1.0`` or above will be required. If you have a pre-``1.0`` version of Qiskit
installed in your environment (however it was installed), you should upgrade to ``1.x`` to
continue using the latest features. You may refer to the
official `Qiskit 1.0 Migration Guide <https://docs.quantum.ibm.com/api/migration-guides/qiskit-1.0>`_
official `Qiskit 1.0 Migration Guide <https://quantum.cloud.ibm.com/docs/migration-guides/qiskit-1.0>`_
for detailed instructions and examples on how to upgrade Qiskit.


Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Quantum Neural Networks (QNNs)
Qiskit Machine Learning defines a generic interface for neural networks, implemented by two core (derived) primitives:

- :class:`~qiskit_machine_learning.neural_networks.EstimatorQNN` leverages the Qiskit
`Estimator <https://docs.quantum.ibm.com/api/qiskit/qiskit.primitives.BaseEstimator>`__ primitive, combining parametrized quantum circuits
`Estimator <https://quantum.cloud.ibm.com/docs/api/qiskit/1.4/qiskit.primitives.BaseEstimator>`__ primitive, combining parametrized quantum circuits
with quantum mechanical observables. The output is the expected value of the observable.

- :class:`~qiskit_machine_learning.neural_networks.SamplerQNN` leverages the Qiskit
`Sampler <https://docs.quantum.ibm.com/api/qiskit/qiskit.primitives.BaseSampler>`__ primitive,
`Sampler <https://quantum.cloud.ibm.com/docs/api/qiskit/1.4/qiskit.primitives.BaseSampler>`__ primitive,
translating bit-string counts into the desired outputs.

To train and use neural networks, Qiskit Machine Learning provides learning algorithms such as the :class:`~qiskit_machine_learning.algorithms.NeuralNetworkClassifier`
Expand Down
18 changes: 9 additions & 9 deletions docs/migration/01_migration_guide_0.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,36 @@ respectively, that implement these two operations:

- Sampler class calculates probabilities or quasi-probabilities of
bitstrings from quantum circuits. The base class is
`qiskit.primitives.BaseSampler <https://docs.quantum.ibm.com/api/qiskit/qiskit.primitives.BaseSampler>`__.
`qiskit.primitives.BaseSampler <https://quantum.cloud.ibm.com/docs/api/qiskit/1.4/qiskit.primitives.BaseSampler>`__.
- Estimator class estimates expectation values of quantum circuits and
observables. The base class is
`qiskit.primitives.BaseEstimator <https://docs.quantum.ibm.com/api/qiskit/qiskit.primitives.BaseEstimator>`__.
`qiskit.primitives.BaseEstimator <https://quantum.cloud.ibm.com/docs/api/qiskit/1.4/qiskit.primitives.BaseEstimator>`__.

Qiskit Terra provides core interfaces and two implementations:

- The reference implementation that is statevector based. This
implementation does require a backend or a simulator, it relies on
the classes from the
`quantum_info <https://docs.quantum.ibm.com/api/qiskit/quantum_info>`__
`quantum_info <https://quantum.cloud.ibm.com/docs/api/qiskit/quantum_info>`__
package.
- The backend based primitives are to support provider/backends that do
not support primitives directly. This implementation requires an
instance of a backend to be passed to a primitive.

More information on the Qiskit Terra primitives can be found in the
`documentation <https://docs.quantum.ibm.com/api/qiskit/primitives>`__.
`documentation <https://quantum.cloud.ibm.com/docs/api/qiskit/primitives>`__.

It is worth mentioning other implementations as well:

- Aer primitives should be used for Aer simulator. They extend
corresponding interfaces from Terra and can be used in the same way
as primitives from Terra. See
`documentation <https://docs.quantum.ibm.com/api/qiskit/0.39/aer_primitives>`__
`documentation <https://quantum.cloud.ibm.com/docs/api/qiskit/0.39/aer_primitives>`__
for more information.
- The runtime primitives to be used with IBM devices. This is an
implementation that is focused on cloud computing on actual hardware.
See
`here <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime>`__.
`here <https://quantum.cloud.ibm.com/docs/api/qiskit-ibm-runtime>`__.

Along with the primitives Terra has some primitive-like algorithms that
are highly useful in QML and used by the new 0.5 functions:
Expand Down Expand Up @@ -240,7 +240,7 @@ none is passed. But here, we create it manually for illustrative
purposes. To create a fidelity instance we pass a sampler. The sampler
is the reference implementation and defines where our quantum circuits
are executed. You may create a sampler instance from
`QiskitRuntimeService <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.QiskitRuntimeService>`__
`QiskitRuntimeService <https://quantum.cloud.ibm.com/docs/en/api/qiskit-ibm-runtime/qiskit-runtime-service>`__
to leverage Qiskit runtime services.

.. code:: ipython3
Expand Down Expand Up @@ -596,7 +596,7 @@ Building a regressor using ``EstimatorQNN``

Create an instance of the reference Estimator. You may create an
estimator instance from
`QiskitRuntimeService <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.QiskitRuntimeService>`__
`QiskitRuntimeService <https://quantum.cloud.ibm.com/docs/en/api/qiskit-ibm-runtime/qiskit-runtime-service>`__
to leverage Qiskit runtime services.

.. code:: ipython3
Expand Down Expand Up @@ -679,7 +679,7 @@ deprecated or pending deprecation:
Qiskit Programs that embed Qiskit Runtime in the algorithmic
interfaces and facilitate usage of algorithms and scripts in the
cloud. You should use
`QiskitRuntimeService <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.QiskitRuntimeService>`__
`QiskitRuntimeService <https://quantum.cloud.ibm.com/docs/en/api/qiskit-ibm-runtime/qiskit-runtime-service>`__
to leverage primitives and runtimes.

.. code:: ipython3
Expand Down
2 changes: 1 addition & 1 deletion docs/migration/02_migration_guide_0.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Overview of the primitives

With the launch of `Qiskit 1.0`, V1 primitives are deprecated and replaced by V2 primitives. Further details
are available in the
`V2 primitives migration guide <https://docs.quantum.ibm.com/migration-guides/v2-primitives>`__.
`V2 primitives migration guide <https://quantum.cloud.ibm.com/docs/migration-guides/v2-primitives>`__.

The Qiskit Machine Learning 0.8 update aligns with the Qiskit IBM Runtime’s Primitive Unified Block (PUB)
requirements and the constraints of the instruction set architecture (ISA) for circuits and observables.
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/01_neural_networks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
"3. [SamplerQNN](https://qiskit-community.github.io/qiskit-machine-learning/locale/fr_FR/stubs/qiskit_machine_learning.neural_networks.SamplerQNN.html): A network based on the samples resulting from measuring a quantum circuit.\n",
"\n",
"\n",
"These implementations are based on the [qiskit primitives](https://docs.quantum.ibm.com/api/qiskit/primitives). The primitives are the entry point to run QNNs on either a simulator or real quantum hardware. Each implementation, `EstimatorQNN` and `SamplerQNN`, takes in an optional instance of its corresponding primitive, which can be any subclass of `BaseEstimator` and `BaseSampler`, respectively.\n",
"These implementations are based on the [qiskit primitives](https://quantum.cloud.ibm.com/docs/api/qiskit/primitives). The primitives are the entry point to run QNNs on either a simulator or real quantum hardware. Each implementation, `EstimatorQNN` and `SamplerQNN`, takes in an optional instance of its corresponding primitive, which can be any subclass of `BaseEstimator` and `BaseSampler`, respectively.\n",
"\n",
"The `qiskit.primitives` module provides a reference implementation for the `Sampler` and `Estimator` classes to run statevector simulations. By default, if no instance is passed to a QNN class, an instance of the corresponding reference primitive (`Sampler` or `Estimator`) is created automatically by the network.\n",
"For more information about primitives please refer to the [primitives documentation](https://docs.quantum.ibm.com/api/qiskit/primitives).\n",
"For more information about primitives please refer to the [primitives documentation](https://quantum.cloud.ibm.com/docs/api/qiskit/primitives).\n",
"\n",
"The `NeuralNetwork` class is the interface for all QNNs available in `qiskit-machine-learning`.\n",
"It exposes a forward and a backward pass that take data samples and trainable weights as input.\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@
"\n",
"Now let's see what we can tune to get even better models.\n",
"\n",
"- The key components are the feature map and the ansatz. You can tweak parameters. In our case, you may change the `reps` parameter that specifies how repetitions of a gate pattern we add to the circuit. Larger values lead to more entanglement operations and more parameters. Thus, the model can be more flexible, but the higher number of parameters also adds complexity, and training such a model usually takes more time. Furthermore, we may end up overfitting the model. You can try the other feature maps and ansatzes available in the [Qiskit circuit library](https://docs.quantum.ibm.com/api/qiskit/circuit_library#n-local-circuits), or you can come up with custom circuits.\n",
"- The key components are the feature map and the ansatz. You can tweak parameters. In our case, you may change the `reps` parameter that specifies how repetitions of a gate pattern we add to the circuit. Larger values lead to more entanglement operations and more parameters. Thus, the model can be more flexible, but the higher number of parameters also adds complexity, and training such a model usually takes more time. Furthermore, we may end up overfitting the model. You can try the other feature maps and ansatzes available in the [Qiskit circuit library](https://quantum.cloud.ibm.com/docs/api/qiskit/circuit_library#n-local-circuits), or you can come up with custom circuits.\n",
"- You may try other optimizers. Qiskit contains a bunch of them. Some of them are gradient-free, others not. If you choose a gradient-based optimizer, e.g., `L_BFGS_B`, expect the training time to increase. Additionally to the objective function, these optimizers must evaluate the gradient with respect to the training parameters, which leads to an increased number of circuit executions per iteration.\n",
"- Another option is to randomly (or deterministically) sample `initial_point` and fit the model several times.\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/03_quantum_kernel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@
"\n",
"We use the [FidelityQuantumKernel](https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.kernels.FidelityQuantumKernel.html) class, and pass two input arguments to its constructor: \n",
"\n",
"1. `feature_map`: in this case, a two-qubit [ZZFeatureMap](https://docs.quantum.ibm.com/api/qiskit/qiskit.circuit.library.ZZFeatureMap).\n",
"1. `feature_map`: in this case, a two-qubit [ZZFeatureMap](https://quantum.cloud.ibm.com/docs/api/qiskit/qiskit.circuit.library.ZZFeatureMap).\n",
"\n",
"2. `fidelity`: in this case, the [ComputeUncompute](https://qiskit-community.github.io/qiskit-algorithms/stubs/qiskit_algorithms.state_fidelities.ComputeUncompute.html) fidelity subroutine that leverages the [Sampler](https://docs.quantum.ibm.com/api/qiskit/qiskit.primitives.Sampler) primitive.\n",
"2. `fidelity`: in this case, the [ComputeUncompute](https://qiskit-community.github.io/qiskit-algorithms/stubs/qiskit_algorithms.state_fidelities.ComputeUncompute.html) fidelity subroutine that leverages the [Sampler](https://quantum.cloud.ibm.com/docs/api/qiskit/1.4/qiskit.primitives.Sampler) primitive.\n",
"\n",
"**NOTE:** If you don't pass a `Sampler` or `Fidelity` instance, then the instances of the reference `Sampler` and `ComputeUncompute` classes (found in `qiskit.primitives`) will be created by default."
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ upgrade:
- New primitive based quantum neural networks :class:`~qiskit_machine_learning.neural_networks.EstimatorQNN`,
:class:`~qiskit_machine_learning.neural_networks.SamplerQNN`, PyTorch connector
:class:`~qiskit_machine_learning.connectors.TorchConnector`, and
`Qiskit Runtime Service <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime>`__
`Qiskit Runtime Service <https://quantum.cloud.ibm.com/docs/api/qiskit-ibm-runtime>`__
to get functionality similar to what the removed `runtime` package provided.