Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qiskit: init at 0.4.15 #40395

Merged
merged 4 commits into from
Jun 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2928,6 +2928,11 @@
github = "panaeon";
name = "Vitalii Voloshyn";
};
pandaman = {
email = "kointosudesuyo@infoseek.jp";
github = "pandaman64";
name = "pandaman";
};
paperdigits = {
email = "mica@silentumbrella.com";
github = "paperdigits";
Expand Down
33 changes: 33 additions & 0 deletions pkgs/development/python-modules/ibmquantumexperience/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, requests
, requests_ntlm
}:

buildPythonPackage rec {
pname = "IBMQuantumExperience";
version = "1.9.1";

src = fetchPypi {
inherit pname version;
sha256 = "480cce2ca285368432b7d00b9cd702a4f8a1c9d69914ba6f65e08099e151e407";
};

propagatedBuildInputs = [
requests
requests_ntlm
];

# test requires an API token
doCheck = false;

meta = {
description = "A Python library for the Quantum Experience API";
homepage = https://github.com/QISKit/qiskit-api-py;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
pandaman
];
};
}
47 changes: 47 additions & 0 deletions pkgs/development/python-modules/qasm2image/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, cairocffi
, cairosvg
, cffi
, qiskit
, svgwrite
, colorama
, python
}:

buildPythonPackage rec {
pname = "qasm2image";
version = "0.5.0";

src = fetchFromGitHub {
owner = "nelimeee";
repo = "qasm2image";
rev = "7f3c3e4d1701b8b284ef0352aa3a47722ebbbcaa";
sha256 = "129xlpwp36h2czzw1wcl8df2864zg3if2gaad1v18ah1cf68b0f3";
};

propagatedBuildInputs = [
cairocffi
cairosvg
cffi
qiskit
svgwrite
];

checkInputs = [
colorama
];
checkPhase = ''
${python.interpreter} tests/launch_tests.py
'';

meta = {
description = "A Python module to visualise quantum circuit";
homepage = https://github.com/nelimeee/qasm2image;
license = lib.licenses.cecill-b;
maintainers = with lib.maintainers; [
pandaman
];
};
}
65 changes: 65 additions & 0 deletions pkgs/development/python-modules/qiskit/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{ stdenv
, isPy3k
, buildPythonPackage
, fetchPypi
, fetchurl
, python
, numpy
, scipy
, sympy
, matplotlib
, networkx
, ply
, pillow
, cffi
, requests
, requests_ntlm
, IBMQuantumExperience
, cmake
, llvmPackages
}:

buildPythonPackage rec {
pname = "qiskit";
version = "0.4.15";

disabled = !isPy3k;

src = fetchPypi {
inherit pname version;
sha256 = "bd126a35189f8303df41cb7b7f26b0d06e1fabf61f4fd567b8ec356d31170141";
};

buildInputs = [ cmake ]
++ stdenv.lib.optional stdenv.isDarwin llvmPackages.openmp;

propagatedBuildInputs = [
numpy
matplotlib
networkx
ply
scipy
sympy
pillow
cffi
requests
requests_ntlm
IBMQuantumExperience
];

# Pypi's tarball doesn't contain tests
doCheck = false;

patches = [
./setup.py.patch
];

meta = {
description = "Quantum Software Development Kit for writing quantum computing experiments, programs, and applications";
homepage = https://github.com/QISKit/qiskit-sdk-py;
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [
pandaman
];
};
}
19 changes: 19 additions & 0 deletions pkgs/development/python-modules/qiskit/setup.py.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/setup.py
+++ b/setup.py
@@ -28,11 +28,11 @@ from setuptools.dist import Distribution

requirements = [
"IBMQuantumExperience>=1.8.29",
- "matplotlib>=2.1,<2.2",
- "networkx>=2.0,<2.1",
- "numpy>=1.13,<1.15",
- "ply==3.10",
- "scipy>=0.19,<1.1",
+ "matplotlib>=2.1",
+ "networkx>=2.0",
+ "numpy>=1.13",
+ "ply>=3.10",
+ "scipy>=0.19",
"sympy>=1.0",
"pillow>=4.2.1"
]
5 changes: 5 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18202,6 +18202,11 @@ EOF

gast = callPackage ../development/python-modules/gast { };

IBMQuantumExperience = callPackage ../development/python-modules/ibmquantumexperience { };

qiskit = callPackage ../development/python-modules/qiskit { };

qasm2image = callPackage ../development/python-modules/qasm2image { };
});

in fix' (extends overrides packages)
Loading