1{
2 lib,
3 buildPythonPackage,
4 deprecated,
5 fetchFromGitHub,
6 ipython,
7 matplotlib-inline,
8 nest-asyncio,
9 networkx,
10 numpy,
11 packaging,
12 poetry-core,
13 pytest-asyncio,
14 pytest-mock,
15 pytestCheckHook,
16 pythonOlder,
17 qcs-sdk-python,
18 respx,
19 rpcq,
20 scipy,
21 syrupy,
22 types-deprecated,
23 typing-extensions,
24}:
25
26buildPythonPackage rec {
27 pname = "pyquil";
28 version = "4.15.0";
29 pyproject = true;
30
31 disabled = pythonOlder "3.9";
32
33 src = fetchFromGitHub {
34 owner = "rigetti";
35 repo = "pyquil";
36 tag = "v${version}";
37 hash = "sha256-zRXIMSgcFlTZQ5Y/1pSC30ZhvKj1Pn1+7SbTetEdzio=";
38 };
39
40 pythonRelaxDeps = [
41 "lark"
42 "networkx"
43 "packaging"
44 "qcs-sdk-python"
45 "rpcq"
46 ];
47
48 build-system = [ poetry-core ];
49
50 dependencies = [
51 deprecated
52 matplotlib-inline
53 networkx
54 numpy
55 packaging
56 qcs-sdk-python
57 rpcq
58 scipy
59 types-deprecated
60 typing-extensions
61 ];
62
63 nativeCheckInputs = [
64 nest-asyncio
65 pytest-asyncio
66 pytest-mock
67 pytestCheckHook
68 respx
69 syrupy
70 ipython
71 ];
72
73 # tests hang
74 doCheck = false;
75
76 pythonImportsCheck = [ "pyquil" ];
77
78 meta = with lib; {
79 description = "Python library for creating Quantum Instruction Language (Quil) programs";
80 homepage = "https://github.com/rigetti/pyquil";
81 changelog = "https://github.com/rigetti/pyquil/blob/v${version}/CHANGELOG.md";
82 license = licenses.asl20;
83 maintainers = with maintainers; [ fab ];
84 };
85}