Skip to content

Commit

Permalink
Add Simulon remote access to docs (#547)
Browse files Browse the repository at this point in the history
* add simulon entry

* update introduction

* minor text update

* Apply suggestions from code review

Co-authored-by: Josh Izaac <josh146@gmail.com>

* update headings

* update doc

* add ref

* add details

Co-authored-by: Josh Izaac <josh146@gmail.com>
  • Loading branch information
thisac and josh146 committed Feb 26, 2021
1 parent 33194f6 commit 57c4242
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc/introduction/circuits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ the same structure as the above example; in particular,
Strawberry Fields also provides support for constructing and simulating photonic
time domain multiplexing algorithms. For more details, please see :class:`~.TDMProgram`.

.. _simulating_your_program:

Simulating your program
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/introduction/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ In the following sections you can learn more about the key features of Strawberr
..
5. :doc:`photonic_hardware` gives an overview of building, submitting, and managing
remote hardware jobs through Strawberry Fields.
remote jobs on both hardware and cloud simulators through Strawberry Fields.

..
Expand Down
36 changes: 30 additions & 6 deletions doc/introduction/photonic_hardware.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Hardware
========
Hardware and cloud
==================

Using Strawberry Fields, you can submit quantum programs
to be executed on photonic hardware using the Xanadu cloud platform.
Using Strawberry Fields, you can submit quantum programs to be executed on photonic
hardware or to be run on a cloud simulator via the Xanadu Quantum Cloud.

.. warning::

Expand Down Expand Up @@ -69,8 +69,8 @@ or the ``ping`` flag can be used on the command line:

:doc:`command line interface </code/sf_cli>`

Submitting jobs
---------------
Submitting jobs on hardware
---------------------------

Once connected to the Xanadu cloud platform, the Strawberry Fields
:class:`~.RemoteEngine` can be used to submit quantum programs to available
Expand Down Expand Up @@ -130,6 +130,30 @@ the Strawberry Fields command line interface:
After executing the above command, the result will be stored in ``out.txt`` in the current working directory.
You can also omit the ``--output`` parameter to print the result to the screen.

Cloud simulator
---------------

In addition to submitting jobs to be run on quantum hardware, it is also possible to run jobs on
the Xanadu Quantum Cloud simulator Simulon. The process is very similar to running jobs on hardware. You
will need to configure your account, as described above, and submit a job via the ``RemoteEngine``,
using ``"simulon"`` as the target instead of a specific chip:

>>> eng = sf.RemoteEngine("simulon")
>>> result = eng.run(prog)

Simulon jobs can also be submitted asynchronously using ``eng.run_async``, or by submitting a
Blackbird script with the ``target`` set to ``simulon`` in the Blackbird header.

See the `Submitting jobs on hardware`_ section above for more details.

.. note::

Simulon runs on the ``gaussian`` backend (see :ref:`simulating_your_program`) and thus only supports
Gaussian operations, including homodyne and heterodyne measurements, as well terminal
Fock measurements. Note that there are limits to how many measurements a circuit can have depending
on the type of measurement. These can be retrieved by calling ``engine.device_spec.modes`` with
``engine = sf.RemoteEngine("simulon")``.

Tutorials
---------

Expand Down

0 comments on commit 57c4242

Please sign in to comment.