Skip to content

Integrate Fermionic QAOA(FQAOA) Module and Associated Files into OpenQAOA #358

Integrate Fermionic QAOA(FQAOA) Module and Associated Files into OpenQAOA

Integrate Fermionic QAOA(FQAOA) Module and Associated Files into OpenQAOA #358

Workflow file for this run

name: test_dev_ext
# Controls when the workflow will run
on:
pull_request:
branches:
- dev
# Manual trigger
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test-dev-ext:
runs-on: ubuntu-latest
if : ${{ github.event.pull_request.head.repo.fork == true }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install qvm
run: |
find /usr/lib -name "libffi.so*"
sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so /usr/lib/x86_64-linux-gnu/libffi.so.6
wget -q https://downloads.rigetti.com/qcs-sdk/forest-sdk-2.23.0-linux-deb.tar.bz2
tar -xf forest-sdk-2.23.0-linux-deb.tar.bz2
cd forest-sdk-2.23.0-linux-deb/
sudo apt-get update
sudo apt-get install -y screen libblas-dev libblas3 libgfortran5 liblapack-dev liblapack3
sudo ./forest-sdk-2.23.0-linux-deb.run
qvm --version
quilc --version
echo "Starting qvm and quilc"
screen -d -m qvm -S
screen -d -m quilc -S
cd ..
- name: Install OpenQAOA
run: |
python -m pip install --user virtualenv
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
make local-install
pip install -e ./src/openqaoa-core[tests]
pip install ipykernel
- name: Run tests
run: |
source env/bin/activate
ipython kernel install --name "env" --user
pytest tests/ src/*/tests/ -v -m 'not (qpu or docker_aws or api or sim or braket_api or cplex)'
docs-ext:
runs-on: ubuntu-latest
if : github.event.pull_request.draft == false && github.event.pull_request.head.repo.fork == true
steps:
- name: Check out openqaoa
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install OpenQAOA
run: |
python -m pip install --upgrade pip
pip install .
pip install -e ./src/openqaoa-core[docs]
- name: Install qvm
run: |
find /usr/lib -name "libffi.so*"
sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so /usr/lib/x86_64-linux-gnu/libffi.so.6
wget -q https://downloads.rigetti.com/qcs-sdk/forest-sdk-2.23.0-linux-deb.tar.bz2
tar -xf forest-sdk-2.23.0-linux-deb.tar.bz2
cd forest-sdk-2.23.0-linux-deb/
sudo apt-get update
sudo apt-get install -y screen libblas-dev libblas3 libgfortran5 liblapack-dev liblapack3
sudo ./forest-sdk-2.23.0-linux-deb.run
qvm --version
quilc --version
echo "Starting qvm and quilc"
screen -d -m qvm -S
screen -d -m quilc -S
cd ..
- name: Build and test Sphinx docs
run: |
sudo apt-get install pandoc
mkdir ./docs/source/notebooks
cp ./examples/*.ipynb ./docs/source/notebooks/
cd docs/
make html SPHINXOPTS="-W --keep-going"