Skip to content

Commit

Permalink
Add a backend for IonQ.
Browse files Browse the repository at this point in the history
  • Loading branch information
amilstead committed May 7, 2021
1 parent fb548ef commit e14bf88
Show file tree
Hide file tree
Showing 14 changed files with 2,494 additions and 6 deletions.
43 changes: 37 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ProjectQ - An open source software framework for quantum computing

.. image:: https://badge.fury.io/py/projectq.svg
:target: https://badge.fury.io/py/projectq

.. image:: https://img.shields.io/badge/python-2.7%2C%203.4%2C%203.5%2C%203.6-brightgreen.svg


Expand All @@ -24,7 +24,7 @@ targeting various types of hardware, a high-performance quantum computer
simulator with emulation capabilities, and various compiler plug-ins.
This allows users to

- run quantum programs on the IBM Quantum Experience chip, AQT devices or AWS Braket service provided devices
- run quantum programs on the IBM Quantum Experience chip, AQT devices, AWS Braket, or IonQ service provided devices
- simulate quantum programs on classical computers
- emulate quantum programs at a higher level of abstraction (e.g.,
mimicking the action of large oracles instead of compiling them to
Expand Down Expand Up @@ -108,7 +108,7 @@ To run a program on the IBM Quantum Experience chips, all one has to do is choos
import projectq.setups.ibm
from projectq.backends import IBMBackend
token='MY_TOKEN'
device='ibmq_16_melbourne'
compiler_engines = projectq.setups.ibm.get_engine_list(token=token,device=device)
Expand All @@ -125,7 +125,7 @@ To run a program on the AQT trapped ion quantum computer, choose the `AQTBackend
import projectq.setups.aqt
from projectq.backends import AQTBackend
token='MY_TOKEN'
device='aqt_device'
compiler_engines = projectq.setups.aqt.get_engine_list(token=token,device=device)
Expand Down Expand Up @@ -172,6 +172,37 @@ IonQ from IonQ and the state vector simulator SV1:
python3 -m pip install -ve .[braket]
**Running a quantum program on IonQ devices**

To run a program on the IonQ trapped ion hardware, use the `IonQBackend` and its corresponding setup.

Currently available devices are:

* `ionq_simulator`: A 29-qubit simulator.
* `ionq_qpu`: A 11-qubit trapped ion system.

.. code-block:: python
import projectq.setups.ionq
from projectq import MainEngine
from projectq.backends import IonQBackend
token = 'MY_TOKEN'
device = 'ionq_qpu'
backend = IonQBackend(
token=token,
use_hardware=True,
num_runs=1024,
verbose=False,
device=device,
)
compiler_engines = projectq.setups.ionq.get_engine_list(
token=token,
device=device,
)
eng = MainEngine(backend, engine_list=compiler_engines)
**Classically simulate a quantum program**

ProjectQ has a high-performance simulator which allows simulating up to about 30 qubits on a regular laptop. See the `simulator tutorial <https://github.com/ProjectQ-Framework/ProjectQ/blob/feature/update-readme/examples/simulator_tutorial.ipynb>`__ for more information. Using the emulation features of our simulator (fast classical shortcuts), one can easily emulate Shor's algorithm for problem sizes for which a quantum computer would require above 50 qubits, see our `example codes <http://projectq.readthedocs.io/en/latest/examples.html#shor-s-algorithm-for-factoring>`__.
Expand All @@ -180,7 +211,7 @@ ProjectQ has a high-performance simulator which allows simulating up to about 30
The advanced features of the simulator are also particularly useful to investigate algorithms for the simulation of quantum systems. For example, the simulator can evolve a quantum system in time (without Trotter errors) and it gives direct access to expectation values of Hamiltonians leading to extremely fast simulations of VQE type algorithms:

.. code-block:: python
from projectq import MainEngine
from projectq.ops import All, Measure, QubitOperator, TimeEvolution
Expand Down Expand Up @@ -225,7 +256,7 @@ When using ProjectQ for research projects, please cite
`Quantum 2, 49 (2018) <https://doi.org/10.22331/q-2018-01-31-49>`__
(published on `arXiv <https://arxiv.org/abs/1612.08091>`__ on 23 Dec 2016)
- Thomas Häner, Damian S. Steiger, Krysta M. Svore, and Matthias Troyer
"A Software Methodology for Compiling Quantum Programs" `Quantum Sci. Technol. 3 (2018) 020501 <https://doi.org/10.1088/2058-9565/aaa5cc>`__
"A Software Methodology for Compiling Quantum Programs" `Quantum Sci. Technol. 3 (2018) 020501 <https://doi.org/10.1088/2058-9565/aaa5cc>`__
(published on `arXiv <http://arxiv.org/abs/1604.01401>`__ on 5 Apr 2016)

Authors
Expand Down
Loading

0 comments on commit e14bf88

Please sign in to comment.