11# This code is part of Qiskit.
22#
3- # (C) Copyright IBM 2020.
3+ # (C) Copyright IBM 2020, 2021 .
44#
55# This code is licensed under the Apache License, Version 2.0. You may
66# obtain a copy of this license in the LICENSE.txt file in the root directory
3535 - uses : actions/setup-python@v2
3636 with :
3737 python-version : ${{ matrix.python-version }}
38- - name : Pip cache
39- uses : actions/cache@v2
40- with :
41- path : ~/.cache/pip
42- key : ${{ runner.os }}-pip-checks-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
43- restore-keys : |
44- ${{ runner.os }}-pip-checks-
45- ${{ runner.os }}-pip-
46- ${{ runner.os }}-
4738 - uses : ./.github/actions/install-libraries
4839 - uses : ./.github/actions/install-master-dependencies
4940 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
5344 sudo apt-get -y install python3-enchant
5445 sudo apt-get -y install hunspell-en-us
5546 pip install pyenchant
56- pip install cplex
57- pip install "cvxpy>1.0.0"
5847 pip install https://github.com/rpmuller/pyquante2/archive/master.zip
5948 shell : bash
60- - name : Terminate if failure above
61- run : exit 1
62- if : ${{ !success() }}
63- shell : bash
6449 - run : pip check
6550 if : ${{ !cancelled() }}
6651 shell : bash
@@ -109,27 +94,13 @@ jobs:
10994 - uses : actions/setup-python@v2
11095 with :
11196 python-version : ${{ matrix.python-version }}
112- - name : Pip cache
113- uses : actions/cache@v2
114- with :
115- path : ~/.cache/pip
116- key : ${{ runner.os }}-pip-lint-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
117- restore-keys : |
118- ${{ runner.os }}-pip-lint-
119- ${{ runner.os }}-pip-
120- ${{ runner.os }}-
12197 - uses : ./.github/actions/install-libraries
12298 - uses : ./.github/actions/install-master-dependencies
12399 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
124100 - uses : ./.github/actions/install-aqua
125101 - name : Install Dependencies
126102 run : |
127- pip install "cvxpy>1.0.0"
128103 pip install https://github.com/rpmuller/pyquante2/archive/master.zip
129- - name : Terminate if failure above
130- run : exit 1
131- if : ${{ !success() }}
132- shell : bash
133104 - run : make lint
134105 if : ${{ !cancelled() }}
135106 shell : bash
@@ -149,56 +120,33 @@ jobs:
149120 - uses : actions/setup-python@v2
150121 with :
151122 python-version : ${{ matrix.python-version }}
152- - name : Pip cache
153- uses : actions/cache@v2
154- with :
155- path : ~/.cache/pip
156- key : ${{ runner.os }}-pip-mypy-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
157- restore-keys : |
158- ${{ runner.os }}-pip-mypy-
159- ${{ runner.os }}-pip-
160- ${{ runner.os }}-
161123 - uses : ./.github/actions/install-libraries
162124 - uses : ./.github/actions/install-master-dependencies
163125 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
164126 - uses : ./.github/actions/install-aqua
165127 - name : Mypy under Python ${{ matrix.python-version }}
166- run : |
167- pip install cplex
168- make mypy
128+ run : make mypy
169129 shell : bash
170130 Aqua :
171131 runs-on : ubuntu-latest
172132 strategy :
173133 matrix :
174- python-version : [3.7, 3.8]
134+ python-version : [3.7, 3.8, 3.9 ]
175135 steps :
176136 - uses : actions/checkout@v2
177137 - uses : actions/setup-python@v2
178138 with :
179139 python-version : ${{ matrix.python-version }}
180- - name : Pip cache
181- uses : actions/cache@v2
182- with :
183- path : ~/.cache/pip
184- key : ${{ runner.os }}-${{ matrix.python-version }}-pip-aqua-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
185- restore-keys : |
186- ${{ runner.os }}${{ matrix.python-version }}-pip-aqua-
187- ${{ runner.os }}${{ matrix.python-version }}-pip-
188- ${{ runner.os }}${{ matrix.python-version }}-
189140 - uses : ./.github/actions/install-libraries
190141 - uses : ./.github/actions/install-master-dependencies
191142 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
192143 - uses : ./.github/actions/install-aqua
193144 - name : Install Dependencies
194145 run : |
195- pip install "cvxpy>1.0.0"
196- pip install scikit-quant
197- pip install jax jaxlib
198- shell : bash
199- - name : Install cplex
200- run : pip install cplex
201- if : ${{ matrix.python-version == 3.7 }}
146+ # pin jax and jaxlib as the latest jaxlib 0.1.60 forces
147+ # numpy 1.19.5 to be installed which causes cvxpy failure to load
148+ # with 'numpy.core.multiarray failed to import.' error.
149+ pip install -U jax==0.2.9 jaxlib==0.1.59
202150 shell : bash
203151 - name : Aqua Unit Tests under Python ${{ matrix.python-version }}
204152 uses : ./.github/actions/run-tests
@@ -224,21 +172,12 @@ jobs:
224172 runs-on : ubuntu-latest
225173 strategy :
226174 matrix :
227- python-version : [3.7, 3.8]
175+ python-version : [3.7, 3.8, 3.9 ]
228176 steps :
229177 - uses : actions/checkout@v2
230178 - uses : actions/setup-python@v2
231179 with :
232180 python-version : ${{ matrix.python-version }}
233- - name : Pip cache
234- uses : actions/cache@v2
235- with :
236- path : ~/.cache/pip
237- key : ${{ runner.os }}-${{ matrix.python-version }}-pip-chemistry-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
238- restore-keys : |
239- ${{ runner.os }}-${{ matrix.python-version }}-pip-chemistry-
240- ${{ runner.os }}-${{ matrix.python-version }}-pip-
241- ${{ runner.os }}-${{ matrix.python-version }}-
242181 - uses : ./.github/actions/install-psi4
243182 if : ${{ matrix.python-version == 3.7 }}
244183 - uses : ./.github/actions/install-libraries
@@ -250,25 +189,10 @@ jobs:
250189 if [ -f "$HOME/miniconda/etc/profile.d/conda.sh" ]; then
251190 source "$HOME/miniconda/etc/profile.d/conda.sh"
252191 conda activate
253- # PSI4 has problems with dataclasses
254- pip uninstall -y dataclasses
192+ pip install https://github.com/rpmuller/pyquante2/archive/master.zip
255193 fi
256- sudo apt-get -y install libgfortran5
257- pip install https://github.com/rpmuller/pyquante2/archive/master.zip
258- pip install pyscf
259- shell : bash
260- - name : Install cplex
261- run : |
262- if [ -f "$HOME/miniconda/etc/profile.d/conda.sh" ]; then
263- source "$HOME/miniconda/etc/profile.d/conda.sh"
264- conda activate
265- fi
266- pip install cplex
267- if : ${{ matrix.python-version == 3.7 }}
268194 shell : bash
269195 - name : Chemistry Unit Tests under Python ${{ matrix.python-version }}
270- env :
271- OPENBLAS_NUM_THREADS : 1
272196 uses : ./.github/actions/run-tests
273197 with :
274198 domain : chemistry
@@ -296,29 +220,16 @@ jobs:
296220 runs-on : ubuntu-latest
297221 strategy :
298222 matrix :
299- python-version : [3.7, 3.8]
223+ python-version : [3.7, 3.8, 3.9 ]
300224 steps :
301225 - uses : actions/checkout@v2
302226 - uses : actions/setup-python@v2
303227 with :
304228 python-version : ${{ matrix.python-version }}
305- - name : Pip cache
306- uses : actions/cache@v2
307- with :
308- path : ~/.cache/pip
309- key : ${{ runner.os }}-${{ matrix.python-version }}-pip-finance-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
310- restore-keys : |
311- ${{ runner.os }}-${{ matrix.python-version }}-pip-finance-
312- ${{ runner.os }}-${{ matrix.python-version }}-pip-
313- ${{ runner.os }}-${{ matrix.python-version }}-
314229 - uses : ./.github/actions/install-libraries
315230 - uses : ./.github/actions/install-master-dependencies
316231 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
317232 - uses : ./.github/actions/install-aqua
318- - name : Install cplex
319- run : pip install cplex
320- if : ${{ matrix.python-version == 3.7 }}
321- shell : bash
322233 - name : Finance Unit Tests under Python ${{ matrix.python-version }}
323234 uses : ./.github/actions/run-tests
324235 with :
@@ -343,29 +254,16 @@ jobs:
343254 runs-on : ubuntu-latest
344255 strategy :
345256 matrix :
346- python-version : [3.7, 3.8]
257+ python-version : [3.7, 3.8, 3.9 ]
347258 steps :
348259 - uses : actions/checkout@v2
349260 - uses : actions/setup-python@v2
350261 with :
351262 python-version : ${{ matrix.python-version }}
352- - name : Pip cache
353- uses : actions/cache@v2
354- with :
355- path : ~/.cache/pip
356- key : ${{ runner.os }}-${{ matrix.python-version }}-pip-machinelearning-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
357- restore-keys : |
358- ${{ runner.os }}-${{ matrix.python-version }}-pip-machinelearning-
359- ${{ runner.os }}-${{ matrix.python-version }}-pip-
360- ${{ runner.os }}-${{ matrix.python-version }}-
361263 - uses : ./.github/actions/install-libraries
362264 - uses : ./.github/actions/install-master-dependencies
363265 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
364266 - uses : ./.github/actions/install-aqua
365- - name : Install cplex
366- run : pip install cplex
367- if : ${{ matrix.python-version == 3.7 }}
368- shell : bash
369267 - name : Machine Learning Unit Tests under Python ${{ matrix.python-version }}
370268 uses : ./.github/actions/run-tests
371269 with :
@@ -390,29 +288,16 @@ jobs:
390288 runs-on : ubuntu-latest
391289 strategy :
392290 matrix :
393- python-version : [3.7, 3.8]
291+ python-version : [3.7, 3.8, 3.9 ]
394292 steps :
395293 - uses : actions/checkout@v2
396294 - uses : actions/setup-python@v2
397295 with :
398296 python-version : ${{ matrix.python-version }}
399- - name : Pip cache
400- uses : actions/cache@v2
401- with :
402- path : ~/.cache/pip
403- key : ${{ runner.os }}-${{ matrix.python-version }}-pip-optimization-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
404- restore-keys : |
405- ${{ runner.os }}-${{ matrix.python-version }}-pip-optimization-
406- ${{ runner.os }}-${{ matrix.python-version }}-pip-
407- ${{ runner.os }}-${{ matrix.python-version }}-
408297 - uses : ./.github/actions/install-libraries
409298 - uses : ./.github/actions/install-master-dependencies
410299 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
411300 - uses : ./.github/actions/install-aqua
412- - name : Install cplex
413- run : pip install cplex
414- if : ${{ matrix.python-version == 3.7 }}
415- shell : bash
416301 - name : Optimization Unit Tests under Python ${{ matrix.python-version }}
417302 uses : ./.github/actions/run-tests
418303 with :
@@ -443,42 +328,23 @@ jobs:
443328 - uses : actions/setup-python@v2
444329 with :
445330 python-version : ${{ matrix.python-version }}
446- - name : Pip cache
447- uses : actions/cache@v2
448- with :
449- path : ~/.cache/pip
450- key : ${{ runner.os }}-${{ matrix.python-version }}-pip-tutorials-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
451- restore-keys : |
452- ${{ runner.os }}-${{ matrix.python-version }}-pip-tutorials-
453- ${{ runner.os }}-${{ matrix.python-version }}-pip-
454- ${{ runner.os }}-${{ matrix.python-version }}-
455331 - uses : ./.github/actions/install-libraries
456332 - uses : ./.github/actions/install-master-dependencies
457333 if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
458334 - uses : ./.github/actions/install-aqua
459- - name : Install cplex
460- run : pip install cplex
461- if : ${{ matrix.python-version == 3.6 }}
462- shell : bash
463335 - name : Install Dependencies
464336 run : |
465- sudo apt-get -y install libgfortran5
466337 pip install https://github.com/rpmuller/pyquante2/archive/master.zip
467- pip install pyscf
468- pip install "cvxpy>1.0.0"
469- pip install -U jupyter sphinx nbsphinx sphinx_rtd_theme 'matplotlib<3.3.0' qiskit-terra[visualization] cvxpy
338+ pip install -U jupyter sphinx nbsphinx sphinx_rtd_theme 'matplotlib<3.3.0' qiskit-terra[visualization]
470339 sudo apt-get install -y pandoc graphviz
471340 shell : bash
472341 - name : Run Aqua Tutorials
473- env :
474- OPENBLAS_NUM_THREADS : 1
475342 run : |
476343 git clone https://github.com/Qiskit/qiskit-tutorials
477344 cd qiskit-tutorials
478345 rm -r tutorials/circuits/
479346 rm -r tutorials/circuits_advanced/
480347 rm -r tutorials/noise/
481- rm -r tutorials/pulse/
482348 rm -r tutorials/simulators/
483349 sphinx-build -b html . _build/html
484350 cd _build/html
@@ -501,15 +367,6 @@ jobs:
501367 - uses : actions/setup-python@v2
502368 with :
503369 python-version : ${{ matrix.python-version }}
504- - name : Pip cache
505- uses : actions/cache@v2
506- with :
507- path : ~/.cache/pip
508- key : ${{ runner.os }}-pip-coverage-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
509- restore-keys : |
510- ${{ runner.os }}-pip-coverage-
511- ${{ runner.os }}-pip-
512- ${{ runner.os }}-
513370 - uses : actions/download-artifact@v2
514371 with :
515372 name : aqua3.7
@@ -563,5 +420,5 @@ jobs:
563420 - name : Upload to Coveralls
564421 env :
565422 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
566- run : coveralls || true
423+ run : coveralls --service=github
567424 shell : bash
0 commit comments