summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIyán Méndez Veiga2020-02-07 22:30:41 +0100
committerIyán Méndez Veiga2020-02-07 22:30:41 +0100
commit32764dd8e56d029bcdd557fbbb57e8a956a8035d (patch)
tree6f0c0bf2991b64ed4c3376da8db40be2171a17b6
parentdded19e438071e02e5a3c2b2808e8aaef4017bc5 (diff)
downloadaur-32764dd8e56d029bcdd557fbbb57e8a956a8035d.tar.gz
Update to 0.4.0
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD25
-rw-r--r--cmake.patch34
3 files changed, 61 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eedc0350e7e8..b40c52ade2e7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-qiskit-aer
pkgdesc = A high performance simulator for quantum circuits that includes noise models
- pkgver = 0.3.4
+ pkgver = 0.4.0
pkgrel = 1
url = https://github.com/Qiskit/qiskit-aer
arch = x86_64
@@ -8,12 +8,18 @@ pkgbase = python-qiskit-aer
makedepends = python-setuptools
makedepends = cmake
makedepends = python-scikit-build
- makedepends = ninja
depends = python-qiskit-terra
depends = cython
depends = openblas
- source = qiskit-aer-0.3.4.tar.gz::https://github.com/Qiskit/qiskit-aer/archive/0.3.4.tar.gz
- sha256sums = bb5a293a5627f2312784ee6301815da7334886e15b62c5af1b86f3965124ba86
+ depends = muparserx
+ optdepends = thrust: Parallelization (GPU/CPU) support
+ optdepends = cuda: Parallelization with CUDA (NVIDIA)
+ optdepends = openmp: Parallelization with OpenMP
+ optdepends = intel-tbb: Parallelization with Intel TBB
+ source = qiskit-aer-0.4.0.tar.gz::https://github.com/Qiskit/qiskit-aer/archive/0.4.0.tar.gz
+ source = cmake.patch
+ sha256sums = a6191a7210eee24e7eb28395d5b922d1bf444a608cdf5fc9cf4b0949b72ca116
+ sha256sums = 378188cb0789f56e51fed0ae16a06ed6f3def3210e3ec35384db4dbe61cc1f35
pkgname = python-qiskit-aer
diff --git a/PKGBUILD b/PKGBUILD
index b7f1a1aa9c4e..5e8816c5a568 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
_pkgname=qiskit-aer
pkgname=python-${_pkgname}
-pkgver=0.3.4
+pkgver=0.4.0
pkgrel=1
pkgdesc="A high performance simulator for quantum circuits that includes noise models"
arch=('x86_64')
@@ -11,20 +11,29 @@ depends=(
'python-qiskit-terra'
'cython'
'openblas'
-)
+ 'muparserx')
+optdepends=(
+ 'thrust: Parallelization (GPU/CPU) support'
+ 'cuda: Parallelization with CUDA (NVIDIA)'
+ 'openmp: Parallelization with OpenMP'
+ 'intel-tbb: Parallelization with Intel TBB')
makedepends=(
'python-setuptools'
'cmake'
- 'python-scikit-build'
- 'ninja'
-)
-source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/Qiskit/${_pkgname}/archive/${pkgver}.tar.gz")
-sha256sums=('bb5a293a5627f2312784ee6301815da7334886e15b62c5af1b86f3965124ba86')
+ 'python-scikit-build')
+source=(
+ "${_pkgname}-${pkgver}.tar.gz::https://github.com/Qiskit/${_pkgname}/archive/${pkgver}.tar.gz"
+ "cmake.patch")
+
+sha256sums=('a6191a7210eee24e7eb28395d5b922d1bf444a608cdf5fc9cf4b0949b72ca116'
+ '378188cb0789f56e51fed0ae16a06ed6f3def3210e3ec35384db4dbe61cc1f35')
prepare() {
cd "${srcdir}/${_pkgname}-${pkgver}"
# Avoid python setup.py build to download cmake from PyPi
- sed -i "s/'cmake'\, //" setup.py
+ sed -i "/\bcmake\b/d" setup.py
+ # Fix CMakeList.txt to use muparserx from AUR
+ patch --forward --strip=1 --input="${srcdir}/cmake.patch"
}
build() {
diff --git a/cmake.patch b/cmake.patch
new file mode 100644
index 000000000000..4618bb416a83
--- /dev/null
+++ b/cmake.patch
@@ -0,0 +1,34 @@
+diff --unified --recursive --text qiskit-aer-0.4.0/CMakeLists.txt qiskit-aer-0.4.0-patched/CMakeLists.txt
+--- qiskit-aer-0.4.0/CMakeLists.txt 2020-02-06 17:43:27.000000000 +0100
++++ qiskit-aer-0.4.0-patched/CMakeLists.txt 2020-02-07 22:19:39.729434756 +0100
+@@ -265,8 +265,6 @@
+
+ # Cython build is only enabled if building through scikit-build.
+ if(SKBUILD) # Terra Addon build
+- add_muparserx_lib()
+-
+ add_subdirectory(qiskit/providers/aer/pulse/cy)
+ add_subdirectory(qiskit/providers/aer/pulse/qutip_lite/cy)
+ add_subdirectory(qiskit/providers/aer/backends/wrappers)
+@@ -291,7 +289,8 @@
+ RUNTIME_OUTPUT_DIRECTORY_RELEASE Release)
+ target_include_directories(qasm_simulator
+ PRIVATE ${AER_SIMULATOR_CPP_SRC_DIR}
+- PRIVATE ${AER_SIMULATOR_CPP_EXTERNAL_LIBS})
++ PRIVATE ${AER_SIMULATOR_CPP_EXTERNAL_LIBS}
++ PRIVATE "/usr/include/muparserx/")
+ target_compile_definitions(qasm_simulator
+ PRIVATE ${AER_COMPILER_DEFINITIONS})
+ install(TARGETS qasm_simulator DESTINATION bin)
+diff --unified --recursive --text qiskit-aer-0.4.0/src/open_pulse/eval_hamiltonian.hpp qiskit-aer-0.4.0-patched/src/open_pulse/eval_hamiltonian.hpp
+--- qiskit-aer-0.4.0/src/open_pulse/eval_hamiltonian.hpp 2020-02-06 17:43:27.000000000 +0100
++++ qiskit-aer-0.4.0-patched/src/open_pulse/eval_hamiltonian.hpp 2020-02-07 22:20:19.945499052 +0100
+@@ -20,7 +20,7 @@
+ #include <complex>
+ #include <string>
+ #include <numpy/arrayobject.h>
+-#include <muparserx/parser/mpParser.h>
++#include <muparserx/mpParser.h>
+
+ struct ParserValues {
+ ParserValues(std::unique_ptr<mup::ParserX> parser, const std::string& expr):