2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pythonOlder,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Python Inputs
|
2024-06-05 15:53:02 +00:00
|
|
|
decorator,
|
|
|
|
docplex,
|
|
|
|
networkx,
|
|
|
|
numpy,
|
|
|
|
qiskit-terra,
|
|
|
|
scipy,
|
2021-12-06 16:07:01 +00:00
|
|
|
# Check Inputs
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
ddt,
|
|
|
|
pylatexenc,
|
|
|
|
qiskit-aer,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qiskit-optimization";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.6.1";
|
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-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-kzEuICajlV8mgD0YLhwFJaDQVxYZo9jv3sr/r/P0VG0=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt --replace "networkx>=2.2,<2.6" "networkx"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
docplex
|
|
|
|
decorator
|
|
|
|
networkx
|
|
|
|
numpy
|
|
|
|
qiskit-terra
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
ddt
|
|
|
|
pylatexenc
|
|
|
|
qiskit-aer
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "qiskit_optimization" ];
|
|
|
|
pytestFlagsArray = [ "--durations=10" ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|