2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
# Python Inputs
|
|
|
|
, decorator
|
|
|
|
, docplex
|
|
|
|
, networkx
|
|
|
|
, numpy
|
|
|
|
, qiskit-terra
|
|
|
|
, scipy
|
|
|
|
# Check Inputs
|
|
|
|
, pytestCheckHook
|
|
|
|
, ddt
|
|
|
|
, pylatexenc
|
|
|
|
, qiskit-aer
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qiskit-optimization";
|
2022-04-03 18:54:34 +00:00
|
|
|
version = "0.3.2";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qiskit";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-03 18:54:34 +00:00
|
|
|
sha256 = "sha256-SWrHNHZjynpWcwwrWzRPpbNWz8EhVujMoY8uIJQeT6U=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt --replace "networkx>=2.2,<2.6" "networkx"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
docplex
|
|
|
|
decorator
|
|
|
|
networkx
|
|
|
|
numpy
|
|
|
|
qiskit-terra
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|