Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #227

Merged
merged 311 commits into from
Apr 21, 2023
Merged

Dev #227

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
311 commits
Select commit Hold shift + click to select a range
11021b9
update az
Q-lds Feb 23, 2023
0180c17
add az cli
Q-lds Feb 23, 2023
dee57a4
parasm: update_from_dict and asdict
Feb 23, 2023
cd36407
qaoa evaluate circuit
Feb 23, 2023
a9aa434
Merge branch 'dev' into dev_azure_tests
shahidee44 Feb 23, 2023
2406a70
update tests
Q-lds Feb 23, 2023
41afda5
Change dockerfile
Q-lds Feb 23, 2023
23effd8
Merge branch 'dev' into docker_aws
Q-lds Feb 23, 2023
d52c366
Update unittests, notebooks and error messages
shahidee44 Feb 23, 2023
d5f7255
Merge branch 'dev' into dev_azure_tests
shahidee44 Feb 23, 2023
ea20d8c
Missing docstring quotation marks
shahidee44 Feb 24, 2023
70e22f1
gate applicator design for vectorized and qiskit
vishal-ph Feb 26, 2023
538af2c
Added gate applicators for braket and pyquil backends
shahidee44 Feb 27, 2023
20527a3
qaoa.evaluate_circuit
Feb 27, 2023
c6c14aa
test qaoa.evaluate_circuit
Feb 27, 2023
e706ea0
more tests evaluate_circuit
Feb 28, 2023
dc36fe6
more tests evaluate_circuit
Feb 28, 2023
3fd6463
analytical simulator evaluate_circuit
Feb 28, 2023
ddc2712
Updated docstrings
shahidee44 Feb 28, 2023
cab16e0
random qubo for evaluate_circuit
Feb 28, 2023
ec06873
assert cost>=0, evaluate_circuit
Feb 28, 2023
9a9497f
better print when evaluating circuit qaoa object
Feb 28, 2023
ad8f5b7
Merge remote-tracking branch 'origin/dev' into dev_evaluate_circuit
Feb 28, 2023
adcdb95
class Benchmark (qaoa)
Feb 28, 2023
daf0e72
bug fixed test
Feb 28, 2023
7b4e118
Update create_device and get_qaoa_backend method for optional modules
shahidee44 Feb 28, 2023
4fc83ee
Update unittest
shahidee44 Feb 28, 2023
bf8d30d
Merge pull request #190 from entropicalabs/dev_azure_tests
Q-lds Mar 1, 2023
06dcd0c
first benchmark implementation, still work to do
Mar 2, 2023
d899360
fixed: optimizers notebook
Mar 2, 2023
ca6d53f
evaluate_circuit, compute expect with same counts
Mar 2, 2023
4572fb2
test optimizers notebook
Mar 2, 2023
3ca27a7
Merge branch 'dev' into dev_optimizers_notebook
Mar 2, 2023
e4f6efd
Update unittest test_gates and return statements for apply_gate metho…
shahidee44 Mar 2, 2023
74004b4
second benchmark implementation, still work to do
Mar 2, 2023
67e7db5
number 13 for optimizers notebook
Mar 2, 2023
b3bee36
Removed commented code
shahidee44 Mar 2, 2023
032fef4
Merge pull request #188 from entropicalabs/dev_optimizers_notebook
vishal-ph Mar 2, 2023
2978160
Merge branch 'dev_evaluate_circuit' into dev_benchmark
Mar 2, 2023
55e3aa3
second.2 benchmark implementation still work to do
Mar 2, 2023
c4126de
fix index.rst docs
Mar 2, 2023
5fab988
Update index.rst
Q-lds Mar 3, 2023
1fe7e02
Update index.rst
Mar 3, 2023
c8abbad
update evaluate_circuit input must be list or dict
Mar 3, 2023
a2de9c1
update evaluate_circuit
Mar 3, 2023
dbef676
fix warning invalid location device
Mar 3, 2023
18482bb
Merge pull request #195 from entropicalabs/dev_docs
Q-lds Mar 3, 2023
4665e0b
update evaluate_circuit test
Mar 3, 2023
87d32a1
Update qaoa_device.py
Mar 3, 2023
9d39cb1
Bug Fix: Added missing constant term contribution in energy_expectation
Mar 3, 2023
2412402
update qaoa benchmark
Mar 3, 2023
0eac80d
Merge pull request #197 from entropicalabs/bugfix_energy_expectation
vishal-ph Mar 6, 2023
33a8e57
Merge pull request #196 from entropicalabs/fix_warning_invalid_location
vishal-ph Mar 6, 2023
aed54a9
update qaoa benchmark
Mar 6, 2023
f0d20ab
Updated error message, Added Braket GateApplicator unittest
shahidee44 Mar 6, 2023
d075917
Added Qiskit GateApplicator unittests, Renamed unittest file
shahidee44 Mar 7, 2023
2b3476a
Updated error message
shahidee44 Mar 7, 2023
55ba09b
Added Pyquil GateApplicator unittests
shahidee44 Mar 7, 2023
4cfabea
Update Error message
shahidee44 Mar 7, 2023
0b588bd
Merge remote-tracking branch 'origin/dev' into dev_benchmark
Mar 7, 2023
4e83a91
Added Vectorized unittests and Updated older unittests documentation
shahidee44 Mar 7, 2023
0931f8f
Removed raising of ValueError
shahidee44 Mar 7, 2023
77ed692
number of optimizers notebook
Mar 7, 2023
0a99c2d
qaoa benchmark-> just one metod to run main and reference
Mar 7, 2023
20bf714
new notebook: qaoa benchmark
Mar 7, 2023
a6237e6
library is now the attribute for GateApplicator objects
shahidee44 Mar 7, 2023
1f93394
new assertion qaoa_benchmark.run
Mar 7, 2023
a682d04
updates notebook benchmark
Mar 7, 2023
a37f8f7
updates notebook benchmark
Mar 7, 2023
ec54f47
Merge remote-tracking branch 'origin/dev' into dev_evaluate_circuit
Mar 7, 2023
30a1b1b
updates notebook benchmark
Mar 7, 2023
c091841
Merge branch 'dev_evaluate_circuit' into dev_benchmark
Mar 7, 2023
7709cae
Merge pull request #11 from entropicalabs/dev
alejomonbar Mar 7, 2023
a9b0869
Adding the unbalanced penalization paper and solving some issues
alejomonbar Mar 7, 2023
7d082f9
Update test_converters.py
alejomonbar Mar 7, 2023
1c96363
Update test_converters.py
alejomonbar Mar 7, 2023
4e2c9ce
benchmark always initialize values
Mar 8, 2023
ffc11ce
tests benchmark, not finished
Mar 8, 2023
5b744f2
Merge branch 'dev_benchmark' of github.com:entropicalabs/openqaoa int…
Mar 8, 2023
07161ee
tests benchmark updated
Mar 8, 2023
1834205
benchmark removed not necessary checks
Mar 8, 2023
38908c0
benchmark bug fixes
Mar 8, 2023
19907f8
tests benchmark updated
Mar 8, 2023
db6fb17
notebook 14 in tests and docs
Mar 8, 2023
0df2dfd
title option for benchmark plot
Mar 9, 2023
f2033d9
minor changes benchmark
Mar 9, 2023
64de4e0
difference_std benchmark
Mar 9, 2023
4e36085
updated test benchmark
Mar 9, 2023
7e67586
updated notebook 14, benchmark
Mar 9, 2023
52ffa64
minor change plot benchmark
Mar 9, 2023
8c1c8ca
updated test benchmark
Mar 9, 2023
23a5cf8
from openqaoa import QAOABenchmark
Mar 9, 2023
0d48ddb
updated benchmark-> run-> verbose
Mar 9, 2023
e0b0e7e
raise error when set properties after compilation
Mar 9, 2023
98fe8b4
Updated setup for entrypoints and Removed core depedency on plugn
shahidee44 Mar 9, 2023
b248912
Updated unittest
shahidee44 Mar 9, 2023
aeb0206
Update tests
Q-lds Mar 9, 2023
91de924
fix 6 notebook, not changing properties after compilation
Mar 9, 2023
3ea4bda
fix analytical tests, not changing properties after compilation
Mar 9, 2023
59faf85
Adding bin packing problem with testing
alejomonbar Mar 9, 2023
b42708b
Merged with dev
shahidee44 Mar 9, 2023
355adb6
updated docstring run benchmark
Mar 10, 2023
2d81b8f
update test variational_params_asdict
Mar 10, 2023
cdb1702
update test workflow to run selectively
vishal-ph Mar 10, 2023
461c31f
updated label conditional
vishal-ph Mar 10, 2023
efbe30b
syntax fix attempt
vishal-ph Mar 10, 2023
7b6e865
trigger for running test onlabel removal
vishal-ph Mar 10, 2023
1e66c0e
updated notebook 6
Mar 10, 2023
a1467be
Update converters.py
alejomonbar Mar 10, 2023
ff8e70a
fixed file name dump method workflows
Mar 10, 2023
9b1bbdd
adding test
alejomonbar Mar 10, 2023
805ff3e
evaluate circuit with params object
Mar 13, 2023
86b0059
Merge pull request #199 from entropicalabs/dev_warning_set_after_compile
vishal-ph Mar 13, 2023
fc6ec88
toggle based on draft status
vishal-ph Mar 13, 2023
1979b26
Update docker-compose.yml
Q-lds Mar 13, 2023
0deb49c
Update Dockerfile
Q-lds Mar 13, 2023
54d0c70
dump method: prepend_id=False as default
Mar 13, 2023
ad5e943
Merge pull request #200 from entropicalabs/fix_file_name_dump
Q-lds Mar 14, 2023
2b8b22f
Update flags and test_dev.yml
shahidee44 Mar 14, 2023
8f6a67a
Update converters.py
alejomonbar Mar 14, 2023
8df3843
remove print qaoa benchmark
Mar 16, 2023
d5210f9
labels_legend for plot method: QAOABenchmark
Mar 16, 2023
04da3df
benchmark notebook: compare QPU vs simulator
Mar 16, 2023
639bc9f
updating bin packing tests
alejomonbar Mar 16, 2023
442d20d
Update binpacking.py
alejomonbar Mar 16, 2023
176a205
adding bin packing weight test
alejomonbar Mar 16, 2023
f497a3e
Merge branch 'dev' into dev_evaluate_circuit
vishal-ph Mar 19, 2023
749557d
Merge pull request #13 from entropicalabs/dev
alejomonbar Mar 20, 2023
acd4e55
Merge pull request #194 from entropicalabs/dev_benchmark
vishal-ph Mar 20, 2023
0488747
black formatting
vishal-ph Mar 20, 2023
810055a
Adding the Maximal independent set (MIS) problem
alejomonbar Mar 20, 2023
758ce84
Update maximalindependentset.py
alejomonbar Mar 20, 2023
1f629d5
checks for compatibility with params argument for evaluate_circuit an…
vishal-ph Mar 20, 2023
6464410
fixed issue with docstring indentation
vishal-ph Mar 20, 2023
daa41c9
minor fix to vectorized backend and typo fix in evaluate_circuit
vishal-ph Mar 20, 2023
932d1cd
fixed failing tests
vishal-ph Mar 20, 2023
d97753a
Renamed utilities.py in plugins to backend_config.py and updated repo…
shahidee44 Mar 20, 2023
f9a09eb
Removed commented out code
shahidee44 Mar 20, 2023
f2787b5
Merge pull request #192 from entropicalabs/dev_evaluate_circuit
vishal-ph Mar 21, 2023
1077857
Merge branch 'dev' into docker_aws
vishal-ph Mar 21, 2023
f179d50
Update test_workflows.py
vishal-ph Mar 21, 2023
fad417f
run test on PR draft conditional is false
vishal-ph Mar 21, 2023
985ad99
Merge branch 'docker_aws' of github.com:entropicalabs/openqaoa into d…
vishal-ph Mar 21, 2023
9985058
Merge pull request #187 from entropicalabs/docker_aws
vishal-ph Mar 21, 2023
6f37f1a
updated create_device error message for incorrect device location
vishal-ph Mar 21, 2023
26aa6e9
Merge branch 'dev' into dev_gate_applicator
vishal-ph Mar 21, 2023
cfe711d
Changed braket location name to aws
shahidee44 Mar 21, 2023
464dbe8
Merge pull request #193 from entropicalabs/dev_gate_applicator
vishal-ph Mar 21, 2023
df8ca01
added new dictionary method to Hamiltonian class, and few other updates
vishal-ph Mar 22, 2023
c9ff7dd
bugfix in qaoa_circuit in qiskit backend
vishal-ph Mar 23, 2023
537da18
Merge pull request #212 from entropicalabs/dev_tranpile_fix
shahidee44 Mar 23, 2023
a92efc7
fixed permute_counts method and fixed dicke_wavefunction docstring
vishal-ph Mar 24, 2023
d762196
Update converters.py
alejomonbar Mar 24, 2023
736397c
addressing the comments
alejomonbar Mar 24, 2023
ab2690d
Update maximalindependentset.py
alejomonbar Mar 24, 2023
7596b82
Merge pull request #14 from entropicalabs/dev
alejomonbar Mar 24, 2023
9c225dc
added constant term to dictionary
vishal-ph Mar 26, 2023
2c52144
updated tests
vishal-ph Mar 27, 2023
afe0f01
adding portfolio optimization problem
alejomonbar Mar 27, 2023
5bddcea
Merge pull request #15 from entropicalabs/dev
alejomonbar Mar 27, 2023
54dbd49
removed entropica specific qpu tests
vishal-ph Mar 27, 2023
5fb120e
Fixed qiskit deprecation warning, updated unittests and DeviceQiskit
shahidee44 Mar 27, 2023
5796b84
issue with github actions, changing the location of draft conditional
vishal-ph Mar 27, 2023
adf1e18
Update test with draft check
Q-lds Mar 28, 2023
3278e64
Update test_dev.yml
shahidee44 Mar 28, 2023
d353fe4
Merge pull request #217 from entropicalabs/dev_update_entry_point
vishal-ph Mar 28, 2023
a248b43
merged dev
vishal-ph Mar 28, 2023
6140672
Merge branch 'dev' into dev_fix_utility_functions
vishal-ph Mar 28, 2023
4687a10
Update entry_points to use select
shahidee44 Mar 28, 2023
2b78dc3
Added comments for plugin_infde
shahidee44 Mar 28, 2023
35e2451
Removed extra parenthesis
shahidee44 Mar 28, 2023
7736b6b
Updated entry_points
shahidee44 Mar 28, 2023
91ebd13
Added importlib-metadata to setup.py
shahidee44 Mar 28, 2023
8d42031
Add branch for different python versions
shahidee44 Mar 28, 2023
dbde127
Merge pull request #210 from entropicalabs/dev_hamiltonian_dict_method
vishal-ph Mar 28, 2023
945ae3f
Removed unused import
shahidee44 Mar 28, 2023
4480145
Merge pull request #215 from entropicalabs/dev_fix_utility_functions
vishal-ph Mar 28, 2023
6b1f8fa
solving the warnings
alejomonbar Mar 30, 2023
0572813
Update test_dev.yml
alejomonbar Mar 30, 2023
1266f0d
Update test_dev.yml
alejomonbar Mar 30, 2023
2e2bb43
Update test_dev.yml
Q-lds Mar 31, 2023
f6634bc
Merge branch 'dev' into solving_issues_with_FromDocplex2IsingModel
Q-lds Mar 31, 2023
2ad3f4b
Update test_dev.yml
Q-lds Mar 31, 2023
8f9f3fe
Update test_dev.yml
Q-lds Mar 31, 2023
55305d4
Update test_dev.yml
Q-lds Mar 31, 2023
70f69ed
Update test_dev.yml
Q-lds Mar 31, 2023
96c2d17
Update test_dev.yml
Q-lds Mar 31, 2023
c248a12
Update test_dev.yml
Q-lds Mar 31, 2023
d330e1d
Update test_dev.yml
Q-lds Mar 31, 2023
510279b
Update test_dev.yml
Q-lds Mar 31, 2023
1802b5d
Update test_dev.yml
Q-lds Mar 31, 2023
222046b
Update test_dev.yml
Q-lds Mar 31, 2023
e58c855
Update test_dev.yml
Q-lds Mar 31, 2023
d32ed80
Update test_dev.yml
Q-lds Mar 31, 2023
fb2b119
Update test_dev.yml
Q-lds Mar 31, 2023
5da5ea8
Update test_dev.yml
Q-lds Mar 31, 2023
2a6396f
Update test_dev.yml
Q-lds Mar 31, 2023
047f756
Update test_dev.yml
Q-lds Mar 31, 2023
05e9b18
Create ted_dev_ext.yml
Q-lds Mar 31, 2023
19d7b69
Update maximalindependentset.py
alejomonbar Mar 31, 2023
413be89
Update and rename ted_dev_ext.yml to test_dev_ext.yml
Q-lds Mar 31, 2023
c3ff807
Update test_dev.yml
Q-lds Mar 31, 2023
908ddf0
Update test_dev_ext.yml
Q-lds Mar 31, 2023
e163c02
Merge pull request #219 from entropicalabs/dev_update_entry_point
vishal-ph Mar 31, 2023
6a2c36c
Add files via upload
alejomonbar Mar 31, 2023
ef3a48e
Merge pull request #16 from entropicalabs/dev
alejomonbar Mar 31, 2023
9e79230
Update test_dev.yml
alejomonbar Mar 31, 2023
ee37e93
Merge pull request #17 from alejomonbar/dev
alejomonbar Mar 31, 2023
ce434d4
Merge pull request #18 from alejomonbar/dev
alejomonbar Mar 31, 2023
875eb6e
Merge pull request #19 from alejomonbar/dev
alejomonbar Mar 31, 2023
3325fcd
Merge pull request #198 from alejomonbar/solving_issues_with_FromDocp…
vishal-ph Apr 3, 2023
ca38b03
Update .readthedocs.yml to reflect setup change
Q-lds Apr 4, 2023
34d8e09
Merge branch 'dev' into bin_packing
vishal-ph Apr 6, 2023
955a48d
Merge pull request #201 from alejomonbar/bin_packing
vishal-ph Apr 6, 2023
a6c6db7
UF: Adding the vehicle routing problem
alejomonbar Apr 6, 2023
cb2044c
Merge branch 'dev' into vehicle_routing_problem
alejomonbar Apr 6, 2023
3bb9384
Adding tests to the VRP
alejomonbar Apr 7, 2023
9a0afc7
Fix numpy bug in serialization and minor format fixes
Q-lds Apr 8, 2023
870b02c
fix dump issue with the coost value
Q-lds Apr 8, 2023
039e555
dump fixed; rqaoa header still failing
Q-lds Apr 8, 2023
dc49225
fix RQAOA dum test
Q-lds Apr 8, 2023
f5a6d38
Change runby flag
Q-lds Apr 9, 2023
169c756
update qpu flag in tests
Q-lds Apr 9, 2023
c2b987c
fix notebook tests
Q-lds Apr 9, 2023
56facfa
Merge branch 'dev' into maximal_independent_set
vishal-ph Apr 11, 2023
627f432
added missing comma in test_problems.py after fixing merge conflicts
vishal-ph Apr 11, 2023
56bd50c
Merge pull request #208 from alejomonbar/maximal_independent_set
vishal-ph Apr 12, 2023
ab09dd9
Merge branch 'dev' into portfolio-optimization
vishal-ph Apr 12, 2023
0ba59fe
ran black formatting and a few cosmetic changes
vishal-ph Apr 12, 2023
5579a2d
applied black formatting and removed an unused import
vishal-ph Apr 12, 2023
aad2b76
Merge branch 'dev' into vehicle_routing_problem
vishal-ph Apr 12, 2023
14fa3ca
black formatting or remaining code and fixed missing braket after res…
vishal-ph Apr 12, 2023
8871b12
Merge branch 'main' into dev
vishal-ph Apr 12, 2023
a79ef73
Update portfoliooptimization.py
alejomonbar Apr 14, 2023
6e42049
Update portfoliooptimization.py
alejomonbar Apr 14, 2023
d9f2d4e
Adding Vishal's suggestions
alejomonbar Apr 14, 2023
7c007af
Merge pull request #216 from alejomonbar/portfolio-optimization
vishal-ph Apr 17, 2023
b078bd8
Add dump numpy test
Q-lds Apr 17, 2023
640803b
Merge branch 'dev' into vehicle_routing_problem
vishal-ph Apr 17, 2023
04a984d
fixing some issues
alejomonbar Apr 17, 2023
cb3e829
adding extra-tests
alejomonbar Apr 17, 2023
a09da85
Add -1 as default value of subtours
alejomonbar Apr 17, 2023
b5ca80f
Merge pull request #224 from alejomonbar/vehicle_routing_problem
vishal-ph Apr 18, 2023
005def6
select method for plugins in py3_10
vishal-ph Apr 18, 2023
d644c5d
Update readme and gh actions
Q-lds Apr 19, 2023
97a80ff
Update gh actions
Q-lds Apr 19, 2023
5c4c95a
Minor change
shahidee44 Apr 19, 2023
7d120d8
skipping tests that have issues with macos and win
vishal-ph Apr 20, 2023
58a5d08
Update main tests to reflect IBM update
Q-lds Apr 20, 2023
86771b2
Merge pull request #225 from entropicalabs/bugfix_dump_methods
vishal-ph Apr 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 33 additions & 30 deletions .github/workflows/test_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: [3.8]
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
test-dev:
runs-on: ubuntu-latest
if : ${{ github.event.pull_request.head.repo.fork == false }} # runs only when fork==false

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -29,8 +23,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}

