2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Python Inputs
|
|
|
|
, fastdtw
|
|
|
|
, numpy
|
|
|
|
, psutil
|
|
|
|
, qiskit-terra
|
|
|
|
, scikit-learn
|
|
|
|
, sparse
|
2022-09-09 14:08:57 +00:00
|
|
|
, torch
|
2021-12-06 16:07:01 +00:00
|
|
|
# Check Inputs
|
|
|
|
, pytestCheckHook
|
|
|
|
, ddt
|
|
|
|
, pytest-timeout
|
|
|
|
, qiskit-aer
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qiskit-machine-learning";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.7.2";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qiskit";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-EBjWWoNRuIZFWQkrjf9IyZZ648rP5d7MZkjeIYifgGk=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
fastdtw
|
|
|
|
numpy
|
|
|
|
psutil
|
2022-09-14 18:05:37 +00:00
|
|
|
torch
|
2021-12-06 16:07:01 +00:00
|
|
|
qiskit-terra
|
|
|
|
scikit-learn
|
|
|
|
sparse
|
2022-09-14 18:05:37 +00:00
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
doCheck = false; # TODO: enable. Tests fail on unstable due to some multithreading issue?
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-timeout
|
|
|
|
ddt
|
|
|
|
qiskit-aer
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "qiskit_machine_learning" ];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--durations=10"
|
|
|
|
"--showlocals"
|
|
|
|
"-vv"
|
|
|
|
"--ignore=test/connectors/test_torch_connector.py" # TODO: fix, get multithreading errors with python3.9, segfaults
|
|
|
|
];
|
|
|
|
disabledTests = [
|
|
|
|
# Slow tests >10 s
|
|
|
|
"test_readme_sample"
|
|
|
|
"test_vqr_8"
|
|
|
|
"test_vqr_7"
|
|
|
|
"test_qgan_training_cg"
|
|
|
|
"test_vqc_4"
|
|
|
|
"test_classifier_with_circuit_qnn_and_cross_entropy_4"
|
|
|
|
"test_vqr_4"
|
|
|
|
"test_regressor_with_opflow_qnn_4"
|
|
|
|
"test_qgan_save_model"
|
|
|
|
"test_qgan_training_analytic_gradients"
|
|
|
|
"test_qgan_training_run_algo_numpy"
|
|
|
|
"test_ad_hoc_data"
|
|
|
|
"test_qgan_training"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Software for developing quantum computing programs";
|
|
|
|
homepage = "https://qiskit.org";
|
|
|
|
downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
|
|
|
|
changelog = "https://qiskit.org/documentation/release_notes.html";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
|
|
|
}
|