2020-03-20 14:43:30 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-03-25 00:14:48 +00:00
|
|
|
, arrow
|
2020-03-20 14:43:30 +00:00
|
|
|
, nest-asyncio
|
|
|
|
, qiskit-terra
|
|
|
|
, requests
|
|
|
|
, requests_ntlm
|
|
|
|
, websockets
|
2020-04-06 19:34:24 +00:00
|
|
|
# Visualization inputs
|
2020-10-08 05:14:51 +00:00
|
|
|
, withVisualization ? false
|
|
|
|
, ipython
|
2020-04-06 19:34:24 +00:00
|
|
|
, ipyvuetify
|
|
|
|
, ipywidgets
|
|
|
|
, matplotlib
|
|
|
|
, plotly
|
|
|
|
, pyperclip
|
|
|
|
, seaborn
|
2020-03-20 14:43:30 +00:00
|
|
|
# check inputs
|
|
|
|
, pytestCheckHook
|
2020-10-08 05:14:51 +00:00
|
|
|
, nbconvert
|
|
|
|
, nbformat
|
2020-03-20 14:43:30 +00:00
|
|
|
, pproxy
|
2021-03-05 19:30:37 +00:00
|
|
|
, qiskit-aer
|
2020-04-06 19:34:24 +00:00
|
|
|
, vcrpy
|
2020-03-20 14:43:30 +00:00
|
|
|
}:
|
|
|
|
|
2020-10-08 05:14:51 +00:00
|
|
|
let
|
|
|
|
visualizationPackages = [
|
|
|
|
ipython
|
|
|
|
ipyvuetify
|
|
|
|
ipywidgets
|
|
|
|
matplotlib
|
|
|
|
plotly
|
|
|
|
pyperclip
|
|
|
|
seaborn
|
|
|
|
];
|
|
|
|
in
|
2020-03-20 14:43:30 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qiskit-ibmq-provider";
|
2021-03-26 14:18:57 +00:00
|
|
|
version = "0.12.2";
|
2020-03-20 14:43:30 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Qiskit";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-03-26 14:18:57 +00:00
|
|
|
sha256 = "0yil363mqssq0453nrwxgkjivzk3a4jgbnaf21bp7lwfcl2jdhqm";
|
2020-03-20 14:43:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-03-25 00:14:48 +00:00
|
|
|
arrow
|
2020-03-20 14:43:30 +00:00
|
|
|
nest-asyncio
|
|
|
|
qiskit-terra
|
|
|
|
requests
|
|
|
|
requests_ntlm
|
|
|
|
websockets
|
2020-10-08 05:14:51 +00:00
|
|
|
] ++ lib.optionals withVisualization visualizationPackages;
|
2020-03-20 14:43:30 +00:00
|
|
|
|
|
|
|
# Most tests require credentials to run on IBMQ
|
2020-04-06 19:34:24 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2020-10-08 05:14:51 +00:00
|
|
|
nbconvert
|
|
|
|
nbformat
|
2020-04-06 19:34:24 +00:00
|
|
|
pproxy
|
2021-03-05 19:30:37 +00:00
|
|
|
qiskit-aer
|
2020-04-06 19:34:24 +00:00
|
|
|
vcrpy
|
2020-10-08 05:14:51 +00:00
|
|
|
] ++ lib.optionals (!withVisualization) visualizationPackages;
|
2020-04-06 19:34:24 +00:00
|
|
|
|
2020-03-20 14:43:30 +00:00
|
|
|
pythonImportsCheck = [ "qiskit.providers.ibmq" ];
|
2020-04-06 19:34:24 +00:00
|
|
|
# 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"
|
2020-10-08 04:40:41 +00:00
|
|
|
|
|
|
|
# slow tests
|
|
|
|
"test_websocket_retry_failure"
|
|
|
|
"test_invalid_url"
|
2020-04-06 19:34:24 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# 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";
|
2020-03-20 14:43:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Qiskit provider for accessing the quantum devices and simulators at IBMQ";
|
|
|
|
homepage = "https://github.com/Qiskit/qiskit-ibmq-provider";
|
2020-08-10 22:42:10 +00:00
|
|
|
changelog = "https://qiskit.org/documentation/release_notes.html";
|
2020-03-20 14:43:30 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
|
|
|
}
|