python-version: 3.8
- name: Log in with Azure
uses: azure/login@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
- name: Install OpenQAOA
run: |
python -m pip install --user virtualenv
Expand All @@ -39,30 +36,35 @@ jobs:
python -m pip install --upgrade pip
pip install .[tests]
pip install ipykernel

- name: Install qvm
- name: Setup IBMQ account
env:
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
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 ..

IBMQ_TOKEN=$IBMQ_TOKEN
source env/bin/activate
python -c'from qiskit_ibm_provider import IBMProvider; import os; IBMProvider.save_account(os.environ.get("IBMQ_TOKEN"))'
- name: Setup AWS
env:
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
run: |
python -m pip install awscli
aws configure set aws_access_key_id $ACCESS_KEY
aws configure set aws_secret_access_key $SECRET_ACCESS_KEY
aws configure set region us-west-1
aws configure set output json
- name: Build the docker stack
run: |
docker login -u AWS -p $(aws ecr get-login-password --region us-east-1) 292282985366.dkr.ecr.us-east-1.amazonaws.com
docker network create local_bridge
docker build -t amazon-braket-oq-dev .
docker-compose up -d
- name: Run tests
run: |
source env/bin/activate
ipython kernel install --name "env" --user
python -m pytest -v -m 'not (qpu or api or docker_aws)' --cov --cov-report=xml:coverage.xml
pytest tests/ -m 'not (qpu or sim)' --cov --cov-report=xml:coverage.xml

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
Expand All @@ -71,6 +73,7 @@ jobs:

