Commit Graph

27 Commits

Author SHA1 Message Date
Jun Doi 6f04eb8a0a
Fix CI failures (#2106)
* upgrade github actions for macos_arm64 and windows

* skip pp38/39

* exclude pp

* fix doc

* test

* remove CIBW_TEST_SKIP for wheel
2024-04-25 16:00:41 +09:00
Jun Doi 2150983ebd
Fixes for dependency issues caused by 0.14 release (#2094)
* Fixes for dependency issues

* lint

* lint

* lint

* fix release note

* fix sampler

* fix sampler

* fix sampler

* fix sampler

* remove skip cp38

* hide primitives V2 for qiskit < 1.0

* lint

* add test case for sampling measure for large stabilizer circuit

* reduce warning

* replace test case for large stabilizer with GHZ circuit

* format

* format

* convert basis_gates from list to set

* fix assemble_circuits
2024-04-23 14:36:24 +09:00
Will Shanks bf34aef1d4
Remove unnecessary numpy build dependency (#2089)
numpy C bindings are handled through pybind11 which does not depend on
numpy. numpy is otherwise only a runtime dependency of qiskit-aer. This
change just saves a download during build.
2024-03-29 14:11:06 +09:00
Jun Doi 74e4397d57
Fix qiskit-aer/library/save-instructions/save_data.py (#2064)
* fix qiskit-aer/library/save-instructions/save_data.py

* Remove unsupported qiskit-ibmq-provider from docs job

The tox docs job definition was previously installing the
qiskit-ibmq-provider which is no longer supported and the project is
orphaned. This commit fixes this by removing the unnecessary dependency.

* change build wheel

* test

* test

* Revert "change build wheel"

This reverts commit 23cdf3cb08.

* add use-pep517 to symengine

* add use-pep517 to symengine on Windows

* skip build test for Windows

* test

* test

* test

* test-skip windows and i686

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2024-02-28 18:34:47 +09:00
Matthew Treinish ee519697b5
Add support for running with Python 3.12 (#2022)
* Add support for running with Python 3.12

Python 3.12.0 was released on 10-02-2023, this commit marks the start
of support for Python 3.12 in qiskit-aer. It adds the supported Python
version in the package metadata and updates the CI configuration to run
test jobs on Python 3.12 and build Python 3.12 wheels on release.

* Remove numpy constraints

* Uncap six

* Fix i686 build steps

* Use python 3.12.0 in tests to work around unittest breakage in 3.12.1

* Use 3.12.0 for all test jobs

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-01-15 15:13:47 +00:00
Jun Doi 2478a5be20
Release 0.13.0 (#1964)
* rebuilt release 0.13.0

* fix release highlight
2023-10-26 18:46:30 +09:00
Tung Bui (Leo) 0fb4bc16b7
Remove Python 3.7 from Github actions (#1819)
Since 0.13.0, Aer does not support Python 3.7.
This commit removes github actions for CI.

* Removing python 3.7 from test workflow
* Removing python 3.7 from build workflow
* Removing python 3.7 from deploy workflow
* Removing python 3.7 from tox
* revert
* Remove python 3.7 from pyproject.toml
* Remove python 3.7 from pyproject.toml - tool
---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-07-27 11:57:12 +09:00
Hiroshi Horii 0366c51c0e
add code-formatting with black for python and with clang-format for c++ (#1630)
* add black and clang-format

* apply black and clang-format

* manually format codes that were not covered in black and clang-format

* add targets of clang-format and clean up tox.ini

* apply black with new configuration

* Update CONTRIBUTING.md

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update .github/workflows/tests.yml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* reformat qiskit_aer, test, tools, and setup.py with length 100

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2023-03-13 20:19:06 +00:00
Sam James 6f600adcf2
Remove redundant wheel dep from pyproject.toml (#1741)
Remove the redundant `wheel` dependency, as it is added by the backend automatically.

Listing it explicitly in the documentation was a historical mistake and has been fixed since,
see: [pypa/setuptools@f7d30a9](f7d30a9529).

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-10 12:14:03 +00:00
Hiroshi Horii c48b0a82c4
Pin the version of conan with 1.X to work around API changes in conan 2.0 (#1729)
Specify a version of conan to build Aer with 1.X.
This is a quick fix to work around an issue related to API changes in conan 2.0.

* fix conan version
* add reno and allow the latest 1.X of Conan
2023-02-24 08:18:54 +09:00
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 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
Matthew Treinish 8c400ca31c
Drop support for Python 3.6 (#1430)
* Drop support for Python 3.6

Now that Qiskit Aer 0.10.0 has been released that Qiskit no longer
supports python 3.6 (in the lead up to adding support for python 3.10).
This commit officially drops the support for python 3.6 and makes python
3.7 required to install qiskit-aer. It also removes all the ci jobs
still using 3.6 both for testing and building wheels.

* Add release note

* Fix syntax error in job configuration

* Update releasenotes/notes/drop-python36-61553302523fa240.yaml

Co-authored-by: Jake Lishman <jake@binhbar.com>

* Unify cibuildwheel configuration to pyproject.toml

This commit removes all the environment variable usage for default
configuration of cibuildwheel and switches to use the pyproject.toml to
centralize the configuration for all the jobs. Environment variables are
still used for per job custom overrides which don't really fit in the
configuration of the pyproject.toml (mainly cross-build overrides and
GPU configuration).

* Fix toml inline table syntax error

* Add musllinux wheels to skip list too

Newer versions of cibuildwheel support building musllinux wheels for
musl libc based linux distros, such as alpine linux, in addition to
manylinux wheels (which are not compatible with musl libc based
linux distros and only work with glibc distros). The musllinux build
environments are different and not centos based so builds fail in them.
Since we're not supporting musl platforms in qiskit-aer we don't need to
attempt to build wheels for that platform. This commit adds musllinux
builds to the skip list in the common cibuildwheel configuration
accordingly.

Co-authored-by: Jake Lishman <jake@binhbar.com>
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2022-02-21 15:19:20 +00:00
Matthew Treinish 0b0913ca6f
Only install numpy and scipy from wheels in build jobs (#1449)
* Only install numpy and scipy from wheels in build jobs

With recent changes to the upstream numpy and scipy packaging our CI
build jobs are spending most of their time build numpy and/or scipy from
source to test the built wheels function correctly. This is unecessary
as there are compatible wheels available on pypi. To correct this issue
this commit updates the cibuildwheel config used in the wheel build jobs
(both for ci and release artifacts) to only use binary wheels for numpy
and scipy before testing.

* Use manylinux 2014 for py310 wheel builds

In the previous commit we switched to the test configuration to install
numpy and scipy only from binary pre-compiled wheel packages. However,
for scipy and numpy starting in Python 3.10 they only package for
manylinux2014 while for aer we were still using manylinux2010 for all
the builds. To enable building on python 3.10 we need to use
manylinux2014, but for compatibility we still need to use manylinux2010.
This commit makes this change so for python 3.6-3.9 we build on
manylinux2010 and for python 3.10 we build on manylinux 2014.

To facilitate this change the configuration for cibuildwheel is changed
to leverage the pyproject.toml to set the configuration for cibuildwheel
instead of using separate environment variables. This centralizes the
configuration and makes it easier to work with.

* Bump cibuildwheel version

The pyproject.toml based configuration didn't support overrides (which
was leveraged in the previous commit to use a different image for py310)
until v2.2.0 and we were previously using a version older than that.
This commit bumps the cibuildwheel version to the 2.2.x release to
enable the use of this option.

* Use manylinux2010 for all i686 builds

The i686 py310 job was failing because centos7 (which manylinux2014 is
based off of) doesn't have openblas packaged for i686. We orignally
switched both the x86_64 and i686 py310 jobs to use manylinux2014
because numpy and scipy made python 3.10 manylinux2014 and only publish
manylinux2014 wheels. However, numpy/scipy don't support i686 on py310
and we already skip test installs for py310. So regardless we have to
build numpy from source to build aer. So using manylinux2010 which is
centos6 based will enable us to at least build because there is an
openblas package available.
2022-02-09 09:27:44 -05:00
Christopher J. Wood 61b028b7cc
Prepare 0.10 release (#1405)
Co-authored-by: Jake Lishman <jake@binhbar.com>
2021-12-14 12:40:20 -05:00
Christopher J. Wood 9a994b831f
Add min version for scikit-build (#1182) 2021-03-18 08:09:26 +01:00
Matthew Treinish 2da63a2c7e
Migrate windows CI to all be in github actions (#1137)
* Migrate windows CI to all be in github actions

This commit migrates the remaining windows CI away from using
azure-pipelines and unifies the configuration with the rest of the
supported operating systems in github actions. It also switches the
wheel building jobs away from using the custom for loop we used in azure
to leveraging cibuildwheel. This simplifies our CI configuration and
also removes CI resource contetion with terra which uses a shared queue
in azure.

* Fix bin path for windows in sdist jobs

* Remove manual epel step

* Fix aer sdist install and 32bit selection

* Add msbuild step to new jobs

* Try setting cmake generator via env var

* Split out win32 jobs

* Revert "Split out win32 jobs"

This reverts commit 51a8f6745c.

* Change python3 to python in GHA

Looks like in the window environment python3 was not
calling the virtualenv python, but the system one.

Co-authored-by: vvilpas <vvilpas@gmail.com>
2021-02-18 12:07:08 -05:00
Victor Villar 36c385f689
Update minimum Conan version to 1.31.2. (#1097)
This new version correctly handles urllib3 compatibility,
so there is no need to pre-install urllib3 anymore. It also adds
native AppleClang12 compatibility, so there's no need to
provide our own conan settings file.

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2021-01-14 11:46:22 +01:00
Victor Villar 72961a92bc
Compile CUDA on win (#1065)
Co-authored-by: Christopher J. Wood <cjwood@us.ibm.com>
2021-01-13 08:19:28 +01:00
Victor Villar efa221bb94
Fix numpy not found issue when installing (#1056)
When doing python ./setup.py install in a clean env, CMake is unable to
find numpy. Here we force the installation of numpy if it is not
installed before CMake is called.

Co-authored-by: Christopher J. Wood <cjwood@us.ibm.com>
2020-12-09 10:07:47 +01:00
Victor Villar 55d170a912
Remove all remaining cython references (#1050) 2020-11-23 07:44:21 +01:00
Victor Villar 8ef3708c85
Fix conan dependency problem with urllib3 (#1031)
urllib3 1.26.0 has been released, causing a dependency error when installing conan.
Here I add urllib3 add as a dependency and cosntrainit it <1.26 to avoid this problem.
2020-11-11 12:55:32 +01:00
Matthew Treinish 097926fae8
Migrate most of CI to Github Actions (#881)
* Migrate all CI to Github Actions

Since the period with an extra 10 concurrent job on travis is ending and
there is already extensive resource contention in the shared azure
pipelines instance for the qiskit organization we need to find an
alternative for CI to maintain job throughput. This commit migrates all
the existing CI jobs to github actions which has a very generous quota
for open source projects. The only jobs we'll still use travis for after
this are on non-x86 platforms because nothing else offers that.

* Cleanup power travis config

* Really fix travis

* Try adding numpy manually to windows install

* Add back azure-pipelines for majortiy of windows and add lint and docs

This commit switches back to using azure pipelines for wheel and sdist
jobs amd wheel publish jobs. This should use VS 2015 and workaround the
sdist build job issue we're having in GHA.

* Drop leftover py35 usage

* Fix leftover gha windows job reference

* Fix lint job

* Switch docs job to py37

* Attempt to fix lint again

* Fix docs job and set a sane timeout

* Explicitly use bash for test run step

* Disable parallel_map on macOS test jobs

* Only run parallel_map disabled job on py3.8 macOS

* Fix nand syntax error with demorgan

* Remove commented jobs and unecessary steps for windows
2020-09-03 12:00:08 -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
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
Matthew Treinish 2028cb9a0d Add pybind as a requirement (#531)
* Add pybind as a requirement

Since commit 0e184e09c6 we've required
pybind to build the python extension for aer. However this was expected
to outside of the install by users and was only listed as a dev requirement
via the requirements-dev.txt file. However, pybind is a build dependency
and will always need to be installed to build and install aer. This
commit updates the install_requires and setup_requires list to make sure
we always have pybind11 installed when installing aer from source or
sdist.

* Add pybind to pyproject.toml too

It looks like in some installation scenarios (those not using pip) we
were not install pybind11 early enough for the build to succeed. This
commit adds it to the pyproject.toml too. This addresses those scenarios
in local testing.

* Add fallback pybind install workaround

CI tests still fail with pybind11 only listed as a install requirement,
setup requirement, and build-system requirement in the pyproject.toml.
This means that there are still methods of installing the package where
these values are insufficient. To workaround those cases this commit
adds a try except block to subprocess out to pip if pybind11 can't be
imported during the setup.py. This should ensure we always have pybind11
installed prior to starting the build.
2020-01-20 16:51:22 +01:00
cjwood 4459d26645 move qiskit_aer to base dir 2018-11-08 16:07:34 -05:00