Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / qiskit-machine-learning / default.nix
blob1c23fb3b0398dbdc5ffca8496ee6db44cad70fda
1 { lib
2 , pythonOlder
3 , pythonAtLeast
4 , buildPythonPackage
5 , fetchFromGitHub
6 , fetchpatch
7   # Python Inputs
8 , fastdtw
9 , numpy
10 , psutil
11 , qiskit-terra
12 , scikit-learn
13 , sparse
14 , torch
15   # Check Inputs
16 , pytestCheckHook
17 , ddt
18 , pytest-timeout
19 , qiskit-aer
22 buildPythonPackage rec {
23   pname = "qiskit-machine-learning";
24   version = "0.6.1";
26   disabled = pythonOlder "3.6";
28   src = fetchFromGitHub {
29     owner = "qiskit";
30     repo = pname;
31     rev = "refs/tags/${version}";
32     hash = "sha256-oSLQvZGEq/nBj7ktDEq3BMk7xyYiLGpBDmKxuXtMTfs=";
33   };
35   propagatedBuildInputs = [
36     fastdtw
37     numpy
38     psutil
39     torch
40     qiskit-terra
41     scikit-learn
42     sparse
43   ];
45   doCheck = false;  # TODO: enable. Tests fail on unstable due to some multithreading issue?
46   nativeCheckInputs = [
47     pytestCheckHook
48     pytest-timeout
49     ddt
50     qiskit-aer
51   ];
53   pythonImportsCheck = [ "qiskit_machine_learning" ];
55   pytestFlagsArray = [
56     "--durations=10"
57     "--showlocals"
58     "-vv"
59     "--ignore=test/connectors/test_torch_connector.py"  # TODO: fix, get multithreading errors with python3.9, segfaults
60   ];
61   disabledTests = [
62     # Slow tests >10 s
63     "test_readme_sample"
64     "test_vqr_8"
65     "test_vqr_7"
66     "test_qgan_training_cg"
67     "test_vqc_4"
68     "test_classifier_with_circuit_qnn_and_cross_entropy_4"
69     "test_vqr_4"
70     "test_regressor_with_opflow_qnn_4"
71     "test_qgan_save_model"
72     "test_qgan_training_analytic_gradients"
73     "test_qgan_training_run_algo_numpy"
74     "test_ad_hoc_data"
75     "test_qgan_training"
76   ];
78   meta = with lib; {
79     description = "Software for developing quantum computing programs";
80     homepage = "https://qiskit.org";
81     downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
82     changelog = "https://qiskit.org/documentation/release_notes.html";
83     license = licenses.asl20;
84     maintainers = with maintainers; [ drewrisinger ];
85   };