docs:
runs-on: ubuntu-latest
if : github.event.pull_request.draft == false && github.event.pull_request.head.repo.fork == false
steps:
- name: Check out openqaoa
uses: actions/checkout@v3
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/test_dev_ext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
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.8
- 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
pip install .[tests]
pip install ipykernel
- name: Run tests
run: |
source env/bin/activate
ipython kernel install --name "env" --user
pytest tests/ -v -m 'not (qpu or docker_aws or api or sim or braket_api)'

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.8

- name: Install OpenQAOA
run: |
python -m pip install --upgrade pip
pip install .[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"
52 changes: 30 additions & 22 deletions .github/workflows/test_main_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ jobs:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

# 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@v4
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}

- name: Log in with Azure
uses: azure/login@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
- name: Install OpenQAOA
run: |
python -m pip install --user virtualenv
Expand All @@ -37,37 +40,42 @@ jobs:
python -m pip install --upgrade pip
pip install .[tests]
pip install ipykernel
- name: QVM on ubuntu
if: ${{ matrix.os=='ubuntu-latest' }}
- name: Setup IBMQ account
env:
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
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 ..

IBMQ_TOKEN=$IBMQ_TOKEN
source env/bin/activate
python -c'from qiskit_ibm_provider import IBMProvider; import os; IBMProvider.save_account(os.environ.get("IBMQ_TOKEN"))'
- name: Setup AWS
env:
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
run: |
python -m pip install awscli
aws configure set aws_access_key_id $ACCESS_KEY
aws configure set aws_secret_access_key $SECRET_ACCESS_KEY
aws configure set region us-west-1
aws configure set output json
- name: Build the docker stack
run: |
docker login -u AWS -p $(aws ecr get-login-password --region us-east-1) 292282985366.dkr.ecr.us-east-1.amazonaws.com
docker network create local_bridge
docker build -t amazon-braket-oq-dev .
docker-compose up -d
- name: Run tests
run: |
source env/bin/activate
ipython kernel install --name "env" --user
python -m pytest -v -m 'not (qpu or api or docker_aws)'
pytest tests/ -m 'not (qpu or sim)' --cov --cov-report=xml:coverage.xml

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage.xml


