From b4f1fefd9fb3202a3314e9b804d48b59c14116a6 Mon Sep 17 00:00:00 2001 From: Etienne Wodey Date: Mon, 23 Oct 2023 14:08:07 +0200 Subject: [PATCH 1/5] docs: add external link to API reference --- docs/index.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 10be1b8..9c24899 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -40,7 +40,7 @@ Define a circuit that generates 2-qubit Bell state and sample it on a simulator quasi_dist = result.quasi_dists[0] print(quasi_dist) -For more details see the :ref:`user guide `, a selection of `examples `_, or the API reference. +For more details see the :ref:`user guide `, a selection of `examples `_, or the reference documentation. .. toctree:: :maxdepth: 1 @@ -51,7 +51,7 @@ For more details see the :ref:`user guide `, a selection of `example .. toctree:: :maxdepth: 1 - :caption: API Reference + :caption: Reference :hidden: AQTProvider @@ -67,3 +67,4 @@ For more details see the :ref:`user guide `, a selection of `example Repository AQT + API reference From e64e1c5af37423c26b28a7daab7d2092d1e98113 Mon Sep 17 00:00:00 2001 From: Etienne Wodey Date: Mon, 23 Oct 2023 14:15:47 +0200 Subject: [PATCH 2/5] docs/index: add minimal installation instructions --- docs/index.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 9c24899..6c3a5d8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,6 +11,12 @@ hardware. Quick start ----------- +Install the latest release from the `PyPI `_: + +.. code-block:: bash + + pip install qiskit-aqt-provider + Define a circuit that generates 2-qubit Bell state and sample it on a simulator backend running on the local machine: .. jupyter-execute:: From 244659346415dc5b8b9743e7759f7717abf707fe Mon Sep 17 00:00:00 2001 From: Etienne Wodey Date: Mon, 23 Oct 2023 14:48:34 +0200 Subject: [PATCH 3/5] docs/guide: add note on variable angle RXX. Make the internal transformations more explicit. --- docs/guide.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/guide.rst b/docs/guide.rst index 9e5f851..ad979f1 100644 --- a/docs/guide.rst +++ b/docs/guide.rst @@ -273,11 +273,7 @@ The built-in transpiler largely leverages the :mod:`qiskit.transpiler`. Custom p * in the translation stage, the :class:`WrapRxxAngles ` pass exploits the periodicity of the :class:`RXXGate ` to wrap its angle :math:`\theta` to the :math:`[0,\,\pi/2]` range. This may come at the expense of extra single-qubit rotations. * in the scheduling stage, the :class:`RewriteRxAsR ` pass rewrites :class:`RXGate ` operations as :class:`RGate ` and wraps the angles :math:`\theta\in[0,\,\pi]` and :math:`\phi\in[0,\,2\pi]`. This does not restrict the generality of quantum circuits and enables efficient native implementations. -.. warning:: Circuits accepted by the AQT API are executed after applying one further transformation. Small-angle :math:`\theta` instances of :class:`RGate ` are substituted as - - :math:`R(\theta,\,\phi)\ \to\ R(\pi, \pi)\cdot R(\theta+\pi,\,\phi)`. - - The threshold for triggering this transformation is an implementation detail, typically around :math:`\theta=\pi/5`. Please contact AQT for details. +.. tip:: AQT computing resources natively implement :class:`RXXGate ` with :math:`\theta` continuously varying in :math:`(0,\,\pi/2]`. For optimal performance, the transpiler output should be inspected to make sure :class:`RXXGate ` instances are not transpiled to unified angles (often :math:`\theta=\pi/2`). Transpilation in Qiskit primitives ---------------------------------- @@ -285,3 +281,12 @@ Transpilation in Qiskit primitives The generic implementations of the Qiskit primitives :class:`Sampler ` and :class:`Estimator ` 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 ` require knowledge of the bound parameter values. The specialized implementations :class:`AQTSampler ` and :class:`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. + +Circuit modifications behind the remote API +------------------------------------------- + +Circuits accepted by the AQT API are executed after applying a single further transformation: small-angle :math:`\theta` instances of :class:`RGate ` are substituted as + + :math:`R(\theta,\,\phi)\ \to\ R(\pi, \pi)\cdot R(\theta+\pi,\,\phi)`. + +The threshold for triggering this transformation is an implementation detail, typically around :math:`\theta=\pi/5`. Please contact AQT for details. From efda6fbae9caa71eab8398cfa1a2542476ca3fd9 Mon Sep 17 00:00:00 2001 From: Etienne Wodey <44871469+airwoodix@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:07:03 +0200 Subject: [PATCH 4/5] Update docs/guide.rst Co-authored-by: fg-aqt <126795524+fg-aqt@users.noreply.github.com> --- docs/guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide.rst b/docs/guide.rst index ad979f1..1c39360 100644 --- a/docs/guide.rst +++ b/docs/guide.rst @@ -285,7 +285,7 @@ However, some passes registered by the AQT :ref:`transpiler plugin ` are substituted as +Circuits accepted by the AQT API are executed exactly as they were transmitted, with the only exception that small-angle :math:`\theta` instances of :class:`RGate ` are substituted with :math:`R(\theta,\,\phi)\ \to\ R(\pi, \pi)\cdot R(\theta+\pi,\,\phi)`. From baf4e898d853cbdfffd512178ee8aa02596b4604 Mon Sep 17 00:00:00 2001 From: Etienne Wodey Date: Tue, 24 Oct 2023 17:19:50 +0200 Subject: [PATCH 5/5] docs/quick-start: add warning about pinned dependencies --- docs/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 6c3a5d8..6e7ceda 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,8 @@ Install the latest release from the `PyPI `_. + Define a circuit that generates 2-qubit Bell state and sample it on a simulator backend running on the local machine: .. jupyter-execute::