-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix: Missing comma(s) causes an error In #119, we noted that the missing comma in `qcs-api-client>=0.20.13<0.22.0` in `setup.py` was causing issues. With the changes here, the reported problem disappears: ```python >>> import pennylane as qml >>> qml.device("rigetti.qpu", device="Aspen-M-2") <QPUDevice device (wires=80, shots=1000) at 0x132e949d0> ``` What's more, with `pip install -e '.[test]'` in a virtual environment, all unit tests pass. * typo * Fix: failing test * fix: Format with latest black & move requirements into requirements.txt for workflows * fix: Add requirements.txt back in * fix: Include HALT instruction in test * chore(changelog): Add changelog entry * Update setup.py * Update setup.py * fix: Reinstitute requirements.txt, add requirements-test.txt * fix(ci): update & pin dependencies * fix(ci): simplify installation with pip install '.[test]' * fix(ci): Revert back to quilc 1.23.0 --------- Co-authored-by: Albert Mitjans <a.mitjanscoma@gmail.com> Co-authored-by: Josh Izaac <josh146@gmail.com>
- Loading branch information
1 parent
f6f8dad
commit 22a31f8
Showing
10 changed files
with
233 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
name: Formatting check | ||
on: | ||
- pull_request | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.4.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: pip install black | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Run Black | ||
run: black -l 100 pennylane_rigetti/ --check | ||
name: Formatting check | ||
on: | ||
- pull_request | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.4.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: pip install black | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Run Black | ||
run: black -l 100 pennylane_rigetti/ --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,87 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.10"] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.4.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run Forest Quilc | ||
run: docker run --rm -d -p 5555:5555 rigetti/quilc:1.23.0 -R | ||
|
||
- name: Run Forest QVM | ||
run: docker run --rm -d -p 5000:5000 rigetti/qvm -S | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Install requirements | ||
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 | ||
run: python -m pytest tests --cov=pennylane_rigetti --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.7 | ||
with: | ||
file: ./coverage.xml | ||
|
||
integration-tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.10"] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.4.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Run Forest Quilc | ||
run: docker run --rm -d -p 5555:5555 rigetti/quilc:1.23.0 -R | ||
|
||
- name: Run Forest QVM | ||
run: docker run --rm -d -p 5000:5000 rigetti/qvm -S | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install requirements | ||
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 | ||
run: | | ||
pl-device-test --device=rigetti.numpy_wavefunction --tb=short --skip-ops --analytic=True | ||
pl-device-test --device=rigetti.wavefunction --tb=short --skip-ops --analytic=False --shots=20000 | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.7 | ||
with: | ||
file: ./coverage.xml | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.10"] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.4.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run Forest Quilc | ||
run: docker run --rm -d -p 5555:5555 rigetti/quilc:1.23.0 -R | ||
|
||
- name: Run Forest QVM | ||
run: docker run --rm -d -p 5000:5000 rigetti/qvm -S | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Install plugin and test requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[test]' | ||
- name: Run tests | ||
run: python -m pytest tests --cov=pennylane_rigetti --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.7 | ||
with: | ||
file: ./coverage.xml | ||
|
||
integration-tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.10"] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.4.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Run Forest Quilc | ||
run: docker run --rm -d -p 5555:5555 rigetti/quilc:1.23.0 -R | ||
|
||
- name: Run Forest QVM | ||
run: docker run --rm -d -p 5000:5000 rigetti/qvm -S | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install plugin and test requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[test]' | ||
- name: Run tests | ||
run: | | ||
pl-device-test --device=rigetti.numpy_wavefunction --tb=short --skip-ops --analytic=True | ||
pl-device-test --device=rigetti.wavefunction --tb=short --skip-ops --analytic=False --shots=20000 | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.7 | ||
with: | ||
file: ./coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,36 @@ | ||
name: Upload | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Run Forest Quilc | ||
run: docker run --rm -d -p 5555:5555 rigetti/quilc:1.22.0 -R | ||
|
||
- name: Run Forest QVM | ||
run: docker run --rm -d -p 5000:5000 rigetti/qvm -S | ||
|
||
- name: Build and install Plugin | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
python setup.py bdist_wheel | ||
pip install dist/PennyLane*.whl | ||
- name: Install test dependencies | ||
run: | | ||
pip install wheel pytest pytest-cov pytest-mock flaky --upgrade | ||
- name: Run tests | ||
run: | | ||
python -m pytest tests --tb=native | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI }} | ||
name: Upload | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Run Forest Quilc | ||
run: docker run --rm -d -p 5555:5555 rigetti/quilc:1.23.0 -R | ||
|
||
- name: Run Forest QVM | ||
run: docker run --rm -d -p 5000:5000 rigetti/qvm -S | ||
|
||
- name: Install plugin and test dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[test]' | ||
- name: Run tests | ||
run: | | ||
python -m pytest tests --tb=native | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ notebooks/* | |
.pytest_cache/* | ||
.vscode/* | ||
doc/code/api/* | ||
.eggs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
flaky>=3.7.0 | ||
pytest>=7.2.1 | ||
pytest-cov>=4.0.0 | ||
pytest-mock>=3.10.0 | ||
wheel>=0.38.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pyquil>=3.0.0,<4.0.0 | ||
numpy>=1.21,<1.24 | ||
networkx>=2.5,<3.0 | ||
pennylane>=0.18 | ||
qcs-api-client>=0.20.13<0.22.0 | ||
networkx | ||
flaky | ||
pyquil>=3.0.0,<4.0.0 | ||
qcs-api-client>=0.20.13,<0.22.0 |
Oops, something went wrong.