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

Update neutral atom documentation #2734

Merged
merged 4 commits into from
Mar 17, 2025
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
210 changes: 148 additions & 62 deletions docs/sphinx/using/backends/hardware/neutralatom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,56 +177,108 @@ Alternatively, users can set the following environment variables directly.
export PASQAL_PROJECT_ID=<>


Submission from Python
Submitting
`````````````````````````
.. tab:: Python

The target to which quantum kernels are submitted
can be controlled with the ``cudaq::set_target()`` function.
The target to which quantum kernels are submitted
can be controlled with the ``cudaq::set_target()`` function.

.. code:: python
.. code:: python

cudaq.set_target('pasqal')
cudaq.set_target('pasqal')


This accepts an optional argument, ``machine``, which is used in the cloud platform to
select the corresponding Pasqal QPU or emulator to execute on.
See the `Pasqal cloud portal <https://portal.pasqal.cloud/>`__ for an up to date list.
The default value is ``EMU_MPS`` which is an open-source tensor network emulator based on the
Matrix Product State formalism running in Pasqal's cloud platform. You can see the
documentation for the publicly accessible emulator `here <https://pasqal-io.github.io/emulators/latest/emu_mps/>`__.
This accepts an optional argument, ``machine``, which is used in the cloud platform to
select the corresponding Pasqal QPU or emulator to execute on.
See the `Pasqal cloud portal <https://portal.pasqal.cloud/>`__ for an up to date list.
The default value is ``EMU_MPS`` which is an open-source tensor network emulator based on the
Matrix Product State formalism running in Pasqal's cloud platform. You can see the
documentation for the publicly accessible emulator `here <https://pasqal-io.github.io/emulators/latest/emu_mps/>`__.

To target the QPU use the FRESNEL machine name. Note that there are restrictions
regarding the values of the pulses as well as the register layout. We invite you to
consult our `documentation <https://docs.pasqal.com/cloud/fresnel-job>`__. Note that
the CUDA-Q integration currently only works with `arbitrary layouts <https://docs.pasqal.com/cloud/fresnel-job/#arbitrary-layouts>`__
which are implemented with automatic calibration for less than 30 qubits. For jobs
larger than 30 qubits please use the `atom_sites` to define the layout, and use the
`atom_filling` to select sites as filled or not filled in order to define the register.
To target the QPU use the FRESNEL machine name. Note that there are restrictions
regarding the values of the pulses as well as the register layout. We invite you to
consult our `documentation <https://docs.pasqal.com/cloud/fresnel-job>`__. Note that
the CUDA-Q integration currently only works with `arbitrary layouts <https://docs.pasqal.com/cloud/fresnel-job/#arbitrary-layouts>`__
which are implemented with automatic calibration for less than 30 qubits. For jobs
larger than 30 qubits please use the `atom_sites` to define the layout, and use the
`atom_filling` to select sites as filled or not filled in order to define the register.

Due to the nature of the underlying hardware, this target only supports the
``evolve`` and ``evolve_async`` APIs.
The `hamiltonian` must be an `Operator` of the type `RydbergHamiltonian`. The only
other supported parameters are `schedule` (mandatory) and `shots_count` (optional).
Due to the nature of the underlying hardware, this target only supports the
``evolve`` and ``evolve_async`` APIs.
The `hamiltonian` must be an `Operator` of the type `RydbergHamiltonian`. The only
other supported parameters are `schedule` (mandatory) and `shots_count` (optional).

For example,
For example,

.. code:: python
.. code:: python

evolution_result = evolve(RydbergHamiltonian(atom_sites=register,
amplitude=omega,
phase=phi,
delta_global=delta),
schedule=schedule)

The number of shots for a kernel execution can be set through the ``shots_count``
argument to ``evolve`` or ``evolve_async``. By default, the ``shots_count`` is
set to 100.

.. code:: python

cudaq.evolve(RydbergHamiltonian(...), schedule=s, shots_count=1000)

To see a complete example for using Pasqal's backend, take a look at our :doc:`Python examples <../../examples/hardware_providers>`.

.. tab:: C++

evolution_result = evolve(RydbergHamiltonian(atom_sites=register,
amplitude=omega,
phase=phi,
delta_global=delta),
schedule=schedule)
To target quantum kernel code for execution on Pasqal QPU or simulators,
pass the flag ``--target pasqal`` to the ``nvq++`` compiler.

The number of shots for a kernel execution can be set through the ``shots_count``
argument to ``evolve`` or ``evolve_async``. By default, the ``shots_count`` is
set to 100.
.. code:: bash

nvq++ --target pasqal src.cpp

You can also pass the flag ``--pasqal-machine`` to select the corresponding Pasqal QPU or emulator to execute on.
See the `Pasqal cloud portal <https://portal.pasqal.cloud/>`__ for an up to date list.
The default value is ``EMU_MPS`` which is an open-source tensor network emulator based on the
Matrix Product State formalism running in Pasqal's cloud platform. You can see the
documentation for the publicly accessible emulator `here <https://pasqal-io.github.io/emulators/latest/emu_mps/>`__.

.. code:: bash

nvq++ --target pasqal --pasqal-machine EMU_FREE src.cpp

To target the QPU use the FRESNEL machine name. Note that there are restrictions
regarding the values of the pulses as well as the register layout. We invite you to
consult our `documentation <https://docs.pasqal.com/cloud/fresnel-job>`__. Note that
the CUDA-Q integration currently only works with `arbitrary layouts <https://docs.pasqal.com/cloud/fresnel-job/#arbitrary-layouts>`__
which are implemented with automatic calibration for less than 30 qubits. For jobs
larger than 30 qubits please use the `atom_sites` to define the layout, and use the
`atom_filling` to select sites as filled or not filled in order to define the register.

