depot/third_party/nixpkgs/pkgs/development/python-modules/qiskit-machine-learning/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

92 lines
1.9 KiB
Nix

{
lib,
pythonOlder,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# Python Inputs
fastdtw,
numpy,
psutil,
qiskit-terra,
scikit-learn,
sparse,
torch,
# Check Inputs
pytestCheckHook,
ddt,
pytest-timeout,
qiskit-aer,
}:
buildPythonPackage rec {
pname = "qiskit-machine-learning";
version = "0.7.2";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "qiskit";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-EBjWWoNRuIZFWQkrjf9IyZZ648rP5d7MZkjeIYifgGk=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
fastdtw
numpy
psutil
torch
qiskit-terra
scikit-learn
sparse
];
doCheck = false; # TODO: enable. Tests fail on unstable due to some multithreading issue?
nativeCheckInputs = [
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 ];
};
}