Skip to content
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
33 changes: 0 additions & 33 deletions pkgs/development/python-modules/ibmquantumexperience/default.nix

This file was deleted.

31 changes: 31 additions & 0 deletions pkgs/development/python-modules/ipyvue/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ lib
, isPy27
, buildPythonPackage
, fetchPypi
# Python Inputs
, ipywidgets
}:

buildPythonPackage rec {
pname = "ipyvue";
version = "1.3.1";
Comment thread
drewrisinger marked this conversation as resolved.
Outdated

disabled = isPy27;

src = fetchPypi {
inherit pname version;
sha256 = "01kp7d8iyz04d0m4njhv8rg72daqmgd93bdljwyffzxg71pwq92a";
};

propagatedBuildInputs = [ ipywidgets ];

doCheck = false; # No tests in package or GitHub
Comment thread
drewrisinger marked this conversation as resolved.
Outdated
pythonImportsCheck = [ "ipyvue" ];

meta = with lib; {
description = "Jupyter widgets base for Vue libraries.";
homepage = "https://github.com/mariobuikhuizen/ipyvuetify";
license = licenses.mit;
maintainers = with maintainers; [ drewrisinger ];
};
}
29 changes: 29 additions & 0 deletions pkgs/development/python-modules/ipyvuetify/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
# Python Inputs
, ipyvue
}:

buildPythonPackage rec {
pname = "ipyvuetify";
version = "1.2.2";

# GitHub version tries to run npm (Node JS)
src = fetchPypi {
inherit pname version;
sha256 = "0vg3sdkdhba917xs6gyzwpp10gi2gszihf45cw2llwsfgb7kpfw8";
};

propagatedBuildInputs = [ ipyvue ];

doCheck = false; # no tests on PyPi/GitHub
Comment thread
drewrisinger marked this conversation as resolved.
Outdated
pythonImportsCheck = [ "ipyvuetify" ];

meta = with lib; {
description = "Jupyter widgets based on Vuetify UI Components.";
homepage = "https://github.com/mariobuikhuizen/ipyvuetify";
license = licenses.mit;
maintainers = with maintainers; [ drewrisinger ];
};
}
40 changes: 27 additions & 13 deletions pkgs/development/python-modules/qiskit-aqua/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,41 @@ buildPythonPackage rec {
"--ignore=test/chemistry/test_qeom_vqe.py"
"--ignore=test/chemistry/test_vqe_uccsd_adapt.py"

# following tend to be slow tests, all pass
"--ignore-glob=*vqc.py"
"--ignore-glob=*hhl.py"
"--ignore-glob=*qgan.py"
# Following tend to be slow tests, all pass
"--ignore=test/aqua/test_vqc.py"
"--ignore=test/aqua/test_hhl.py"
"--ignore=test/aqua/test_qgan.py"
"--ignore=test/aqua/test_mcr.py"
"--ignore=test/aqua/test_mcu1.py"
"--ignore=test/aqua/test_vqe.py"
];
disabledTests = [
# Disabled due to missing pyscf
"test_validate" # test/chemistry/test_inputparser.py

# Disabling slow tests > 1 min
"test_qsvm_multiclass_error_correcting_code"
"test_vqe_qasm"
"test_qgan_training"
"test_qgan_training_run_algo_numpy"
"test_shor_factoring_0"
"test_lookup_rotation_4"
"test_lookup_rotation_neg_4"
"test_mcrz_11"
# Disabling slow tests > 10 seconds
"test_clique_vqe"
"test_delta_3_qasm"
"test_evaluate_qasm_mode"
"test_evolve_1_suzuki"
"test_exact_cover_vqe"
"test_exchangedata"
"test_expected_value_0_statevector"
"test_expected_value_1_qasm"
"test_expected_value_2_statevector"
"test_graph_partition_vqe"
"test_lookup_rotation"
"test_mct_with_dirty_ancillae_15"
"test_mcrz_11"
"test_measurement_error_mitigation_auto_refresh"
"test_qgan_training"
"test_qsvm_multiclass"
"test_shor_factoring_0"
"test_vertex_cover_vqe"
"test_vqc_with_raw_feature_vector_on_wine"
"test_vqe_2_iqpe"
"test_vqe_qasm"
"test_wikipedia"
];

meta = with lib; {
Expand Down
52 changes: 39 additions & 13 deletions pkgs/development/python-modules/qiskit-ibmq-provider/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,33 @@
, requests
, requests_ntlm
, websockets
# Visualization inputs
, ipykernel
, ipyvuetify
, ipywidgets
, matplotlib
, nbconvert
, nbformat
, plotly
, pyperclip
, seaborn
# check inputs
, pytestCheckHook
, vcrpy
, pproxy
, vcrpy
}:

