Skip to content

Commit

Permalink
Implement new AQT API (#102)
Browse files Browse the repository at this point in the history
* Use qiskit aqt provider, implement in-memory access-token, add function to print available devices

* update backend construction

* update tranlate_aqt

* wip

* implement process_circuits

* implement circuit_status

* simplify machine debug mode

* move api logic

* fix test shots bits edgecases

* finish implementation of offline api

* fix some tests

* more test changes

* all tests working

* update changelog readme

* fix convert tests

* fix mypy errors

* use assert_never from typing extensions

* add some docstrings

* warn/fix instead of fail on multiple registers

* fix mypy error

* fix mypy error
  • Loading branch information
trvto authored Jun 21, 2024
1 parent aac3396 commit aba36b6
Show file tree
Hide file tree
Showing 11 changed files with 796 additions and 194 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ pip install pytket-aqt
This will install `pytket` if it isn't already installed, and add new classes
and methods into the `pytket.extensions` namespace.

## Available devices

`pytket-aqt` offers offline simulators for aqt devices that do not require special access.
Access to remote simulators and machines can be configured by providing an AQT access token.

To see which devices are available to you, use the `AQTBackend.print_device_table` method.
This method will prompt for an access token if none has been configured. Providing a token at the
prompt will store it in memory for further API use. Skip the prompt to see the available offline
simulators. It is also possible to store and use your access token across sessions using
`config.set_aqt_config`.

## Bugs, support and feature requests

Please file bugs and feature requests on the Github
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
Unreleased
----------

* Implement new aqt api
* Fix handling of ``simplify_initial`` kwarg in ``process_circuits()``.

0.33.0 (March 2024)
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pytket-aqt
executed on AQT's (`Alpine Quantum Technologies' <https://www.aqt.eu/>`_)
quantum devices and simulators.

``pytket-aqt`` is available for Python 3.10 and 3.11, on Linux, MacOS and
``pytket-aqt`` is available for Python 3.10, 3.11 and 3.12, on Linux, MacOS and
Windows. To install, run:

::
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ classifiers= [
"Bug Tracker" = "https://github.com/CQCL/pytket-aqt/issues"

[tool.poetry.dependencies]
python = ">=3.10"
python = ">=3.10,<3.13"
pytket = "^1.26"
requests = "^2.22"
types-requests = "*"
pydantic = "^2.0"
networkx = "^3.0"
sympy = ">=1.6"
qiskit-aqt-provider = "^1.3.0"

[tool.poetry.group.tests]
optional = true
Expand Down
8 changes: 6 additions & 2 deletions pytket/extensions/aqt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@
# limitations under the License.
"""Backends for processing pytket circuits with AQT devices."""
from .backends import AQTBackend
from .backends.config import AQTConfig
from .backends.config import set_aqt_config
from .backends.config import (
AQTConfig,
set_aqt_config,
AQTAccessToken,
print_available_devices,
)
Loading

0 comments on commit aba36b6

Please sign in to comment.