nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 108 lines 2.0 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 cargo, 7 rustPlatform, 8 rustc, 9 libiconv, 10 11 dill, 12 matplotlib, 13 numpy, 14 pillow, 15 pydot, 16 pylatexenc, 17 python-constraint, 18 rustworkx, 19 scipy, 20 seaborn, 21 setuptools, 22 setuptools-rust, 23 stevedore, 24 symengine, 25 sympy, 26 typing-extensions, 27 z3-solver, 28}: 29 30buildPythonPackage rec { 31 pname = "qiskit"; 32 version = "2.3.0"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "Qiskit"; 37 repo = "qiskit"; 38 tag = version; 39 hash = "sha256-YGsBpNyM28fDG+mXs3hIA6K2kuE1getB8tTMLdHMa5k="; 40 }; 41 42 nativeBuildInputs = [ 43 cargo 44 rustc 45 rustPlatform.cargoSetupHook 46 ]; 47 48 build-system = [ 49 setuptools 50 setuptools-rust 51 ]; 52 53 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; 54 55 cargoDeps = rustPlatform.fetchCargoVendor { 56 inherit src pname version; 57 hash = "sha256-Mpy5KkqSjlTtezZ2BQnai+PBG+8qLPmYj1AocdIhhvI="; 58 }; 59 60 dependencies = [ 61 dill 62 numpy 63 rustworkx 64 scipy 65 stevedore 66 typing-extensions 67 ]; 68 69 optional-dependencies = { 70 visualization = [ 71 matplotlib 72 pillow 73 pydot 74 pylatexenc 75 seaborn 76 sympy 77 ]; 78 crosstalk-pass = [ 79 z3-solver 80 ]; 81 csp-layout-pass = [ 82 python-constraint 83 ]; 84 qpy-compat = [ 85 symengine 86 sympy 87 ]; 88 }; 89 90 pythonImportsCheck = [ 91 "qiskit" 92 "qiskit.circuit" 93 "qiskit.providers.basic_provider" 94 ]; 95 96 meta = { 97 description = "Software for developing quantum computing programs"; 98 longDescription = '' 99 Open-source SDK for working with quantum computers at the level of 100 extended quantum circuits, operators, and primitives. 101 ''; 102 homepage = "https://www.ibm.com/quantum/qiskit"; 103 downloadPage = "https://github.com/QISKit/qiskit/releases"; 104 changelog = "https://docs.quantum.ibm.com/api/qiskit/release-notes"; 105 license = lib.licenses.asl20; 106 maintainers = [ ]; 107 }; 108}