buildPythonPackage rec {
pname = "qiskit-ibmq-provider";
version = "0.5.0";
version = "0.6.0";

disabled = pythonOlder "3.6";

src = fetchFromGitHub {
owner = "Qiskit";
repo = pname;
rev = version;
sha256 = "1jhgsfspmry0qk7jkcryn4225j2azys3rm99agk6mh0jzwrvx4am";
sha256 = "0arbhwaa2kx04jbrj6hk3vvn92wdk6lrr9zx36pr6p22r0yyxnj9";
};

propagatedBuildInputs = [
Expand All @@ -34,6 +44,16 @@ buildPythonPackage rec {
requests
requests_ntlm
websockets
# Visualization/Jupyter inputs
ipykernel
ipyvuetify
ipywidgets
matplotlib
nbconvert
nbformat
plotly
pyperclip
seaborn
];

# websockets seems to be pinned b/c in v8+ it drops py3.5 support. Not an issue here (usually py3.7+, and disabled for older py3.6)
Expand All @@ -43,18 +63,24 @@ buildPythonPackage rec {
'';

# Most tests require credentials to run on IBMQ
checkInputs = [ pytestCheckHook vcrpy pproxy ];
checkInputs = [
pytestCheckHook
pproxy
vcrpy
];
dontUseSetuptoolsCheck = true;

pythonImportsCheck = [ "qiskit.providers.ibmq" ];
disabledTests = [ "test_old_api_url" "test_non_auth_url" "test_non_auth_url_with_hub" ]; # tests require internet connection
# skip tests that require IBMQ credentials, vs failing.
preCheck = ''
pushd /build/source # run pytest from /build vs $out
substituteInPlace test/decorators.py --replace "Exception('Could not locate valid credentials.')" "SkipTest('No IBMQ Credentials provided for tests')"
'';
postCheck = ''
popd
'';
# These disabled tests require internet connection, aren't skipped elsewhere
disabledTests = [
"test_old_api_url"
"test_non_auth_url"
"test_non_auth_url_with_hub"
];

# Skip tests that rely on internet access (mostly to IBM Quantum Experience cloud).
# Options defined in qiskit.terra.test.testing_options.py::get_test_options
QISKIT_TESTS = "skip_online";

meta = with lib; {
description = "Qiskit provider for accessing the quantum devices and simulators at IBMQ";
Expand Down
82 changes: 33 additions & 49 deletions pkgs/development/python-modules/qiskit/default.nix
Original file line number Diff line number Diff line change
@@ -1,65 +1,49 @@
{ stdenv
, isPy3k
{ lib
, pythonOlder
, buildPythonPackage
, fetchPypi
, numpy
, scipy
, sympy
, matplotlib
, networkx
, ply
, pillow
, cffi
, requests
, requests_ntlm
, IBMQuantumExperience
, jsonschema
, psutil
, cmake
, llvmPackages
, fetchFromGitHub
# Python Inputs
, qiskit-aer
, qiskit-aqua
, qiskit-ibmq-provider
, qiskit-ignis
, qiskit-terra
# Check Inputs
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "qiskit";
version = "0.14.0";
# NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history
version = "0.17.0";

disabled = !isPy3k;
disabled = pythonOlder "3.5";

src = fetchPypi {
inherit pname version;
sha256 = "d086a21d0eee61bb12e1f2cd6148a7292005fd10584ca33d6c404dd5c53ba95f";
src = fetchFromGitHub {
owner = "Qiskit";
repo = "qiskit";
rev = version;
sha256 = "1cnjcvvzklyq102fipqnwd5ham0sp0451gp7j79cwwsxzvji6pcc";
};

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

propagatedBuildInputs = [
numpy
matplotlib
networkx
ply
scipy
sympy
pillow
cffi
requests
requests_ntlm
IBMQuantumExperience
jsonschema
psutil
qiskit-aer
qiskit-aqua
qiskit-ibmq-provider
qiskit-ignis
qiskit-terra
];

# Pypi's tarball doesn't contain tests
doCheck = false;
checkInputs = [ pytestCheckHook ];
dontUseSetuptoolsCheck = true;
# following doesn't work b/c they are distributed across different nix sitePackages dirs. Tested with pytest though.
# pythonImportsCheck = [ "qiskit" "qiskit.terra" "qiskit.ignis" "qiskit.aer" "qiskit.aqua" ];

meta = {
description = "Quantum Software Development Kit for writing quantum computing experiments, programs, and applications";
homepage = https://github.com/QISKit/qiskit-terra;
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [
pandaman
];
# Needs to be updated and have its new dependencies added
broken = true;
description = "Software for developing quantum computing programs";
homepage = "https://qiskit.org";
downloadPage = "https://github.com/QISKit/qiskit/releases";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ drewrisinger pandaman ];
};
}
6 changes: 4 additions & 2 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4044,6 +4044,10 @@ in {

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

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

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

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

ipaddr = callPackage ../development/python-modules/ipaddr { };
Expand Down Expand Up @@ -7130,8 +7134,6 @@ in {

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

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

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

ibis-framework = callPackage ../development/python-modules/ibis-framework { };
Expand Down