python3Packages.qiskit-aqua: 0.7.5 -> 0.8.1

This commit is contained in:
Drew Risinger 2020-11-04 12:45:41 -05:00 committed by Jonathan Ringer
parent cf115f9320
commit 18899e6aef

View file

@ -2,8 +2,6 @@
, pythonOlder
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
# , cplex
, cvxpy
, dlx
, docplex
@ -18,6 +16,15 @@
, quandl
, scikitlearn
, yfinance
# Optional inputs
, withTorch ? false
, pytorch
, withPyscf ? false
, pyscf ? null
, withScikitQuant ? false
, scikit-quant ? null
, withCplex ? false
, cplex ? null
# Check Inputs
, ddt
, pytestCheckHook
@ -26,30 +33,20 @@
buildPythonPackage rec {
pname = "qiskit-aqua";
version = "0.7.5";
version = "0.8.1";
disabled = pythonOlder "3.5";
disabled = pythonOlder "3.6";
# Pypi's tarball doesn't contain tests
src = fetchFromGitHub {
owner = "Qiskit";
repo = "qiskit-aqua";
rev = version;
sha256 = "19sdv7lnc4b1c86rd1dv7pjpi8cmrpzbv7nav0fb899ki8ldqdwq";
sha256 = "11qyya3vyq50wpzrzzl8v46yx5p72rhpqhybwn47qgazxgg82r1b";
};
# TODO: remove in next release
patches = [
(fetchpatch {
name = "qiskit-aqua-fix-test-issue-1214.patch";
url = "https://github.com/Qiskit/qiskit-aqua/commit/284a4323192ac85787b22cbe5f344996fae16f7d.patch";
sha256 = "0zl8hqa2fq9ng793x4dhh0ny67nnbjcd8l1cdsaaab4ca1y0xcfr";
})
];
# Optional packages: pyscf (see below NOTE) & pytorch. Can install via pip/nix if needed.
propagatedBuildInputs = [
# cplex
cvxpy
docplex
dlx # Python Dancing Links package
@ -63,7 +60,10 @@ buildPythonPackage rec {
quandl
scikitlearn
yfinance
];
] ++ lib.optionals (withTorch) [ pytorch ]
++ lib.optionals (withPyscf) [ pyscf ]
++ lib.optionals (withScikitQuant) [ scikit-quant ]
++ lib.optionals (withCplex) [ cplex ];
# *** NOTE ***
# We make pyscf optional in this package, due to difficulties packaging it in Nix (test failures, complicated flags, etc).
@ -97,8 +97,11 @@ buildPythonPackage rec {
postInstall = "rm -rf $out/${python.sitePackages}/docs"; # Remove docs dir b/c it can cause conflicts.
checkInputs = [ ddt qiskit-aer pytestCheckHook ];
dontUseSetuptoolsCheck = true;
checkInputs = [
pytestCheckHook
ddt
qiskit-aer
];
pythonImportsCheck = [
"qiskit.aqua"
"qiskit.aqua.algorithms"
@ -107,11 +110,11 @@ buildPythonPackage rec {
"qiskit.ml"
"qiskit.optimization"
];
pytestFlagsArray = [
# Disabled b/c missing pyscf
pytestFlagsArray = lib.optionals (!withPyscf) [
"--ignore=test/chemistry/test_qeom_ee.py"
"--ignore=test/chemistry/test_qeom_vqe.py"
"--ignore=test/chemistry/test_vqe_uccsd_adapt.py"
"--ignore=test/chemistry/test_bopes_sampler.py"
];
disabledTests = [
# Disabled due to missing pyscf
@ -123,8 +126,10 @@ buildPythonPackage rec {
# Disabling slow tests > 10 seconds
"TestVQE"
"TestOOVQE"
"TestVQC"
"TestQSVM"
"TestOptimizerAQGD"
"test_graph_partition_vqe"
"TestLookupRotation"
"_vqe"
@ -151,6 +156,7 @@ buildPythonPackage rec {
"test_confidence_intervals_00001"
"test_eoh"
"test_qasm_5"
"test_uccsd_hf"
];
meta = with lib; {