tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.qiskit-machine-learning: init at 0.2.1
Drew Risinger
4 years ago
11670aa1
e2f7f24f
+89
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
qiskit-machine-learning
default.nix
top-level
python-packages.nix
+87
pkgs/development/python-modules/qiskit-machine-learning/default.nix
reviewed
···
1
1
+
{ lib
2
2
+
, pythonOlder
3
3
+
, pythonAtLeast
4
4
+
, buildPythonPackage
5
5
+
, fetchFromGitHub
6
6
+
, fetchpatch
7
7
+
# Python Inputs
8
8
+
, fastdtw
9
9
+
, numpy
10
10
+
, psutil
11
11
+
, qiskit-terra
12
12
+
, scikit-learn
13
13
+
, sparse
14
14
+
# Optional inputs
15
15
+
, withTorch ? true
16
16
+
, pytorch
17
17
+
# Check Inputs
18
18
+
, pytestCheckHook
19
19
+
, ddt
20
20
+
, pytest-timeout
21
21
+
, qiskit-aer
22
22
+
}:
23
23
+
24
24
+
buildPythonPackage rec {
25
25
+
pname = "qiskit-machine-learning";
26
26
+
version = "0.2.1";
27
27
+
28
28
+
disabled = pythonOlder "3.6";
29
29
+
30
30
+
src = fetchFromGitHub {
31
31
+
owner = "qiskit";
32
32
+
repo = pname;
33
33
+
rev = version;
34
34
+
sha256 = "sha256-2dfrkNZYSaXwiOCaRrPckq4BllANgc6BogyBcP0vosY=";
35
35
+
};
36
36
+
37
37
+
propagatedBuildInputs = [
38
38
+
fastdtw
39
39
+
numpy
40
40
+
psutil
41
41
+
qiskit-terra
42
42
+
scikit-learn
43
43
+
sparse
44
44
+
] ++ lib.optional withTorch pytorch;
45
45
+
46
46
+
doCheck = false; # TODO: enable. Tests fail on unstable due to some multithreading issue?
47
47
+
checkInputs = [
48
48
+
pytestCheckHook
49
49
+
pytest-timeout
50
50
+
ddt
51
51
+
qiskit-aer
52
52
+
];
53
53
+
54
54
+
pythonImportsCheck = [ "qiskit_machine_learning" ];
55
55
+
56
56
+
pytestFlagsArray = [
57
57
+
"--durations=10"
58
58
+
"--showlocals"
59
59
+
"-vv"
60
60
+
"--ignore=test/connectors/test_torch_connector.py" # TODO: fix, get multithreading errors with python3.9, segfaults
61
61
+
];
62
62
+
disabledTests = [
63
63
+
# Slow tests >10 s
64
64
+
"test_readme_sample"
65
65
+
"test_vqr_8"
66
66
+
"test_vqr_7"
67
67
+
"test_qgan_training_cg"
68
68
+
"test_vqc_4"
69
69
+
"test_classifier_with_circuit_qnn_and_cross_entropy_4"
70
70
+
"test_vqr_4"
71
71
+
"test_regressor_with_opflow_qnn_4"
72
72
+
"test_qgan_save_model"
73
73
+
"test_qgan_training_analytic_gradients"
74
74
+
"test_qgan_training_run_algo_numpy"
75
75
+
"test_ad_hoc_data"
76
76
+
"test_qgan_training"
77
77
+
];
78
78
+
79
79
+
meta = with lib; {
80
80
+
description = "Software for developing quantum computing programs";
81
81
+
homepage = "https://qiskit.org";
82
82
+
downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
83
83
+
changelog = "https://qiskit.org/documentation/release_notes.html";
84
84
+
license = licenses.asl20;
85
85
+
maintainers = with maintainers; [ drewrisinger ];
86
86
+
};
87
87
+
}
+2
pkgs/top-level/python-packages.nix
reviewed
···
7913
7913
7914
7914
qiskit-ignis = callPackage ../development/python-modules/qiskit-ignis { };
7915
7915
7916
7916
+
qiskit-machine-learning = callPackage ../development/python-modules/qiskit-machine-learning { };
7917
7917
+
7916
7918
qiskit-optimization = callPackage ../development/python-modules/qiskit-optimization { };
7917
7919
7918
7920
qiskit-terra = callPackage ../development/python-modules/qiskit-terra { };