81047829ea
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
63 lines
1.2 KiB
Nix
63 lines
1.2 KiB
Nix
{ 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";
|
|
version = "0.3.0";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "qiskit";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "18qs0m21j73fjawq3pxz5q5c0g2wgqgicy7p4a57lialpv6vrmc0";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|