Skip to content

Commit ee5ec04

Browse files
authored
Merge branch 'develop' into feature/openqasm
2 parents 25c4500 + b078f67 commit ee5ec04

File tree

17 files changed

+2939
-1
lines changed

17 files changed

+2939
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Added ``.editorconfig` file
1919
- Added ``pyproject.toml`` and ``setup.cfg``
2020
- Added CHANGELOG.md
21+
- Added backend for IonQ.
2122

2223
- Added OpenQASMBackend to output QASM from ProjectQ circuits
2324
- Added projectq.libs.qasm to convert QASM to ProjectQ circuits

README.rst

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ targeting various types of hardware, a high-performance quantum computer
2424
simulator with emulation capabilities, and various compiler plug-ins.
2525
This allows users to
2626

27-
- run quantum programs on the IBM Quantum Experience chip, AQT devices or AWS Braket service provided devices
27+
- run quantum programs on the IBM Quantum Experience chip, AQT devices, AWS Braket, or IonQ service provided devices
2828
- simulate quantum programs on classical computers
2929
- emulate quantum programs at a higher level of abstraction (e.g.,
3030
mimicking the action of large oracles instead of compiling them to
@@ -172,6 +172,37 @@ IonQ from IonQ and the state vector simulator SV1:
172172
python3 -m pip install -ve .[braket]
173173
174174
175+
**Running a quantum program on IonQ devices**
176+
177+
To run a program on the IonQ trapped ion hardware, use the `IonQBackend` and its corresponding setup.
178+
179+
Currently available devices are:
180+
181+
* `ionq_simulator`: A 29-qubit simulator.
182+
* `ionq_qpu`: A 11-qubit trapped ion system.
183+
184+
.. code-block:: python
185+
186+
import projectq.setups.ionq
187+
from projectq import MainEngine
188+
from projectq.backends import IonQBackend
189+
190+
token = 'MY_TOKEN'
191+
device = 'ionq_qpu'
192+
backend = IonQBackend(
193+
token=token,
194+
use_hardware=True,
195+
num_runs=1024,
196+
verbose=False,
197+
device=device,
198+
)
199+
compiler_engines = projectq.setups.ionq.get_engine_list(
200+
token=token,
201+
device=device,
202+
)
203+
eng = MainEngine(backend, engine_list=compiler_engines)
204+
205+
175206
**Classically simulate a quantum program**
176207

177208
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>`__.

0 commit comments

Comments
 (0)