Redo example notebook on Quantum Phase Estimation (QPE) #625
Workflow file for this run
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
name: check examples | |
on: | |
pull_request: | |
branches: | |
- main | |
schedule: | |
# 04:00 every Saturday morning | |
- cron: '0 4 * * 6' | |
jobs: | |
changes: | |
runs-on: ubuntu-22.04 | |
outputs: | |
examples: ${{ steps.filter.outputs.examples }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
base: ${{ github.ref }} | |
filters: | | |
examples: | |
- 'examples/**' | |
- 'example_requirements.txt' | |
- '.github/workflows/check-examples.yml' | |
check: | |
name: check examples | |
needs: changes | |
if: github.event_name == 'schedule' || needs.changes.outputs.examples == 'true' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: install python requirements for notebooks | |
run: | | |
cd examples | |
python -m pip install --upgrade pip | |
python -m pip install pre-commit==3.0.0 | |
python -m pip install wheel | |
python -m pip install -r example_requirements.txt | |
python -m pip install pytket-qsharp==0.35.0 | |
python -m pip install pytket-pyquil==0.29.0 | |
python -m pip install -c constraints.txt jupyter plotly | |
python -m pip install docker p2j | |
- name: install dotnet SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: install iqsharp | |
run: | | |
dotnet tool install -g Microsoft.Quantum.IQSharp | |
dotnet iqsharp install --user | |
- name: pull docker images | |
run: | | |
docker pull rigetti/quilc | |
docker pull rigetti/qvm | |
- name: install pre-commit hooks and check format with black | |
run: | | |
pre-commit install | |
pre-commit run --all-files black | |
- name: test example notebooks | |
run: | | |
cd examples | |
./check-examples | |
env: | |
PYTKET_QA_QISKIT_TOKEN: ${{ secrets.PYTKET_QA_QISKIT_TOKEN }} |