1
1
# This code is part of Qiskit.
2
2
#
3
- # (C) Copyright IBM 2020.
3
+ # (C) Copyright IBM 2020, 2021 .
4
4
#
5
5
# This code is licensed under the Apache License, Version 2.0. You may
6
6
# obtain a copy of this license in the LICENSE.txt file in the root directory
35
35
- uses : actions/setup-python@v2
36
36
with :
37
37
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 }}-
47
38
- uses : ./.github/actions/install-libraries
48
39
- uses : ./.github/actions/install-master-dependencies
49
40
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
53
44
sudo apt-get -y install python3-enchant
54
45
sudo apt-get -y install hunspell-en-us
55
46
pip install pyenchant
56
- pip install cplex
57
- pip install "cvxpy>1.0.0"
58
47
pip install https://github.com/rpmuller/pyquante2/archive/master.zip
59
48
shell : bash
60
- - name : Terminate if failure above
61
- run : exit 1
62
- if : ${{ !success() }}
63
- shell : bash
64
49
- run : pip check
65
50
if : ${{ !cancelled() }}
66
51
shell : bash
@@ -109,27 +94,13 @@ jobs:
109
94
- uses : actions/setup-python@v2
110
95
with :
111
96
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 }}-
121
97
- uses : ./.github/actions/install-libraries
122
98
- uses : ./.github/actions/install-master-dependencies
123
99
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
124
100
- uses : ./.github/actions/install-aqua
125
101
- name : Install Dependencies
126
102
run : |
127
- pip install "cvxpy>1.0.0"
128
103
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
133
104
- run : make lint
134
105
if : ${{ !cancelled() }}
135
106
shell : bash
@@ -149,56 +120,33 @@ jobs:
149
120
- uses : actions/setup-python@v2
150
121
with :
151
122
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 }}-
161
123
- uses : ./.github/actions/install-libraries
162
124
- uses : ./.github/actions/install-master-dependencies
163
125
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
164
126
- uses : ./.github/actions/install-aqua
165
127
- name : Mypy under Python ${{ matrix.python-version }}
166
- run : |
167
- pip install cplex
168
- make mypy
128
+ run : make mypy
169
129
shell : bash
170
130
Aqua :
171
131
runs-on : ubuntu-latest
172
132
strategy :
173
133
matrix :
174
- python-version : [3.7, 3.8]
134
+ python-version : [3.7, 3.8, 3.9 ]
175
135
steps :
176
136
- uses : actions/checkout@v2
177
137
- uses : actions/setup-python@v2
178
138
with :
179
139
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 }}-
189
140
- uses : ./.github/actions/install-libraries
190
141
- uses : ./.github/actions/install-master-dependencies
191
142
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
192
143
- uses : ./.github/actions/install-aqua
193
144
- name : Install Dependencies
194
145
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
202
150
shell : bash
203
151
- name : Aqua Unit Tests under Python ${{ matrix.python-version }}
204
152
uses : ./.github/actions/run-tests
@@ -224,21 +172,12 @@ jobs:
224
172
runs-on : ubuntu-latest
225
173
strategy :
226
174
matrix :
227
- python-version : [3.7, 3.8]
175
+ python-version : [3.7, 3.8, 3.9 ]
228
176
steps :
229
177
- uses : actions/checkout@v2
230
178
- uses : actions/setup-python@v2
231
179
with :
232
180
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 }}-
242
181
- uses : ./.github/actions/install-psi4
243
182
if : ${{ matrix.python-version == 3.7 }}
244
183
- uses : ./.github/actions/install-libraries
@@ -250,25 +189,10 @@ jobs:
250
189
if [ -f "$HOME/miniconda/etc/profile.d/conda.sh" ]; then
251
190
source "$HOME/miniconda/etc/profile.d/conda.sh"
252
191
conda activate
253
- # PSI4 has problems with dataclasses
254
- pip uninstall -y dataclasses
192
+ pip install https://github.com/rpmuller/pyquante2/archive/master.zip
255
193
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 }}
268
194
shell : bash
269
195
- name : Chemistry Unit Tests under Python ${{ matrix.python-version }}
270
- env :
271
- OPENBLAS_NUM_THREADS : 1
272
196
uses : ./.github/actions/run-tests
273
197
with :
274
198
domain : chemistry
@@ -296,29 +220,16 @@ jobs:
296
220
runs-on : ubuntu-latest
297
221
strategy :
298
222
matrix :
299
- python-version : [3.7, 3.8]
223
+ python-version : [3.7, 3.8, 3.9 ]
300
224
steps :
301
225
- uses : actions/checkout@v2
302
226
- uses : actions/setup-python@v2
303
227
with :
304
228
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 }}-
314
229
- uses : ./.github/actions/install-libraries
315
230
- uses : ./.github/actions/install-master-dependencies
316
231
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
317
232
- uses : ./.github/actions/install-aqua
318
- - name : Install cplex
319
- run : pip install cplex
320
- if : ${{ matrix.python-version == 3.7 }}
321
- shell : bash
322
233
- name : Finance Unit Tests under Python ${{ matrix.python-version }}
323
234
uses : ./.github/actions/run-tests
324
235
with :
@@ -343,29 +254,16 @@ jobs:
343
254
runs-on : ubuntu-latest
344
255
strategy :
345
256
matrix :
346
- python-version : [3.7, 3.8]
257
+ python-version : [3.7, 3.8, 3.9 ]
347
258
steps :
348
259
- uses : actions/checkout@v2
349
260
- uses : actions/setup-python@v2
350
261
with :
351
262
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 }}-
361
263
- uses : ./.github/actions/install-libraries
362
264
- uses : ./.github/actions/install-master-dependencies
363
265
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
364
266
- uses : ./.github/actions/install-aqua
365
- - name : Install cplex
366
- run : pip install cplex
367
- if : ${{ matrix.python-version == 3.7 }}
368
- shell : bash
369
267
- name : Machine Learning Unit Tests under Python ${{ matrix.python-version }}
370
268
uses : ./.github/actions/run-tests
371
269
with :
@@ -390,29 +288,16 @@ jobs:
390
288
runs-on : ubuntu-latest
391
289
strategy :
392
290
matrix :
393
- python-version : [3.7, 3.8]
291
+ python-version : [3.7, 3.8, 3.9 ]
394
292
steps :
395
293
- uses : actions/checkout@v2
396
294
- uses : actions/setup-python@v2
397
295
with :
398
296
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 }}-
408
297
- uses : ./.github/actions/install-libraries
409
298
- uses : ./.github/actions/install-master-dependencies
410
299
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
411
300
- uses : ./.github/actions/install-aqua
412
- - name : Install cplex
413
- run : pip install cplex
414
- if : ${{ matrix.python-version == 3.7 }}
415
- shell : bash
416
301
- name : Optimization Unit Tests under Python ${{ matrix.python-version }}
417
302
uses : ./.github/actions/run-tests
418
303
with :
@@ -443,42 +328,23 @@ jobs:
443
328
- uses : actions/setup-python@v2
444
329
with :
445
330
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 }}-
455
331
- uses : ./.github/actions/install-libraries
456
332
- uses : ./.github/actions/install-master-dependencies
457
333
if : ${{ !startsWith(github.ref, 'refs/heads/stable') }}
458
334
- uses : ./.github/actions/install-aqua
459
- - name : Install cplex
460
- run : pip install cplex
461
- if : ${{ matrix.python-version == 3.6 }}
462
- shell : bash
463
335
- name : Install Dependencies
464
336
run : |
465
- sudo apt-get -y install libgfortran5
466
337
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]
470
339
sudo apt-get install -y pandoc graphviz
471
340
shell : bash
472
341
- name : Run Aqua Tutorials
473
- env :
474
- OPENBLAS_NUM_THREADS : 1
475
342
run : |
476
343
git clone https://github.com/Qiskit/qiskit-tutorials
477
344
cd qiskit-tutorials
478
345
rm -r tutorials/circuits/
479
346
rm -r tutorials/circuits_advanced/
480
347
rm -r tutorials/noise/
481
- rm -r tutorials/pulse/
482
348
rm -r tutorials/simulators/
483
349
sphinx-build -b html . _build/html
484
350
cd _build/html
@@ -501,15 +367,6 @@ jobs:
501
367
- uses : actions/setup-python@v2
502
368
with :
503
369
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 }}-
513
370
- uses : actions/download-artifact@v2
514
371
with :
515
372
name : aqua3.7
@@ -563,5 +420,5 @@ jobs:
563
420
- name : Upload to Coveralls
564
421
env :
565
422
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
566
- run : coveralls || true
423
+ run : coveralls --service=github
567
424
shell : bash
0 commit comments