python3Packages.qiskit-ignis: 0.4.0 -> 0.5.1

This commit is contained in:
Drew Risinger 2020-11-04 12:40:08 -05:00 committed by Jonathan Ringer
parent d6859df0d5
commit cf115f9320

View File

@ -8,6 +8,13 @@
, qiskit-terra
, scikitlearn
, scipy
# Optional package inputs
, withVisualization ? false
, matplotlib
, withCvx ? false
, cvxpy
, withJit ? false
, numba
# Check Inputs
, pytestCheckHook
, ddt
@ -17,7 +24,7 @@
buildPythonPackage rec {
pname = "qiskit-ignis";
version = "0.4.0";
version = "0.5.1";
disabled = pythonOlder "3.6";
@ -26,16 +33,24 @@ buildPythonPackage rec {
owner = "Qiskit";
repo = "qiskit-ignis";
rev = version;
sha256 = "07mxhaknkp121xm6mgrpcrbj9qw6j924ra3k0s6vr8qgvfcxvh0y";
sha256 = "17kplmi17axcbbgw35dzfr3d5bzfymxfni9sf6v14223c5674p4y";
};
# hacky, fix https://github.com/Qiskit/qiskit-ignis/issues/532.
# TODO: remove on qiskit-ignis v0.5.1
postPatch = ''
substituteInPlace qiskit/ignis/mitigation/expval/base_meas_mitigator.py --replace "plt.axes" "'plt.axes'"
'';
propagatedBuildInputs = [
numpy
qiskit-terra
scikitlearn
scipy
];
postInstall = "rm -rf $out/${python.sitePackages}/docs"; # this dir can create conflicts
] ++ lib.optionals (withCvx) [ cvxpy ]
++ lib.optionals (withVisualization) [ matplotlib ]
++ lib.optionals (withJit) [ numba ];
postInstall = "rm -rf $out/${python.sitePackages}/docs"; # this dir can create conflicts
# Tests
pythonImportsCheck = [ "qiskit.ignis" ];
@ -49,7 +64,7 @@ buildPythonPackage rec {
];
disabledTests = [
"test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds
"test_qv_fitter" # execution hangs, ran for several minutes
"test_qv_fitter" # execution hangs, ran for several minutes
];
meta = with lib; {