Interface to quantum resource estimation (QRE) tools #1164
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: Continuous Integration | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pip, wheel, pytest, jupyter, pyqsp | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install pytest | |
pip install pytest-cov | |
pip install jupyter | |
pip install pyqsp | |
- name: Install pycodestyle | |
run: | | |
python -m pip install pycodestyle | |
- name: pycodestyle tests | |
run: | | |
cd dev_tools | |
pytest --doctest-modules --junitxml=junit/pycodestyle-test-results.xml test_conformance.py | |
if: always() | |
- name: Install backends except qsharp/qdk | |
run: | | |
pip install qiskit qiskit-aer | |
pip install qulacs | |
pip install amazon-braket-sdk | |
pip install cirq | |
pip install projectq | |
pip install pennylane | |
pip install stim | |
if: always() | |
- name: Install Microsoft qsharp/qdk | |
run: | | |
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | |
sudo dpkg -i packages-microsoft-prod.deb | |
rm packages-microsoft-prod.deb | |
sudo apt-get update; sudo apt-get install -y apt-transport-https && sudo apt-get update | |
sudo apt-get install -y dotnet-sdk-5.0 | |
dotnet tool install -g Microsoft.Quantum.IQSharp | |
$(which dotnet-iqsharp) install --user | |
pip install qsharp | |
if: always() | |
- name: tangelo install | |
run: | | |
python -m pip install . | |
if: always() | |
- name: tangelo no_pyscf tests | |
run: | | |
cd tangelo/toolboxes/molecular_computation/tests | |
pytest --doctest-modules --junitxml=junit/nopyscf-test-results_${{ matrix.python-version }}.xml test_nopyscf.py | |
if: always() | |
- name: Install pyscf | |
run: | | |
python -m pip install pyscf | |
if: always() | |
- name: Install rdkit, openbabel-wheel | |
run: | | |
python -m pip install rdkit | |
python -m pip install openbabel-wheel | |
if: always() | |
- name: Install dependencies for QRE | |
run: | | |
pip install openfermionpyscf | |
pip install benchq | |
if: always() | |
- name: tangelo tests | |
run: | | |
cd tangelo | |
pytest --doctest-modules --junitxml=junit/tangelo-test-results_${{ matrix.python-version }}.xml --cov=. --cov-report=xml --cov-report=html | |
if: always() | |
- name: Upload nopyscf test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tangelo-no-pyscf-test-results | |
path: tangelo/toolboxes/molecular_computation/tests/junit/nopyscf-test-results_${{ matrix.python-version }}.xml | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tangelo-test-results | |
path: tangelo/junit/tangelo-test-results_${{ matrix.python-version }}.xml | |
- name: Upload pytest html results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tangelo-tests-coverage_${{ matrix.python-version }} | |
path: tangelo/htmlcov | |
if: always() | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v3 | |
if: always() |