2020-01-21 14:37:08 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2020-05-11 22:32:41 +01:00
|
|
|
, python
|
2020-01-21 14:37:08 +00:00
|
|
|
, numpy
|
|
|
|
, qiskit-terra
|
2020-04-10 21:35:54 +01:00
|
|
|
, scikitlearn
|
2020-01-21 14:37:08 +00:00
|
|
|
, scipy
|
|
|
|
# Check Inputs
|
|
|
|
, pytestCheckHook
|
2020-08-10 23:42:31 +01:00
|
|
|
, ddt
|
|
|
|
, pyfakefs
|
2020-01-21 14:37:08 +00:00
|
|
|
, qiskit-aer
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qiskit-ignis";
|
2020-08-10 23:42:31 +01:00
|
|
|
version = "0.4.0";
|
2020-01-21 14:37:08 +00:00
|
|
|
|
2020-04-10 21:35:54 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-01-21 14:37:08 +00:00
|
|
|
|
|
|
|
# Pypi's tarball doesn't contain tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Qiskit";
|
2020-04-10 21:35:54 +01:00
|
|
|
repo = "qiskit-ignis";
|
2020-01-21 14:37:08 +00:00
|
|
|
rev = version;
|
2020-08-10 23:42:31 +01:00
|
|
|
sha256 = "07mxhaknkp121xm6mgrpcrbj9qw6j924ra3k0s6vr8qgvfcxvh0y";
|
2020-01-21 14:37:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
qiskit-terra
|
2020-04-10 21:35:54 +01:00
|
|
|
scikitlearn
|
2020-01-21 14:37:08 +00:00
|
|
|
scipy
|
|
|
|
];
|
2020-05-11 22:32:41 +01:00
|
|
|
postInstall = "rm -rf $out/${python.sitePackages}/docs"; # this dir can create conflicts
|
2020-01-21 14:37:08 +00:00
|
|
|
|
|
|
|
# Tests
|
|
|
|
pythonImportsCheck = [ "qiskit.ignis" ];
|
|
|
|
dontUseSetuptoolsCheck = true;
|
2020-05-11 22:32:41 +01:00
|
|
|
preCheck = "export HOME=$TMPDIR";
|
2020-01-21 14:37:08 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2020-08-10 23:42:31 +01:00
|
|
|
ddt
|
|
|
|
pyfakefs
|
2020-01-21 14:37:08 +00:00
|
|
|
qiskit-aer
|
|
|
|
];
|
2020-08-10 23:42:31 +01:00
|
|
|
disabledTests = [
|
|
|
|
"test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds
|
|
|
|
"test_qv_fitter" # execution hangs, ran for several minutes
|
|
|
|
];
|
2020-01-21 14:37:08 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Qiskit tools for quantum hardware verification, noise characterization, and error correction";
|
2020-04-10 21:35:54 +01:00
|
|
|
homepage = "https://qiskit.org/ignis";
|
|
|
|
downloadPage = "https://github.com/QISKit/qiskit-ignis/releases";
|
2020-08-10 23:42:31 +01:00
|
|
|
changelog = "https://qiskit.org/documentation/release_notes.html";
|
2020-01-21 14:37:08 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
|
|
|
}
|