1{ lib
2, pythonOlder
3, buildPythonPackage
4, fetchFromGitHub
5, arrow
6, nest-asyncio
7, qiskit-terra
8, requests
9, requests_ntlm
10, websockets
11 # Visualization inputs
12, withVisualization ? false
13, ipython
14, ipyvuetify
15, ipywidgets
16, matplotlib
17, plotly
18, pyperclip
19, seaborn
20 # check inputs
21, pytestCheckHook
22, nbconvert
23, nbformat
24, pproxy
25, qiskit-aer
26, vcrpy
27}:
28
29let
30 visualizationPackages = [
31 ipython
32 ipyvuetify
33 ipywidgets
34 matplotlib
35 plotly
36 pyperclip
37 seaborn
38 ];
39in
40buildPythonPackage rec {
41 pname = "qiskit-ibmq-provider";
42 version = "0.12.2";
43
44 disabled = pythonOlder "3.6";
45
46 src = fetchFromGitHub {
47 owner = "Qiskit";
48 repo = pname;
49 rev = version;
50 sha256 = "0yil363mqssq0453nrwxgkjivzk3a4jgbnaf21bp7lwfcl2jdhqm";
51 };
52
53 propagatedBuildInputs = [
54 arrow
55 nest-asyncio
56 qiskit-terra
57 requests
58 requests_ntlm
59 websockets
60 ] ++ lib.optionals withVisualization visualizationPackages;
61
62 # Most tests require credentials to run on IBMQ
63 checkInputs = [
64 pytestCheckHook
65 nbconvert
66 nbformat
67 pproxy
68 qiskit-aer
69 vcrpy
70 ] ++ lib.optionals (!withVisualization) visualizationPackages;
71
72 pythonImportsCheck = [ "qiskit.providers.ibmq" ];
73 # These disabled tests require internet connection, aren't skipped elsewhere
74 disabledTests = [
75 "test_old_api_url"
76 "test_non_auth_url"
77 "test_non_auth_url_with_hub"
78
79 # slow tests
80 "test_websocket_retry_failure"
81 "test_invalid_url"
82 ];
83
84 # Skip tests that rely on internet access (mostly to IBM Quantum Experience cloud).
85 # Options defined in qiskit.terra.test.testing_options.py::get_test_options
86 QISKIT_TESTS = "skip_online";
87
88 meta = with lib; {
89 description = "Qiskit provider for accessing the quantum devices and simulators at IBMQ";
90 homepage = "https://github.com/Qiskit/qiskit-ibmq-provider";
91 changelog = "https://qiskit.org/documentation/release_notes.html";
92 license = licenses.asl20;
93 maintainers = with maintainers; [ drewrisinger ];
94 };
95}