docs:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_main_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
run: |
source env/bin/activate
ipython kernel install --user --name "env"
python -m pytest -v -m 'not (qpu or api or docker_aws)'
pytest tests/ -m 'not (qpu or api or docker_aws or braket_api or sim)'
9 changes: 2 additions & 7 deletions .github/workflows/test_main_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,10 @@ jobs:
Start-Process -FilePath "C:\Program Files\Rigetti Computing\Forest SDK for Windows\quilc.exe" -ArgumentList "-S" -PassThru
Start-Process -FilePath "C:\Program Files\Rigetti Computing\Forest SDK for Windows\qvm.exe" -ArgumentList "-S" -PassThru

# Run all tests and compute coverage reports
# Run all tests
- name: Run tests
env:
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
IBMQ_HUB: ibm-q
IBMQ_GROUP: open
IBMQ_PROJECT: main
shell: pwsh
run: |
.\env\Scripts\Activate.ps1
ipython kernel install --name "env" --user
python -m pytest -v -m 'not (qpu or api or docker_aws)'
pytest tests/ -m 'not (qpu or api or docker_aws or braket_api or sim)'
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The dockerfile for OpenQAOA braket jobs
FROM 292282985366.dkr.ecr.us-east-1.amazonaws.com/amazon-braket-pytorch-jobs:1.9.1-gpu-py38-cu111-ubuntu20.04

