Skip to content

Commit

Permalink
Merge branch 'master' into custom-timeout-and-retry
Browse files Browse the repository at this point in the history
  • Loading branch information
splch authored Apr 29, 2024
2 parents bc91086 + a7d2d30 commit 7f4462c
Show file tree
Hide file tree
Showing 13 changed files with 383 additions and 211 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Black Code Formatter
uses: lgeiger/black-action@v1.0.1
uses: lgeiger/black-action@master
with:
args: "-l 100 pennylane_ionq/ --check"
162 changes: 82 additions & 80 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,82 @@
name: Tests
on:
push:
branches:
- master
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', '3.11']

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel pytest pytest-cov pytest-mock --upgrade
- name: Install Plugin
run: |
python setup.py bdist_wheel
pip install dist/PennyLane*.whl
- name: Run tests
run: python -m pytest tests --cov=pennylane_ionq --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native
env:
IONQ_API_KEY: ${{ secrets.IONQ_API_KEY }}
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml

integration-tests:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel pytest pytest-cov pytest-mock flaky --upgrade
- name: Install Plugin
run: |
python setup.py bdist_wheel
pip install dist/PennyLane*.whl
- name: Run tests
env:
IONQ_API_KEY: ${{ secrets.IONQ_API_KEY }}
run: |
pl-device-test --device=ionq.simulator --tb=short --skip-ops --shots=10000
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
name: Tests
on:
push:
branches:
- master
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', '3.11']

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel pytest pytest-cov pytest-mock pytest-benchmark --upgrade
- name: Install Plugin
run: |
python setup.py bdist_wheel
pip install dist/PennyLane*.whl
- name: Run tests
run: python -m pytest tests --cov=pennylane_ionq --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native
env:
IONQ_API_KEY: ${{ secrets.IONQ_API_KEY }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.codecov_token }}
file: ./coverage.xml

integration-tests:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel pytest pytest-benchmark pytest-cov pytest-mock flaky --upgrade
- name: Install Plugin
run: |
python setup.py bdist_wheel
pip install dist/PennyLane*.whl
- name: Run tests
env:
IONQ_API_KEY: ${{ secrets.IONQ_API_KEY }}
run: |
pl-device-test --device=ionq.simulator --tb=short --skip-ops --shots=10000
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.codecov_token }}
file: ./coverage.xml
38 changes: 34 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Release 0.33.0-dev
# Release 0.35.0-dev

### New features since last release

### Improvements 🛠

* Use new `backend` field to specify `qpu`.
[(#81)](https://github.com/PennyLaneAI/PennyLane-IonQ/pull/81)

### Breaking changes 💔

### Deprecations 👋
Expand All @@ -19,7 +16,40 @@

This release contains contributions from (in alphabetical order):

---
# Release 0.34.0

### New features since last release

* Application of debiasing and sharpening for error mitigation is made available, with parameters set on device initialization. Error mitigation strategies that
need to be set at runtime are defined in the `error_mitigation` dictionary (currently a single strategy, `debias`, is available). Whether or not to
apply sharpening to the returned results is set via the parameter `sharpen`. A device using debiasing and sharpening to mitigate errors can be initialized as:

```python
import pennylane as qml

dev = qml.device("ionq.qpu", wires=2, error_mitigation={"debias": True}, sharpen=True)
```

For more details, see the [IonQ Guide on sharpening and debiasing](https://ionq.com/resources/debiasing-and-sharpening), or refer to the publication <https://arxiv.org/pdf/2301.07233.pdf>
[(#75)](https://github.com/PennyLaneAI/PennyLane-IonQ/pull/75)
[(#96)](https://github.com/PennyLaneAI/PennyLane-IonQ/pull/96)

### Improvements 🛠

* The IonQ API version accessed via the plugin is updated from 0.1 to 0.3
[(#75)](https://github.com/PennyLaneAI/PennyLane-IonQ/pull/75)
[(#96)](https://github.com/PennyLaneAI/PennyLane-IonQ/pull/96)

* Use new `backend` field to specify `qpu`.
[(#81)](https://github.com/PennyLaneAI/PennyLane-IonQ/pull/81)

### Contributors ✍️

This release contains contributions from (in alphabetical order):

Spencer Churchill
Lillian Frederiksen

---
# Release 0.32.0
Expand Down
14 changes: 6 additions & 8 deletions doc/devices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ IonQ Devices
The PennyLane-IonQ plugin provides the ability for PennyLane to access
devices available via IonQ's online API.

Currently, access is available to two remote devices: an ideal and
a noisy trapped-ion simulator.
Currently, access is available to two remote devices: one to access an ideal
trapped-ion simulator and another to access to IonQ's trapped-ion QPUs.

.. raw::html
<section id="simulator">
Ideal trapped-ion simulator
------------------------

This device provides an ideal noiseless trapped-ion simulation.
Once the plugin has been installed, you can use this device
directly in PennyLane by specifying ``"ionq.simulator"``:
The :class:`~.pennylane_ionq.SimulatorDevice` provides an ideal noiseless trapped-ion simulation.
Once the plugin has been installed, you can use this device directly in PennyLane by specifying ``"ionq.simulator"``:

.. code-block:: python
Expand All @@ -38,9 +37,8 @@ directly in PennyLane by specifying ``"ionq.simulator"``:
Trapped-Ion QPU
---------------

This device provides access to IonQ's trapped-ion QPUs.
Once the plugin has been installed, you can use this device
directly in PennyLane by specifying ``"ionq.qpu"`` with a
The :class:`~.pennylane_ionq.QPUDevice` provides access to IonQ's trapped-ion QPUs. Once the plugin has been
installed, you can use this device directly in PennyLane by specifying ``"ionq.qpu"`` with a
``"backend"`` from `available backends <https://docs.ionq.com/#tag/jobs>`_:

.. code-block:: python
Expand Down
12 changes: 6 additions & 6 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ autograd==1.4
autoray==0.3.2
Babel==2.10.3
cachetools==5.2.0
certifi==2022.5.18.1
certifi==2023.7.22
charset-normalizer==2.0.12
docutils==0.18.1
future==0.18.2
future==0.18.3
idna==3.3
imagesize==1.3.0
Jinja2==3.1.2
Expand All @@ -18,13 +18,13 @@ numpy==1.22.4
packaging==21.3
PennyLane==0.24.0
PennyLane-Lightning==0.24.0
Pygments==2.12.0
Pygments==2.15.0
pyparsing==3.0.9
python-dateutil==2.8.2
pytz==2022.1
requests==2.28.0
requests==2.31.0
retworkx==0.11.0
scipy==1.8.1
scipy==1.10.0
semantic-version==2.6.0
six==1.16.0
snowballstemmer==2.2.0
Expand All @@ -37,6 +37,6 @@ sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
toml==0.10.2
urllib3==1.26.9
urllib3==1.26.18
# do not pin
pennylane-sphinx-theme
2 changes: 1 addition & 1 deletion pennylane_ionq/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.33.0-dev"
__version__ = "0.35.0-dev"
Loading

0 comments on commit 7f4462c

Please sign in to comment.