Skip to content

Commit

Permalink
Update docs links for new structures (Qiskit#1839)
Browse files Browse the repository at this point in the history
* Update docs links for new structures

* lint line length

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
  • Loading branch information
Eric-Arellano and kt474 authored Aug 6, 2024
1 parent 3a9b08e commit 5eaf6ff
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ There are several different options you can specify when calling the primitives.

### Primitive versions

Version 2 of the primitives is introduced by `qiskit-ibm-runtime` release 0.21.0. If you are using V1 primitives, refer to [Migrate to the V2 primitives](https://docs.quantum.ibm.com/api/migration-guides/v2-primitives) on how to migratie to V2 primitives. The examples below all use V2 primitives.
Version 2 of the primitives is introduced by `qiskit-ibm-runtime` release 0.21.0. If you are using V1 primitives, refer to [Migrate to the V2 primitives](https://docs.quantum.ibm.com/migration-guides/v2-primitives) on how to migratie to V2 primitives. The examples below all use V2 primitives.

### Sampler

Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/base_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def __init__(
"The Sampler and Estimator V1 primitives have been deprecated",
"0.23.0",
"Please use the V2 Primitives. See the `V2 migration guide "
"<https://docs.quantum.ibm.com/api/migration-guides/v2-primitives>`_. for more details",
"<https://docs.quantum.ibm.com/migration-guides/v2-primitives>`_. for more details",
3,
)

Expand Down
4 changes: 2 additions & 2 deletions qiskit_ibm_runtime/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Batch(Session):
print(f"Counts for the first PUB: {pub_result.data.cr.get_counts()}")
For more details, check the "`Run jobs in a batch
<https://docs.quantum.ibm.com/run/run-jobs-batch>`_" tutorial.
<https://docs.quantum.ibm.com/guides/run-jobs-batch>`_" tutorial.
"""

def __init__(
Expand All @@ -95,7 +95,7 @@ def __init__(
forcibly closed. Can be specified as seconds (int) or a string like "2h 30m 40s".
This value must be less than the
`system imposed maximum
<https://docs.quantum.ibm.com/run/max-execution-time>`_.
<https://docs.quantum.ibm.com/guides/max-execution-time>`_.
Raises:
ValueError: If an input value is invalid.
Expand Down
7 changes: 4 additions & 3 deletions qiskit_ibm_runtime/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def __init__(
* A :class:`Session` if you are using session execution mode.
* A :class:`Batch` if you are using batch execution mode.
Refer to the `Qiskit Runtime documentation <https://docs.quantum.ibm.com/run>`_.
Refer to the
`Qiskit Runtime documentation <https://docs.quantum.ibm.com/guides/execution-modes>`_.
for more information about the ``Execution modes``.
backend: (DEPRECATED) Backend to run the primitive. This can be a backend name
Expand Down Expand Up @@ -222,7 +223,7 @@ def _validate_options(self, options: dict) -> None:
version="0.25.0",
remedy="Instead, you can perform circuit optimization using Qiskit transpiler "
"or Qiskit transpiler service. "
"See https://docs.quantum.ibm.com/transpile for more information.",
"See https://docs.quantum.ibm.com/guides/transpile for more information.",
)

@classmethod
Expand All @@ -236,7 +237,7 @@ class EstimatorV1(BasePrimitiveV1, Estimator, BaseEstimator):
.. deprecated:: 0.23
The ``EstimatorV1`` primitives have been deprecated in 0.23, released on April 15, 2024.
See the `V2 migration guide <https://docs.quantum.ibm.com/api/migration-guides/v2-primitives>`_.
See the `V2 migration guide <https://docs.quantum.ibm.com/migration-guides/v2-primitives>`_.
for more details.
The ``EstimatorV1`` support will be removed no earlier than July 15, 2024.
Expand Down
10 changes: 5 additions & 5 deletions qiskit_ibm_runtime/ibm_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def run(
msg="backend.run() and related sessions methods are deprecated ",
version="0.23",
remedy="More details can be found in the primitives migration "
"guide https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime.",
"guide https://docs.quantum.ibm.com/migration-guides/qiskit-runtime.",
period="6 months",
)
validate_job_tags(job_tags)
Expand Down Expand Up @@ -845,7 +845,7 @@ def open_session(self, max_time: Optional[Union[int, str]] = None) -> ProviderSe
msg="backend.run() and related sessions methods are deprecated ",
version="0.23",
remedy="More details can be found in the primitives migration guide "
"https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime.",
"https://docs.quantum.ibm.com/migration-guides/qiskit-runtime.",
period="6 months",
)
if not self._configuration.simulator:
Expand All @@ -864,7 +864,7 @@ def session(self) -> ProviderSession:
msg="backend.run() and related sessions methods are deprecated ",
version="0.23",
remedy="More details can be found in the primitives migration "
"guide https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime.",
"guide https://docs.quantum.ibm.com/migration-guides/qiskit-runtime.",
period="6 months",
)
return self._session
Expand All @@ -875,7 +875,7 @@ def cancel_session(self) -> None:
msg="backend.run() and related sessions methods are deprecated ",
version="0.23",
remedy="More details can be found in the primitives migration "
"guide https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime.",
"guide https://docs.quantum.ibm.com/migration-guides/qiskit-runtime.",
period="6 months",
)
if self._session:
Expand All @@ -893,7 +893,7 @@ def close_session(self) -> None:
msg="backend.run() and related sessions methods are deprecated ",
version="0.23",
remedy="More details can be found in the primitives migration "
"guide https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime.",
"guide https://docs.quantum.ibm.com/migration-guides/qiskit-runtime.",
period="6 months",
)
if self._session:
Expand Down
3 changes: 2 additions & 1 deletion qiskit_ibm_runtime/noise_learner/noise_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ class NoiseLearner:
* A :class:`Session` if you are using session execution mode.
* A :class:`Batch` if you are using batch execution mode.
Refer to the `Qiskit Runtime documentation <https://docs.quantum.ibm.com/run>`_
Refer to the
`Qiskit Runtime documentation <https://docs.quantum.ibm.com/guides/execution-modes>`__
for more information about the execution modes.
options: :class:`NoiseLearnerOptions`. Alternatively, :class:`EstimatorOptions` can be
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/options/estimator_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class EstimatorOptions(OptionsV2):
Refer to the
`Configure error mitigation for Qiskit Runtime
<https://docs.quantum.ibm.com/run/configure-error-mitigation>`_.
<https://docs.quantum.ibm.com/guides/configure-error-mitigation>`_.
for more information about the error mitigation methods used at each level.
Default: 1.
Expand Down
6 changes: 3 additions & 3 deletions qiskit_ibm_runtime/options/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class OptionsV2(BaseOptions):
Refer to the
`Max execution time documentation
<https://docs.quantum-computing.ibm.com/run/max-execution-time#maximum-execution-time>`_.
<https://docs.quantum.ibm.com/guides/max-execution-time>`_.
for more information.
environment: Options related to the execution environment. See
Expand Down Expand Up @@ -260,7 +260,7 @@ class Options(BaseOptions):
Refer to the
`Qiskit Runtime documentation
<https://docs.quantum.ibm.com/run/configure-error-mitigation>`_.
<https://docs.quantum.ibm.com/guides/configure-error-mitigation>`_.
for more information about the error mitigation methods used at each level.
max_execution_time: Maximum execution time in seconds, which is based
Expand All @@ -271,7 +271,7 @@ class Options(BaseOptions):
Refer to the
`Max execution time documentation
<https://docs.quantum.ibm.com/run/max-execution-time>`_.
<https://docs.quantum.ibm.com/guides/max-execution-time>`_.
for more information.
transpilation: Transpilation options. See :class:`TranspilationOptions` for all
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/provider_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
forcibly closed. Can be specified as seconds (int) or a string like "2h 30m 40s".
This value must be in between 300 seconds and the
`system imposed maximum
<https://docs.quantum.ibm.com/run/max-execution-time>`_.
<https://docs.quantum.ibm.com/guides/max-execution-time>`_.
Raises:
ValueError: If an input value is invalid.
Expand Down
5 changes: 3 additions & 2 deletions qiskit_ibm_runtime/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def __init__(
* A :class:`Session` if you are using session execution mode.
* A :class:`Batch` if you are using batch execution mode.
Refer to the `Qiskit Runtime documentation <https://docs.quantum.ibm.com/run>`_.
Refer to the
`Qiskit Runtime documentation <https://docs.quantum.ibm.com/guides/execution-modes>`_.
for more information about the ``Execution modes``.
backend: (DEPRECATED) Backend to run the primitive. This can be a backend name or
Expand Down Expand Up @@ -180,7 +181,7 @@ class SamplerV1(BasePrimitiveV1, Sampler, BaseSampler):
.. deprecated:: 0.23
The ``SamplerV1`` primitives have been deprecated in 0.23, released on April 15, 2024.
See the `V2 migration guide <https://docs.quantum.ibm.com/api/migration-guides/v2-primitives>`_.
See the `V2 migration guide <https://docs.quantum.ibm.com/migration-guides/v2-primitives>`_.
for more details.
The ``SamplerV1`` support will be removed no earlier than July 15, 2024.
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
forcibly closed. Can be specified as seconds (int) or a string like "2h 30m 40s".
This value must be less than the
`system imposed maximum
<https://docs.quantum.ibm.com/run/max-execution-time>`_.
<https://docs.quantum.ibm.com/guides/max-execution-time>`_.
Raises:
ValueError: If an input value is invalid.
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.. currentmodule:: qiskit_ibm_runtime.transpiler.passes
A collection of transpiler passes for IBM backends. Refer to
https://docs.quantum.ibm.com/transpile to learn more about
https://docs.quantum.ibm.com/guides/transpile to learn more about
transpilation and passes.
.. autosummary::
Expand Down
5 changes: 3 additions & 2 deletions qiskit_ibm_runtime/utils/validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ def validate_isa_circuits(circuits: Sequence[QuantumCircuit], target: Target) ->
message
+ " Circuits that do not match the target hardware definition are no longer "
"supported after March 4, 2024. See the transpilation documentation "
"(https://docs.quantum.ibm.com/transpile) for instructions to transform circuits and "
"the primitive examples (https://docs.quantum.ibm.com/run/primitives-examples) to see "
"(https://docs.quantum.ibm.com/guides/transpile) for instructions "
"to transform circuits and the primitive examples "
"(https://docs.quantum.ibm.com/guides/primitives-examples) to see "
"this coupled with operator transformations."
)

Expand Down
6 changes: 3 additions & 3 deletions release-notes/0.20.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ New Features
allows for different execution modes. Batch mode is now supported
through ``Batch``, and `Session <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.Session>`__
will work the same as way as before. Please see
`run/sessions <https://docs.quantum.ibm.com/run/sessions>`__ for more information.
`run/sessions <https://docs.quantum.ibm.com/guides/sessions>`__ for more information.

Note that ``Session`` and ``Batch`` created from
``qiskit-ibm-runtime`` prior to this release will no longer be
Expand All @@ -42,9 +42,9 @@ Deprecation Notes

- Circuits that do not match the target hardware definition will no
longer be supported after March 1, 2024. See the transpilation
documentation (`transpile <https://docs.quantum.ibm.com/transpile>`__) for instructions to
documentation (`transpile <https://docs.quantum.ibm.com/guides/transpile>`__) for instructions to
transform circuits and the primitive examples
(`run/primitives-examples <https://docs.quantum.ibm.com/run/primitives-examples>`__) to see this
(`run/primitives-examples <https://docs.quantum.ibm.com/guides/primitives-examples>`__) to see this
coupled with operator transformations.

Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions release-notes/0.21.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Upgrade Notes
- Circuits that do not match the target hardware definition are no
longer supported by Qiskit Runtime primitives, unless
``channel_strategy="q-ctrl"`` is used. See the transpilation
documentation (`transpile <https://docs.quantum.ibm.com/transpile>`__) for instructions to
documentation (`transpile <https://docs.quantum.ibm.com/guides/transpile>`__) for instructions to
transform circuits and the primitive examples
(`run/primitives-examples <https://docs.quantum.ibm.com/run/primitives-examples>`__) to see this
(`run/primitives-examples <https://docs.quantum.ibm.com/guides/primitives-examples>`__) to see this
coupled with operator transformations.

Deprecation Notes
Expand Down
2 changes: 1 addition & 1 deletion release-notes/0.23.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Deprecation Notes
-----------------

- `backend.run() <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.IBMBackend#run>`__ has been deprecated. Please use the primitives instead. More details
can be found in the `migration guide <https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime>`__ . (`1561 <https://github.com/Qiskit/qiskit-ibm-runtime/pull/1561>`__)
can be found in the `migration guide <https://docs.quantum.ibm.com/migration-guides/qiskit-runtime>`__ . (`1561 <https://github.com/Qiskit/qiskit-ibm-runtime/pull/1561>`__)
- In a future release, the ``service`` parameter in `from_id() <https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.Session#from_id>`__
will be required. (`1311 <https://github.com/Qiskit/qiskit-ibm-runtime/pull/1311>`__)

Expand Down
8 changes: 4 additions & 4 deletions release-notes/0.24.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Deprecation Notes

:meth:`qiskit_ibm_runtime.RuntimeJob.program_id` is deprecated and will be replaced by
:meth:`qiskit_ibm_runtime.RuntimeJob.primitive_id`. (`1238 <https://github.com/Qiskit/qiskit-ibm-runtime/pull/1238>`__)
- The ``backend`` argument in `Sampler <https://docs.quantum.ibm.com/run/primitives-get-started#3-initialize-the-qiskit-runtime-sampler>`__
and `Estimator <https://docs.quantum.ibm.com/run/primitives-get-started#3-initialize-qiskit-runtime-estimator>`__ has been deprecated.
- The ``backend`` argument in `Sampler <https://docs.quantum.ibm.com/guides/get-started-with-primitives#3-initialize-the-qiskit-runtime-sampler>`__
and `Estimator <https://docs.quantum.ibm.com/guides/get-started-with-primitives#3-initialize-qiskit-runtime-estimator>`__ has been deprecated.
Please use ``mode`` instead.
The ``session`` argument in `Sampler <https://docs.quantum.ibm.com/run/primitives-get-started#3-initialize-the-qiskit-runtime-sampler>`__
and `Estimator <https://docs.quantum.ibm.com/run/primitives-get-started#3-initialize-qiskit-runtime-estimator>`__ has also been deprecated.
The ``session`` argument in `Sampler <https://docs.quantum.ibm.com/guides/get-started-with-primitives#3-initialize-the-qiskit-runtime-sampler>`__
and `Estimator <https://docs.quantum.ibm.com/guides/get-started-with-primitives#3-initialize-qiskit-runtime-estimator>`__ has also been deprecated.
Please use ``mode`` instead. (`1556 <https://github.com/Qiskit/qiskit-ibm-runtime/pull/1556>`__)
- :meth:`qiskit_ibm_runtime.QiskitRuntimeService.get_backend` is deprecated. Please
:meth:`qiskit_ibm_runtime.QiskitRuntimeService.backend` use instead.
Expand Down

0 comments on commit 5eaf6ff

Please sign in to comment.