RUN mkdir -p /openqaoa

ADD ./ /openqaoa/

RUN pip3 install /openqaoa/.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,31 @@ Check out OpenQAOA website [https://openqaoa.entropicalabs.com/](https://openqao

## Installation instructions

You can install the latest version of OpenQAOA directly from PyPi. First, create a virtual environment with python3.8+ and then simply pip install openqaoa with the following command
You can install the latest version of OpenQAOA directly from PyPI. First, create a virtual environment with python3.8, 3.9, 3.10 and then pip install openqaoa with the following command

```bash
```
pip install openqaoa
```

Alternatively, you can install manually directly from the GitHub repository by

1. Clone the git repository:

```bash
git clone [email protected]:entropicalabs/openqaoa.git
```
git clone https://github.com/entropicalabs/openqaoa.git
```

2. Creating a python `virtual environment` for this project is recommended. (for instance, using conda). Instructions on how to create a virtual environment can be found [here](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands). Make sure to use **python 3.8** (or newer) for the environment.

2. Creating a python `virtual environment` for this project is recommended. (for instance, using conda). Instructions on how to create a virtual environment can be found [here](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands). Make sure to use **python 3.8** for the environment.
3. After cloning the repository `cd openqaoa` and pip install the package.

3. After cloning the repository `cd openqaoa` and pip install in edit mode. Use the following command for a vanilla install with the `scipy` optimizers:
```
pip install .
```
If you are interested in running the tests or the docs you can do so my using the installment modifiers `[docs]` and `[tests]`. For example,

```bash
pip install -e .
```
pip install .[tests]
```

Should you face any issue during the installation, please drop us an email at [email protected] or open an issue!
Expand Down Expand Up @@ -83,18 +88,19 @@ Devices are serviced both locally and on the cloud. For the IBM Quantum experien
| [Amazon Braket](https://docs.aws.amazon.com/braket/latest/developerguide/braket-devices.html) | IonQ, Rigetti, OQC, and simulators |
| [IBMQ](https://quantum-computing.ibm.com/) | Please check the IBMQ backends available to your account |
| [Rigetti QCS](https://qcs.rigetti.com/sign-in) | Aspen-11, Aspen-M-1, and QVM simulator |
| [Azure](https://azure.microsoft.com/en-us/products/quantum) | IonQ, Quantinuum, Rigetti, QCI |


## Running the tests

To run the test, first, make sure to have installed all the optional testing dependencies by running `pip install .[tests]` (note, the braket must to be escaped if you are using the popular zsh shell), and then just type `pytest tests/.` from the project's root folder.

> :warning: **Some tests require authentication**: all tests flagged `api` or `qpu` require valid qpu crendentials to be specified in `tests/credentials.json`
> :warning: **Some tests require authentication**: Please, check the flags in `pytest.ini`. Currently these testes are marked `qpu`, `api`, `docker_aws`, `braket_api`, `sim`

> :warning: **Some tests require authentication**: Please, note that the PyQuil-Rigetti tests contained in `test_pyquil_qvm.py` requires an active `qvm` (see Rigetti's documentation [here](https://pyquil-docs.rigetti.com/en/v3.1.0/qvm.html))
> :warning: **Some tests require Rigetti's QVM or a valid AWS Jobs docker**: Please, note these tests are marked as `qvm` and `docker_aws` (see Rigetti's documentation [here](https://pyquil-docs.rigetti.com/en/v3.1.0/qvm.html) for more information).

## Contributing and feedback

If you find any bugs or errors, have feature requests, or code you would like to contribute, feel free to open an issue or send us a pull request on GitHub.

We are always interested to hear about projects built with EntropicaQAOA. If you have an application you'd like to tell us about, drop us an email at [email protected].
We are always interested to hear about projects built with EntropicaQAOA. If you have an application you'd like to tell us about, drop us an email at [[email protected]](mailto:[email protected])
Loading