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.13.0";
29 pyproject = true;
30
31 disabled = pythonOlder "3.9";
32
33 src = fetchFromGitHub {
34 owner = "rigetti";
35 repo = "pyquil";
36 rev = "refs/tags/v${version}";
37 hash = "sha256-tfneoRtBOHPHWqeajpr+m0jDhtcl6+ReQNl2kt3ymUc=";
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
51 dependencies = [
52 deprecated
53 matplotlib-inline
54 networkx
55 numpy
56 packaging
57 qcs-sdk-python
58 rpcq
59 scipy
60 types-deprecated
61 typing-extensions
62 ];
63
64 nativeCheckInputs = [
65 nest-asyncio
66 pytest-asyncio
67 pytest-mock
68 pytestCheckHook
69 respx
70 syrupy
71 ipython
72 ];
73
74 # tests hang
75 doCheck = false;
76
77 pythonImportsCheck = [ "pyquil" ];
78
79 meta = with lib; {
80 description = "Python library for creating Quantum Instruction Language (Quil) programs";
81 homepage = "https://github.com/rigetti/pyquil";
82 changelog = "https://github.com/rigetti/pyquil/blob/v${version}/CHANGELOG.md";
83 license = licenses.asl20;
84 maintainers = with maintainers; [ fab ];
85 };
86}