Due to the nature of the underlying hardware, this target only supports the
``evolve`` and ``evolve_async`` APIs.
The `hamiltonian` must be of the type `rydberg_hamiltonian`. Only
other parameters supported are `schedule` (mandatory) and `shots_count` (optional).

For example,

.. code:: python
.. code:: cpp

cudaq.evolve(RydbergHamiltonian(...), schedule=s, shots_count=1000)
auto evolution_result = cudaq::evolve(
cudaq::rydberg_hamiltonian(register_sites, omega, phi, delta),
schedule);

The number of shots for a kernel execution can be set through the ``shots_count``
argument to ``evolve`` or ``evolve_async``. By default, the ``shots_count`` is
set to 100.

.. code:: cpp

auto evolution_result = cudaq::evolve(cudaq::rydberg_hamiltonian(...), schedule, 1000);

To see a complete example for using Pasqal's backend, take a look at our :doc:`C++ examples <../../examples/hardware_providers>`.

To see a complete example for using Pasqal's backend, take a look at our :doc:`Python examples <../../examples/hardware_providers>`.

.. note::

Expand Down Expand Up @@ -261,47 +313,81 @@ Alternatively, users can set the following environment variables.
export AWS_SECRET_ACCESS_KEY="<access_key>"
export AWS_SESSION_TOKEN="<token>"

Submission from Python
About Aquila
`````````````````````````

The target to which quantum kernels are submitted
can be controlled with the ``cudaq::set_target()`` function.

.. code:: python

cudaq.set_target('quera')

By default, analog Hamiltonian will be submitted to the Aquila system.

Aquila is a "field programmable qubit array" operated as an analog
Hamiltonian simulator on a user-configurable architecture, executing
programmable coherent quantum dynamics on up to 256 neutral-atom qubits.
Refer to QuEra's `whitepaper <https://cdn.prod.website-files.com/643b94c382e84463a9e52264/648f5bf4d19795aaf36204f7_Whitepaper%20June%2023.pdf>`__ for details.

Due to the nature of the underlying hardware, this target only supports the
``evolve`` and ``evolve_async`` APIs.
The `hamiltonian` must be an `Operator` of the type `RydbergHamiltonian`. Only
other parameters supported are `schedule` (mandatory) and `shots_count` (optional).
Submitting
`````````````````````````
.. tab:: Python

The target to which quantum kernels are submitted
can be controlled with the ``cudaq::set_target()`` function.

.. code:: python

For example,
cudaq.set_target('quera')

.. code:: python
Due to the nature of the underlying hardware, this target only supports the
``evolve`` and ``evolve_async`` APIs.
The `hamiltonian` must be an `Operator` of the type `RydbergHamiltonian`. Only
other parameters supported are `schedule` (mandatory) and `shots_count` (optional).

For example,

.. code:: python

evolution_result = evolve(RydbergHamiltonian(atom_sites=register,
amplitude=omega,
phase=phi,
delta_global=delta),
schedule=schedule)

The number of shots for a kernel execution can be set through the ``shots_count``
argument to ``evolve`` or ``evolve_async``. By default, the ``shots_count`` is
set to 100.

.. code:: python

cudaq.evolve(RydbergHamiltonian(...), schedule=s, shots_count=1000)

To see a complete example for using QuEra's backend, take a look at our :doc:`Python examples <../../examples/hardware_providers>`.

.. tab:: C++

To target quantum kernel code for execution on QuEra's Aquila,
pass the flag ``--target quera`` to the ``nvq++`` compiler.

.. code:: bash

nvq++ --target quera src.cpp

Due to the nature of the underlying hardware, this target only supports the
``evolve`` and ``evolve_async`` APIs.
The `hamiltonian` must be of the type `rydberg_hamiltonian`. Only
other parameters supported are `schedule` (mandatory) and `shots_count` (optional).

For example,

.. code:: cpp

evolution_result = evolve(RydbergHamiltonian(atom_sites=register,
amplitude=omega,
phase=phi,
delta_global=delta),
schedule=schedule)
auto evolution_result = cudaq::evolve(
cudaq::rydberg_hamiltonian(register_sites, omega, phi, delta),
schedule);

The number of shots for a kernel execution can be set through the ``shots_count``
argument to ``evolve`` or ``evolve_async``. By default, the ``shots_count`` is
set to 100.
The number of shots for a kernel execution can be set through the ``shots_count``
argument to ``evolve`` or ``evolve_async``. By default, the ``shots_count`` is
set to 100.

.. code:: python
.. code:: cpp

cudaq.evolve(RydbergHamiltonian(...), schedule=s, shots_count=1000)
auto evolution_result = cudaq::evolve(cudaq::rydberg_hamiltonian(...), schedule, 1000);

To see a complete example for using QuEra's backend, take a look at our :doc:`Python examples <../../examples/hardware_providers>`.
To see a complete example for using QuEra's backend, take a look at our :doc:`C++ examples <../../examples/hardware_providers>`.

.. note::

Expand Down
10 changes: 10 additions & 0 deletions docs/sphinx/using/examples/hardware_providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ The following code illustrates how to run kernels on Pasqal's backends.
.. literalinclude:: ../../targets/python/pasqal.py
:language: python

.. tab:: C++

.. literalinclude:: ../../targets/cpp/pasqal.cpp
:language: cpp


Quantinuum
==================================
Expand All @@ -151,3 +156,8 @@ The following code illustrates how to run kernels on QuEra's backends.
.. literalinclude:: ../../targets/python/quera_basic.py
:language: python

.. tab:: C++

.. literalinclude:: ../../targets/cpp/quera_basic.cpp
:language: cpp

Loading