Skip to content

Commit ac572b5

Browse files
authored
Add aqt connector (#246)
* Add AQT connector, OIDC auth
1 parent ed3276e commit ac572b5

File tree

6 files changed

+1028
-8
lines changed

6 files changed

+1028
-8
lines changed

docs/apidoc/provider.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
AQTProvider
55
===========
66

7+
78
.. autoclass:: qiskit_aqt_provider.aqt_provider.AQTProvider
89
:members:
910
:show-inheritance:
1011
:inherited-members:
1112

13+
.. autoclass:: qiskit_aqt_provider.aqt_provider.ArnicaConfig
14+
:members:
15+
1216
.. autoclass:: qiskit_aqt_provider.aqt_provider.BackendsTable
1317
:members:
1418
:show-inheritance:

docs/guide.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,45 @@ Handles to computing resources are obtained through the :class:`AQTProvider <qis
1919

2020
.. tip:: If no access token to the AQT cloud is available, the :class:`AQTProvider <qiskit_aqt_provider.aqt_provider.AQTProvider>` can nevertheless provide handles to direct-access resources and AQT-compatible simulators running on the local machine. This is the default behavior if the ``access_token`` argument to :meth:`AQTProvider <qiskit_aqt_provider.aqt_provider.AQTProvider.__init__>` is empty or invalid.
2121

22+
23+
Authentication with an Arnica account
24+
-------------------------------------
25+
.. tip:: Use this method if you were asked to create your own account to use the AQT Arnica portal.
26+
27+
Call :meth:`AQTProvider <qiskit_aqt_provider.aqt_provider.AQTProvider.__init__>` to log in and store your access token securely on the local machine.
28+
29+
.. code-block::
30+
31+
from qiskit_aqt_provider import AQTProvider
32+
33+
provider = AQTProvider()
34+
provider.log_in()
35+
36+
37+
Authentication with client credentials
38+
--------------------------------------
39+
.. tip:: Use this method if you received client credentials from AQT to use the Arnica portal.
40+
41+
Use the `ArnicaConfig` helper class to configure the provider, then call :meth:`AQTProvider <qiskit_aqt_provider.aqt_provider.AQTProvider.__init__>` to exchange your credentials for an
42+
access token, which is stored on the local machine.
43+
44+
.. code-block::
45+
46+
from qiskit_aqt_provider import AQTProvider
47+
from qiskit_aqt_provider.aqt_provider import ArnicaConfig
48+
49+
config = ArnicaConfig(
50+
client_id="YOUR_CLIENT_ID",
51+
client_secret="YOUR_CLIENT_SECRET",
52+
)
53+
provider = AQTProvider(None, config)
54+
provider.log_in()
55+
56+
57+
Authentication with a static API token
58+
--------------------------------------
59+
.. tip:: If you received an access token from AQT, you can use it to authenticate with the AQT cloud portal and access remote quantum computing resources.
60+
2261
The access token can be configured by passing it as the first argument to the
2362
:class:`AQTProvider <qiskit_aqt_provider.aqt_provider.AQTProvider>` initializer:
2463

0 commit comments

Comments
 (0)