Skip to content
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

Support Qiskit 1.0 #141

Merged
merged 6 commits into from
Feb 23, 2024
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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ repos:
- id: check-case-conflict
- id: no-commit-to-branch
args: [--branch, master]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.2.0"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.2.2"
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.7.0"
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

## Unreleased

* Only support Qiskit >= 1.0 (#141)

## qiskit-aqt-provider v1.3.0

* Point Qiskit docs link to docs.quantum.ibm.com (#135)
* Point Qiskit docs links to docs.quantum.ibm.com (#135)
* Remove references to the deprecated function `qiskit.execute` (#136)
* Pin Qiskit dependency strictly below 1.0 (#137)
* Remove the Grover 3-SAT example (#137)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"qiskit": ("https://docs.quantum.ibm.com/api/qiskit/0.46", None),
"qiskit": ("https://docs.quantum.ibm.com/api/qiskit/", None),
}
6 changes: 3 additions & 3 deletions docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ By default, persisted job handles can only be retrieved once, as the stored data
Using Qiskit primitives
-----------------------

Circuit evaluation can also be performed using :mod:`Qiskit primitives <qiskit.primitives>` through their specialized implementations for AQT backends :class:`AQTSampler <qiskit_aqt_provider.primitives.sampler.AQTSampler>` and :class:`AQTEstimator <qiskit_aqt_provider.primitives.estimator.AQTEstimator>`.
Circuit evaluation can also be performed using :mod:`Qiskit primitives <qiskit.primitives>` through their specialized implementations for AQT backends :class:`AQTSampler <qiskit_aqt_provider.primitives.sampler.AQTSampler>` and :class:`AQTEstimator <qiskit_aqt_provider.primitives.estimator.AQTEstimator>`. These classes expose the :class:`BaseSamplerV1 <qiskit.primitives.BaseSamplerV1>` and :class:`BaseEstimatorV1 <qiskit.primitives.BaseEstimatorV1>` interfaces respectively.

.. warning:: The generic implementations :class:`BackendSampler <qiskit.primitives.BackendSampler>` and :class:`BackendEstimator <qiskit.primitives.BackendEstimator>` are **not** compatible with backends retrieved from the :class:`AQTProvider <qiskit_aqt_provider.aqt_provider.AQTProvider>`. Please use the specialized implementations :class:`AQTSampler <qiskit_aqt_provider.primitives.sampler.AQTSampler>` and :class:`AQTEstimator <qiskit_aqt_provider.primitives.estimator.AQTEstimator>` instead.

Expand Down Expand Up @@ -209,7 +209,7 @@ In this Bell state, the expectation value of the the :math:`\sigma_z\otimes\sigm
result = estimator.run(bell_circuit, observable).result()
print(result.values[0])

.. tip:: The circuit passed to estimator's :meth:`run <qiskit.primitives.BaseEstimator.run>` method is used to prepare the state the observable is evaluated in. Therefore, it must not contain unconditional measurement operations.
.. tip:: The circuit passed to estimator's :meth:`run <qiskit.primitives.BaseEstimatorV1.run>` method is used to prepare the state the observable is evaluated in. Therefore, it must not contain unconditional measurement operations.

Quantum circuit transpilation
=============================
Expand Down Expand Up @@ -279,7 +279,7 @@ The built-in transpiler largely leverages the :mod:`qiskit.transpiler`. Custom p
Transpilation in Qiskit primitives
----------------------------------

The generic implementations of the Qiskit primitives :class:`Sampler <qiskit.primitives.BaseSampler>` and :class:`Estimator <qiskit.primitives.BaseEstimator>` cache transpilation results to improve their runtime performance. This is particularly effective when evaluating batches of circuits that differ only in their parametrization.
The generic implementations of the Qiskit primitives :class:`Sampler <qiskit.primitives.BaseSamplerV1>` and :class:`Estimator <qiskit.primitives.BaseEstimatorV1>` cache transpilation results to improve their runtime performance. This is particularly effective when evaluating batches of circuits that differ only in their parametrization.

However, some passes registered by the AQT :ref:`transpiler plugin <transpiler-plugin>` require knowledge of the bound parameter values. The specialized implementations :class:`AQTSampler <qiskit_aqt_provider.primitives.sampler.AQTSampler>` and :class:`AQTEstimator <qiskit_aqt_provider.primitives.estimator.AQTEstimator>` use a hybrid approach, where the transpilation results of passes that do not require bound parameters are cached, while the small subset of passes that require fixed parameter values is executed before each circuit submission to the execution backend.

Expand Down
Loading