Skip to content

Commit

Permalink
Merge branch 'master' into feature/parameterized-qobj
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseclectic authored Mar 9, 2020
2 parents 312f6d3 + 12b9a23 commit 0de1317
Show file tree
Hide file tree
Showing 213 changed files with 31,077 additions and 5,005 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
*.o
out/*
*.so
rhs*_op.pyx
*.pyc
*_skbuild*
*_cmake_test_compile*
*.whl
*.egg*
build/*
qiskit/providers/aer/backends/libomp.dylib

# Ignore macOS DS_Store
.DS_Store
Expand All @@ -33,4 +35,3 @@ test/.asv
docs/_build/
docs/stubs/
docs/api/

6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "src/third-party/headers/muparserx"]
path = src/third-party/headers/muparserx
url = https://github.com/beltoforion/muparserx
[submodule "src/third-party/headers/thrust"]
path = src/third-party/headers/thrust
url = https://github.com/thrust/thrust.git
218 changes: 201 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,29 @@ sudo: false
# * stage_osx
stage_generic: &stage_generic
install:
- pip install -U 'pip<20.0.0'
- pip install cython
# Installing qiskit-terra master branch...
- pip install https://github.com/Qiskit/qiskit-terra/archive/master.zip
# Install terra from master on aer master else use the most recent release
- |
if [[ $TRAVIS_BRANCH == "master" ]] ; then
pip install -c constraints.txt https://github.com/Qiskit/qiskit-terra/archive/master.zip
else
pip install -U -c constraints.txt qiskit-terra
fi
# Installing qiskit-ibmq-provider stable branch
# This is only needed to suppress warnings when importing Qiskit
- pip install https://github.com/Qiskit/qiskit-ibmq-provider/archive/stable.zip
# Installing qiskit-aer...
- pip install -U -c constraints.txt -r requirements-dev.txt

stage_linux: &stage_linux
<<: *stage_generic
os: linux
dist: xenial
dist: bionic
language: python
python: 3.7
sudo: true
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -y update
- sudo apt-get -y install g++-7
- sudo apt-get -y install libopenblas-dev
Expand All @@ -50,16 +58,21 @@ stage_linux: &stage_linux
if [ ! "$(ls -A .stestr)" ]; then
rm -rf .stestr
fi
script:
- python setup.py bdist_wheel -- -DCMAKE_CXX_COMPILER=g++-7 -- -j4
# Build with Thrust OpenMP CPU backend
- python setup.py bdist_wheel -- -DCMAKE_CXX_COMPILER=g++-7 -DAER_THRUST_BACKEND=OMP -- -j4
- pip install dist/qiskit_aer*whl
script:
- stestr run --slowest

stage_osx: &stage_osx
<<: *stage_generic
os: osx
osx_image: xcode9.2
language: generic
python: 3.7
env:
- MPLBACKEND=ps
- PYTHON_VERSION=3.7.2
cache:
pip: true
directories:
Expand All @@ -85,20 +98,29 @@ stage_osx: &stage_osx
if [ ! "$(ls -A .stestr)" ]; then
rm -rf .stestr
fi
# Build with Thrust OpenMP CPU backend
- python setup.py bdist_wheel -- -DAER_THRUST_BACKEND=OMP -- -j4
- pip install dist/qiskit_aer*whl
script:
- python setup.py bdist_wheel -- -- -j4
- pip install dist/qiskit_aer*whl
script:
- stestr run --slowest

###############################################################################
# Stage-related definitions
###############################################################################

# Define the order of the stages.
stages:
- lint
- test
- name: deploy
if: tag IS present
- name: lint
if: tag IS blank
- name: compile
if: tag IS blank
- name: test
if: tag IS blank

# Define the job matrix explicitly, as matrix expansion causes issues when
# using it with stages and some variables/sections cannot be overridden.
Expand All @@ -111,12 +133,81 @@ jobs:
- stage: lint
name: Python Style and Linter
<<: *stage_linux
before_script: true
script:
- pycodestyle --ignore=E402,W504 --max-line-length=100 qiskit/providers/aer
- pylint -j 2 -rn qiskit/providers/aer

# "compile" stage
###########################################################################
# Linux Wheel
- stage: compile
name: Python Wheel Build Linux
language: python
python: 3.7
os: linux
services:
- docker
env:
- CIBW_BEFORE_BUILD="pip install -U Cython pip virtualenv pybind11 && yum install -y openblas-devel"
- CIBW_SKIP="cp27-* cp34-* *-manylinux_i686"
- CIBW_MANYLINUX_X86_64_IMAGE="manylinux2010"
- CIBW_MANYLINUX_I686_IMAGE="manylinux2010"
- CIBW_TEST_COMMAND="python3 {project}/tools/verify_wheels.py"
- CIBW_TEST_REQUIRES="git+https://github.com/Qiskit/qiskit-terra.git"
script:
- pip install -U pip virtualenv twine
- pip install cibuildwheel==1.1.0
- cibuildwheel --output-dir wheelhouse
- stage: compile
name: Python sdist Build Linux
<<: *stage_linux
before_script:
- pip install -U virtualenv pip setuptools
script:
- python setup.py sdist
- mkdir out; cd out; virtualenv aer-test
- aer-test/bin/pip install git+https://github.com/Qiskit/qiskit-terra
- aer-test/bin/pip install ../dist/*tar.gz
- aer-test/bin/python ../tools/verify_wheels.py
# MacOS Wheel
- stage: compile
name: Python Wheel Build MacOS
<<: *stage_osx
before_script: true
script:
- python setup.py bdist_wheel -- -DAER_THRUST_BACKEND=OMP -- -j4
- stage: compile
name: Python sdist Build MacOS
<<: *stage_osx
before_script:
- pip install -U virtualenv pip setuptools
script:
- python setup.py sdist
- mkdir out; cd out; virtualenv aer-test
- aer-test/bin/pip install git+https://github.com/Qiskit/qiskit-terra
- aer-test/bin/pip install ../dist/*tar.gz
- aer-test/bin/python ../tools/verify_wheels.py
# Linux Standalone
- stage: compile
name: Standalone Build Linux
<<: *stage_linux
language: cpp
install: true
before_script: true
script:
- mkdir out; cd out; cmake ..
- make

# "test" stage
###########################################################################

# GNU/Linux, Python 3.8
- stage: test
name: Python 3.8 Tests Linux
<<: *stage_linux
python: 3.8

# GNU/Linux, Python 3.7
- stage: test
name: Python 3.7 Tests Linux
Expand All @@ -137,29 +228,122 @@ jobs:
<<: *stage_linux
python: 3.5

# OSX, Python 3.7.2 (via pyenv)
# MacOS, Python 3.8 (via pyenv)
- stage: test
name: Python 3.7 Tests OSX
if: type = cron
name: Python 3.8 Tests MacOS
<<: *stage_osx
python: 3.8
env:
- PYTHON_VERSION=3.8.1

# MacOS, Python 3.7 (via pyenv)
- stage: test
name: Python 3.7 Tests MacOS
<<: *stage_osx
python: 3.7
env:
- MPLBACKEND=ps
- PYTHON_VERSION=3.7.2

# OSX, Python 3.6.5 (via pyenv)
# MacOS, Python 3.6 (via pyenv)
- stage: test
if: type = cron
name: Python 3.6 Tests OSX
name: Python 3.6 Tests MacOS
<<: *stage_osx
python: 3.6
env:
- MPLBACKEND=ps
- PYTHON_VERSION=3.6.5

# OSX, Python 3.5.6 (via pyenv)
# MacOS, Python 3.5 (via pyenv)
- stage: test
if: type = cron
name: Python 3.5 Tests MacOS
<<: *stage_osx
name: Python 3.5 Tests OSX
python: 3.5
env:
- MPLBACKEND=ps
- PYTHON_VERSION=3.5.6

# "deploy" stage
##########################################################################
#
- name: Release Linux Wheel Builds and Upload
stage: deploy
language: python
python: 3.7
os: linux
services:
- docker
env:
- CIBW_BEFORE_BUILD="pip install -U Cython pip virtualenv pybind11 && yum install -y openblas-devel"
- CIBW_SKIP="cp27-* cp34-* *-manylinux_i686"
- CIBW_MANYLINUX_X86_64_IMAGE="manylinux2010"
- CIBW_MANYLINUX_I686_IMAGE="manylinux2010"
- TWINE_USERNAME=qiskit
- CIBW_TEST_COMMAND="python3 {project}/tools/verify_wheels.py"
- CIBW_TEST_REQUIRES="git+https://github.com/Qiskit/qiskit-terra.git"
if: tag IS present
script:
- pip install -U pip virtualenv twine
- pip install cibuildwheel==1.1.0
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*
- name: sdist Build and Upload
stage: deploy
if: tag IS present
<<: *stage_linux
env:
- TWINE_USERNAME=qiskit
python: 3.7
before_script:
- pip install -U pip setuptools virtualenv twine
install: true
script:
- python setup.py sdist
- twine upload dist/*
- name: Release MacOS Wheel Builds and Upload
os: osx
stage: deploy
if: tag IS present
env:
- CIBW_BEFORE_BUILD="pip install -U Cython pip virtualenv pybind11"
- CIBW_SKIP="cp27-* cp34-*"
- TWINE_USERNAME=qiskit
- CIBW_TEST_COMMAND="python3 {project}/tools/verify_wheels.py"
- CIBW_TEST_REQUIRES="git+https://github.com/Qiskit/qiskit-terra.git"
addons:
homebrew:
packages:
- openblas
script:
- sudo pip2 install -U pip virtualenv
- sudo pip2 install cibuildwheel==1.1.0 'twine<2.0'
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*
# Power tests (currently failing)
allow_failures:
# Power Build test
- stage: compile
name: Python Wheel Build Linux (Power)
arch: ppc64le
<<: *stage_linux
before_script: true
script:
- python setup.py bdist_wheel -- -DCMAKE_CXX_COMPILER=g++-7 -DAER_THRUST_BACKEND=OMP -- -j4
# Linux Standalone
- stage: compile
name: Standalone Build Linux (Power)
arch: ppc64le
<<: *stage_linux
install: true
before_script: true
script:
- mkdir out; cd out; cmake ..
- make
# Power/Linux, Python 3.7
- stage: test
arch: ppc64le
name: Python 3.7 Tests Linux (Power)
<<: *stage_linux
python: 3.7
Loading

0 comments on commit 0de1317

Please sign in to comment.