Commit Graph

16 Commits

Author SHA1 Message Date
Matthew Treinish b42208d641
Add support for Python 3.11 (#1642)
* Add support for Python 3.11

Python 3.11.0 was released on 10-24-2022, this commit marks the
start of support for Python 3.11 in qiskit. It adds the supported
Python version in the package metadata and updates the CI
configuration to run test jobs on Python 3.11 and build Python
3.11 wheels on release.

* Use manylinux2014 for i686 builds

* install openblas manually

* add cp311-manylinux to the overrides for i686 in pyproject.toml

* Try omitting target for a generic i686 OpenBLAS build

* Set target to pentium 3 for minimum supported ISA level

* Exclude cvxpy on window 3.11 tests

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
2022-11-18 16:29:14 +09:00
Matthew Treinish 13937fdb59
Move Aer to its own package (#1526)
Namespace packages are constant source of problems for users. The python
packaging ecosystem around splitting packages across namespaces is
fragile at the best of times and can often leave a you with an
environment that isn't recoverable (especially when mixing install
methods). There is also a performance hit whenever there is a piece of
the namespace we allow external packages to extend since it requires
doing a full python path search which can be slow depending on the
backing I/O and the number of paths in sys.path for an environment. This
commit addresses the piece from the aer perspective by moving
qiskit.providers.aer to it's own package and namespace 'qiskit_aer'.

Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
2022-08-31 10:33:59 +09:00
Matthew Treinish c7bef3361c
Install Rust compiler and build terra from source in CI (#1498)
Starting with the recently released qiskit-terra 0.20.0 qiskit only
builds packages on manylinux2014 now. This commit update the wheel jobs
for Aer to install the rust compiler and build terra from source when CI uses 
manylinux2010 for i686 builds.
In manylinux2014 for i686, binary of OpenBLAS is not available and its installation
from source codes is necessary. Installation of rust compiler and terra is a
lot less effort than compiling OpenBLAS.
See the details in https://github.com/Qiskit/qiskit-aer/pull/1498.

* Thread control for Thrust CPU is now same as device=CPU

This commit also includes #1497, which fix performance issue in device=Thrust.
A cause of this issue is that Thrust CPU always applied OpenMP for threading
kernel programs without referring to the number of qubits.
This fix applies OpenMP referring to statevector_parallel_threshold parameter
as same as device=CPU.
See the details in https://github.com/Qiskit/qiskit-aer/pull/1497.

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2022-04-06 10:44:33 +09:00
Christopher J. Wood 7bfdbb4e49
Remove legacy controllers (#1316) 2021-08-23 18:32:20 -04:00
Matthew Treinish f15760848b
Add MPI standalone CI build job (#1242)
* Add MPI standalone CI build job

This commit adds a CI job that builds aer in standalone mode with MPI to
ensure that we can build with MPI support. This should hopefully prevent
regressions like #1234 in the future.

* Use mpirun for c++ unit test execution

I'm not sure if the c++ unit tests actually will exercise routines that
are MPI aware, but it doesn't hurt to run it with mpirun (since it's the
only existing test for standalone mode).

* Add step to run qobj with standalone

* Use full path to mpirun

* Explicitly use mpirun.openmpi full path

* Actually install qiskit-terra for qobj test

* Install terra in mpi job too

* Add results validation to qobj standalone test

* Only validate mpi results in mpi job

* Add missing import
2021-04-30 11:35:27 -04:00
Matthew Treinish 99f84a3ca4
Migrate to new provider interface (#1099)
* Migrate to new provider interface

This commit starts the migration to the v2 provider interface. In
qiskit-terra 0.16.0 a new version of the provider interface was added
which is explicitly versioned which enables graceful changes to the
interface over time. For the first version of this new interface the key
changes are the circuits can be passed directly to Backend.run() and to
go along with that a new options object has been added to the backend to
track run time options for a backend.

Co-authored-by: Christopher Wood <cjwood@us.ibm.com>
Co-authored-by: DanPuzzuoli <dan.puzzuoli@gmail.com>
2021-03-24 17:10:45 -04:00
Christopher J. Wood d5deb420fe
Configurable backends (#486)
* Make Aer simulator backends configurable

* Add deprecation warning to backend_options kwarg

* Make pulse_controller only require qobj input

* update tests to remove deprecation warnings

Co-authored-by: Daniel Puzzuoli <dan.puzzuoli@gmail.com>
2020-10-13 15:45:49 -04:00
Christopher J. Wood a0274c33e3
Fix test failures due to qiskit-terra #5125 (#949)
* Fix bug in tests due to qiskit-terra#5125

A recent Terra PR caused an incorrect global_phase value to be set in qobj headers for some circuits. This was causing tests to fail which tested that output unitary and statevectors were phase equal. This PR changes the failing tests to only check that hte output is equal up to global phase until the Terra issue can be fixed.

* Fixup
2020-09-24 12:55:42 -04:00
Daniel Puzzuoli 239f47760d
Fix channel value bug and revamp pulse sim testing (#811)
Co-authored-by: Victor Villar <59838221+vvilpas@users.noreply.github.com>
2020-07-06 15:59:43 -04:00
Victor Villar 05245061b0
Add Conan package manager to the buildsystem (#648)
* Update thrust requirement treatment. 
* Added conan info to contributing guide
* Handle thrust TBB & OMP dependency
* Fixed llvm-openmp treatment for macos. Making it shared for python addon.
* Removing unneeded cmake coded regarding third party libraries.
* Removing unneeded distribution of third party libraries.
* Fixes to make travis work. Muparserx fPIC and conan installation for standalone build.
* Disable fpic for muparserx on windows
* Add catch2 to conan packages
* Remove catch2 distributed files
* Conan dep up in file to avoid requirements conflict
* Back to openmp 9.0.1
* Update requires. Remove conan from requirements
* Remove FindXXXX.cmake files not used any more
* llvm-openmp to 8.0.1 to avoid deprecation warning. Added conan.cmake instead of downloading. Removed hack to avoid deprecation warning
* No global include dir. Removed conanfile.txt
* Remove openblas dependencies in ci
* Bump shots from 2000 to 4000 for non-deterministic/random tests
2020-05-27 19:06:27 +02:00
Daniel Puzzuoli 91840b4db1
Pulse sim initial refactor (#649)
Co-authored-by: vvilpas <vvilpas@gmail.com>
Co-authored-by: Victor Villar <59838221+vvilpas@users.noreply.github.com>
2020-04-17 19:24:11 -04:00
Christopher J. Wood 17c3b10aba
Add backwards compatibility for terra < 0.13 (#686)
* Add backwards compatibility for terra < 0.13

* Exclude broken cmake releases

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2020-04-09 16:38:19 -04:00
Christopher J. Wood fc5e71ad18
Fixes for terra 0.13 release (#676) 2020-04-08 17:26:54 -04:00
Daniel Puzzuoli 8aa1b91326
Update pulse simulator tests to reflect updates in terra (#678)
* updated 1Q schedule constructors

* finished updating test_pulse_simulator.py

* updated pulse usage in verify_wheels.py - amending to force retest
2020-04-01 10:59:34 -04:00
Daniel Puzzuoli b0e254cab4
Added test in verify_wheels.py for pulse simulator (#588)
* Added small test to verify pulse simulator working in verify_wheels.py
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2020-02-06 23:17:36 +01:00
Matthew Treinish 65474a0c9a
Build wheels automatically in CI environment (#168)
* Build wheels automatically in CI environment

Right now when it's time to push a relase of qiskit-aer we have to
manually build wheels for all our supported environments because we
included compiled code in the project. This involves setting up a proper
environment with portable librariers and compilers in Linux, Windows,
and Mac OSX with all 3 versions of python we support. Then manually
building the 9 wheels necessary to publish on pypi. There is no reason
this manual step needs to exist and we can just leverage CI to do our
wheel building when it's time to do a release.

This commit adds initial support for building our wheels in travis
(for linux and osx) and appveyor (for windows). It leverages the
cibuildwheel project to automate the wheel building. This will ensure we
setup the proper environment for all 3 python versions on all 3
environments (for example pulling in the manylinux docker container on
linux).

* Always upload built wheels and set pass for twine upload

This commit fixes 2 things, first it updates the publish artifact task
to always run even if we encounter an error while building wheels. This
gives us the option to manual build and debug failed builds while using
the ci built ones too. Then in the commented out section of the task to
upload the built wheels to pypi the password is set for twine. When the
time comes to prepare this for merge we will need to add the twine
password to the azure config as a secret.


* On windows manually build instead of using cibuildwheel

This commit pivots the windows wheel building environment away from
using cibuildwheel. The aer build environment needs a very specific
setup to work, especially on windows, and getting it working with a
general purpose tool like cibuildwheel is very involved. Mostly because
cibuildwheel is built around creating an isolated environment with
default tools to ensure a clean build every time. This is causing
conflicts with aer's build system expectations and that makes it
difficult to use. When weighing this difficulty against the benefits of
cibuildwheel on windows (which is less than osx or linux where they use
additional tools for validation of output and on linux using the
manylinux docker images) the benefits don't seem worth it. So instead of
relying on cibuildwheel this writes a for loop doing essentially the same
thing, but instead leveraging conda on windows and manually invoking
setup.py instead of using pip wheel.

* Avoid git clean on windows builds

This commit switches away from git clean to use explict rm calls. This
is because the git clean calls are deleting the updated wheels since
they match the wild card in the gitignore file.

* Run wheel publish jobs only on new tags and actually upload

Now that we've finally debugged the wheel build process on all python
versions across all 3 supported OSes it's time to prepare this job for
actually automating wheel publishing at release. This commit does 2
things first it makes all the new jobs conditional so they only run on
new tags (ie a release). The second thing it does is uncomment the twine
upload section. Now after each job finishes it's wheel build it will
upload those files to pypi automatically.

Co-authored-by: Juan Gomez <atilag@gmail.com>
2020-01-31 00:38:27 +01:00