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