1{ 2 lib, 3 pythonOlder, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 # build-system 8 setuptools, 9 10 # Python Inputs 11 decorator, 12 docplex, 13 networkx, 14 numpy, 15 qiskit-terra, 16 scipy, 17 # Check Inputs 18 pytestCheckHook, 19 ddt, 20 pylatexenc, 21 qiskit-aer, 22}: 23 24buildPythonPackage rec { 25 pname = "qiskit-optimization"; 26 version = "0.6.1"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.6"; 30 31 src = fetchFromGitHub { 32 owner = "qiskit"; 33 repo = pname; 34 rev = "refs/tags/${version}"; 35 hash = "sha256-kzEuICajlV8mgD0YLhwFJaDQVxYZo9jv3sr/r/P0VG0="; 36 }; 37 38 postPatch = '' 39 substituteInPlace requirements.txt --replace "networkx>=2.2,<2.6" "networkx" 40 ''; 41 42 nativeBuildInputs = [ setuptools ]; 43 44 propagatedBuildInputs = [ 45 docplex 46 decorator 47 networkx 48 numpy 49 qiskit-terra 50 scipy 51 ]; 52 53 nativeCheckInputs = [ 54 pytestCheckHook 55 ddt 56 pylatexenc 57 qiskit-aer 58 ]; 59 60 pythonImportsCheck = [ "qiskit_optimization" ]; 61 pytestFlags = [ "--durations=10" ]; 62 63 meta = with lib; { 64 description = "Software for developing quantum computing programs"; 65 homepage = "https://qiskit.org"; 66 downloadPage = "https://github.com/QISKit/qiskit-optimization/releases"; 67 changelog = "https://qiskit.org/documentation/release_notes.html"; 68 license = licenses.asl20; 69 maintainers = with maintainers; [ drewrisinger ]; 70 }; 71}