1{ lib
2, pythonOlder
3, buildPythonPackage
4, fetchFromGitHub
5, fetchpatch
6, python
7, numpy
8, qiskit-terra
9, scikitlearn
10, scipy
11 # Check Inputs
12, pytestCheckHook
13, ddt
14, pyfakefs
15, qiskit-aer
16}:
17
18buildPythonPackage rec {
19 pname = "qiskit-ignis";
20 version = "0.4.0";
21
22 disabled = pythonOlder "3.6";
23
24 # Pypi's tarball doesn't contain tests
25 src = fetchFromGitHub {
26 owner = "Qiskit";
27 repo = "qiskit-ignis";
28 rev = version;
29 sha256 = "07mxhaknkp121xm6mgrpcrbj9qw6j924ra3k0s6vr8qgvfcxvh0y";
30 };
31
32 propagatedBuildInputs = [
33 numpy
34 qiskit-terra
35 scikitlearn
36 scipy
37 ];
38 postInstall = "rm -rf $out/${python.sitePackages}/docs"; # this dir can create conflicts
39
40 # Tests
41 pythonImportsCheck = [ "qiskit.ignis" ];
42 dontUseSetuptoolsCheck = true;
43 preCheck = "export HOME=$TMPDIR";
44 checkInputs = [
45 pytestCheckHook
46 ddt
47 pyfakefs
48 qiskit-aer
49 ];
50 disabledTests = [
51 "test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds
52 "test_qv_fitter" # execution hangs, ran for several minutes
53 ];
54
55 meta = with lib; {
56 description = "Qiskit tools for quantum hardware verification, noise characterization, and error correction";
57 homepage = "https://qiskit.org/ignis";
58 downloadPage = "https://github.com/QISKit/qiskit-ignis/releases";
59 changelog = "https://qiskit.org/documentation/release_notes.html";
60 license = licenses.asl20;
61 maintainers = with maintainers; [ drewrisinger ];
62 };
63}