pyquil-grpc-web 4.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyquil_grpc_web-4.9.0/LICENSE +202 -0
- pyquil_grpc_web-4.9.0/NOTICE.md +49 -0
- pyquil_grpc_web-4.9.0/PKG-INFO +258 -0
- pyquil_grpc_web-4.9.0/README.md +210 -0
- pyquil_grpc_web-4.9.0/pyproject.toml +118 -0
- pyquil_grpc_web-4.9.0/pyquil/__init__.py +5 -0
- pyquil_grpc_web-4.9.0/pyquil/_version.py +25 -0
- pyquil_grpc_web-4.9.0/pyquil/api/__init__.py +67 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_abstract_compiler.py +228 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_benchmark.py +160 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_compiler.py +258 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_compiler_client.py +168 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_errors.py +123 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_logger.py +27 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_qam.py +177 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_qpu.py +283 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_quantum_computer.py +1340 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_qvm.py +222 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_rewrite_arithmetic.py +151 -0
- pyquil_grpc_web-4.9.0/pyquil/api/_wavefunction_simulator.py +233 -0
- pyquil_grpc_web-4.9.0/pyquil/diagnostics.py +14 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/__init__.py +66 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_calibration.py +23 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_group.py +345 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_main.py +531 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_memory.py +197 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_program.py +135 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_result.py +207 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_setting.py +219 -0
- pyquil_grpc_web-4.9.0/pyquil/experiment/_symmetrization.py +25 -0
- pyquil_grpc_web-4.9.0/pyquil/external/README.md +8 -0
- pyquil_grpc_web-4.9.0/pyquil/external/__init__.py +0 -0
- pyquil_grpc_web-4.9.0/pyquil/external/rpcq.py +307 -0
- pyquil_grpc_web-4.9.0/pyquil/gates.py +1272 -0
- pyquil_grpc_web-4.9.0/pyquil/latex/__init__.py +9 -0
- pyquil_grpc_web-4.9.0/pyquil/latex/_diagram.py +522 -0
- pyquil_grpc_web-4.9.0/pyquil/latex/_ipython.py +83 -0
- pyquil_grpc_web-4.9.0/pyquil/latex/_main.py +110 -0
- pyquil_grpc_web-4.9.0/pyquil/latex/latex_generation.py +32 -0
- pyquil_grpc_web-4.9.0/pyquil/noise.py +823 -0
- pyquil_grpc_web-4.9.0/pyquil/noise_gates.py +93 -0
- pyquil_grpc_web-4.9.0/pyquil/operator_estimation.py +379 -0
- pyquil_grpc_web-4.9.0/pyquil/paulis.py +1197 -0
- pyquil_grpc_web-4.9.0/pyquil/py.typed +0 -0
- pyquil_grpc_web-4.9.0/pyquil/pyqvm.py +492 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/__init__.py +8 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/_base.py +45 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/_isa.py +0 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/compiler.py +26 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/graph.py +51 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/qcs.py +77 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/transformers/__init__.py +7 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/transformers/compiler_isa_to_graph.py +10 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/transformers/graph_to_compiler_isa.py +160 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/transformers/qcs_isa_to_compiler_isa.py +353 -0
- pyquil_grpc_web-4.9.0/pyquil/quantum_processor/transformers/qcs_isa_to_graph.py +6 -0
- pyquil_grpc_web-4.9.0/pyquil/quil.py +1206 -0
- pyquil_grpc_web-4.9.0/pyquil/quilatom.py +1246 -0
- pyquil_grpc_web-4.9.0/pyquil/quilbase.py +2921 -0
- pyquil_grpc_web-4.9.0/pyquil/quiltcalibrations.py +102 -0
- pyquil_grpc_web-4.9.0/pyquil/quiltwaveforms.py +280 -0
- pyquil_grpc_web-4.9.0/pyquil/simulation/__init__.py +21 -0
- pyquil_grpc_web-4.9.0/pyquil/simulation/_numpy.py +307 -0
- pyquil_grpc_web-4.9.0/pyquil/simulation/_reference.py +364 -0
- pyquil_grpc_web-4.9.0/pyquil/simulation/matrices.py +454 -0
- pyquil_grpc_web-4.9.0/pyquil/simulation/tools.py +454 -0
- pyquil_grpc_web-4.9.0/pyquil/wavefunction.py +221 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
contextvars
|
|
2
|
+
===========
|
|
3
|
+
|
|
4
|
+
We vendor the backported source for `contextvars` as to support a
|
|
5
|
+
noarch `conda` build of pyQuil, as it was incorporated into the
|
|
6
|
+
standard library in Python 3.7.
|
|
7
|
+
|
|
8
|
+
https://github.com/MagicStack/contextvars
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2015-present MagicStack Inc. http://magic.io
|
|
11
|
+
|
|
12
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
you may not use this file except in compliance with the License.
|
|
14
|
+
You may obtain a copy of the License at
|
|
15
|
+
|
|
16
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
|
|
18
|
+
Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
See the License for the specific language governing permissions and
|
|
22
|
+
limitations under the License.
|
|
23
|
+
|
|
24
|
+
dataclasses
|
|
25
|
+
===========
|
|
26
|
+
|
|
27
|
+
We vendor the backported source for `dataclasses` as to support a
|
|
28
|
+
noarch `conda` build of pyQuil, as it was incorporated into the
|
|
29
|
+
standard library in Python 3.7.
|
|
30
|
+
|
|
31
|
+
https://github.com/ericvsmith/dataclasses
|
|
32
|
+
|
|
33
|
+
This software was written by Eric V. Smith and the oldest commit on
|
|
34
|
+
GitHub was in 2017. The license is included below, but the boilerplate
|
|
35
|
+
has not been filled out.
|
|
36
|
+
|
|
37
|
+
Copyright [yyyy] [name of copyright owner]
|
|
38
|
+
|
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
40
|
+
you may not use this file except in compliance with the License.
|
|
41
|
+
You may obtain a copy of the License at
|
|
42
|
+
|
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
44
|
+
|
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
48
|
+
See the License for the specific language governing permissions and
|
|
49
|
+
limitations under the License.
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pyquil-grpc-web
|
|
3
|
+
Version: 4.9.0
|
|
4
|
+
Summary: A Python library for creating Quantum Instruction Language (Quil) programs.
|
|
5
|
+
Home-page: https://github.com/rigetti/pyquil.git
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: quantum,quil,programming,hybrid
|
|
8
|
+
Author: Rigetti Computing
|
|
9
|
+
Author-email: softapps@rigetti.com
|
|
10
|
+
Requires-Python: >=3.8,<=3.12
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Provides-Extra: docs
|
|
21
|
+
Provides-Extra: latex
|
|
22
|
+
Requires-Dist: Sphinx (>=7.1.2,<8.0.0) ; extra == "docs"
|
|
23
|
+
Requires-Dist: deprecated (>=1.2.13,<2.0.0)
|
|
24
|
+
Requires-Dist: importlib-metadata (>=3.7.3,<5) ; python_version < "3.8"
|
|
25
|
+
Requires-Dist: ipython (>=7.21.0,<8.0.0) ; extra == "latex"
|
|
26
|
+
Requires-Dist: lark (>=0.11.1,<0.12.0)
|
|
27
|
+
Requires-Dist: matplotlib (>=3.7.1,<4.0.0) ; extra == "docs"
|
|
28
|
+
Requires-Dist: matplotlib-inline (>=0.1.6,<0.2.0)
|
|
29
|
+
Requires-Dist: nbsphinx (>=0.9.1,<0.10.0) ; extra == "docs"
|
|
30
|
+
Requires-Dist: networkx (>=2.5)
|
|
31
|
+
Requires-Dist: numpy (>=1.22,<2.0)
|
|
32
|
+
Requires-Dist: packaging (>=23.1,<24.0)
|
|
33
|
+
Requires-Dist: pandoc (==2.4b0) ; extra == "docs"
|
|
34
|
+
Requires-Dist: qcs-sdk-python-grpc-web (==0.17.4)
|
|
35
|
+
Requires-Dist: recommonmark (>=0.7.1,<0.8.0) ; extra == "docs"
|
|
36
|
+
Requires-Dist: rpcq (>=3.10.0,<4.0.0)
|
|
37
|
+
Requires-Dist: scipy (>=1.7.3,<2.0.0)
|
|
38
|
+
Requires-Dist: seaborn (>=0.12.2,<0.13.0) ; extra == "docs"
|
|
39
|
+
Requires-Dist: sphinx-rtd-theme (>=1.3.0,<2.0.0) ; extra == "docs"
|
|
40
|
+
Requires-Dist: tenacity (>=8.2.2,<9.0.0)
|
|
41
|
+
Requires-Dist: types-deprecated (>=1.2.9.2,<2.0.0.0)
|
|
42
|
+
Requires-Dist: types-python-dateutil (>=2.8.19,<3.0.0)
|
|
43
|
+
Requires-Dist: types-retry (>=0.9.9,<0.10.0)
|
|
44
|
+
Project-URL: Documentation, https://pyquil-docs.rigetti.com
|
|
45
|
+
Project-URL: Repository, https://github.com/rigetti/pyquil.git
|
|
46
|
+
Description-Content-Type: text/markdown
|
|
47
|
+
|
|
48
|
+
PyQuil: Quantum programming in Python
|
|
49
|
+
=====================================
|
|
50
|
+
|
|
51
|
+
[][binder]
|
|
52
|
+
[![docs][docs-badge]][docs-repo]
|
|
53
|
+
[![docker][docker-badge]][docker-repo]
|
|
54
|
+
[![pepy][pepy-badge]][pepy-repo]
|
|
55
|
+
[![pypi][pypi-badge]][pypi-repo]
|
|
56
|
+
[![slack][slack-badge]][slack-invite]
|
|
57
|
+
|
|
58
|
+
PyQuil is a Python library for quantum programming using [Quil](https://arxiv.org/abs/1608.03355),
|
|
59
|
+
the quantum instruction language developed at [Rigetti Computing](https://www.rigetti.com/).
|
|
60
|
+
PyQuil serves three main functions:
|
|
61
|
+
|
|
62
|
+
- Easily generating Quil programs from quantum gates and classical operations
|
|
63
|
+
- Compiling and simulating Quil programs using the [Quil Compiler](https://github.com/rigetti/quilc)
|
|
64
|
+
(quilc) and the [Quantum Virtual Machine](https://github.com/rigetti/qvm) (QVM)
|
|
65
|
+
- Executing Quil programs on real quantum processors (QPUs) using
|
|
66
|
+
[Quantum Cloud Services][qcs-paper] (QCS)
|
|
67
|
+
|
|
68
|
+
PyQuil has a ton of other features, which you can learn more about in the
|
|
69
|
+
[docs](http://pyquil.readthedocs.io/en/latest/). However, you can also keep reading
|
|
70
|
+
below to get started with running your first quantum program!
|
|
71
|
+
|
|
72
|
+
Quickstart with interactive tutorial notebooks
|
|
73
|
+
----------------------------------------------
|
|
74
|
+
|
|
75
|
+
Without installing anything, you can quickly get started with quantum programming by exploring
|
|
76
|
+
our interactive [Jupyter][jupyter] notebook tutorials and examples. To run them in a preconfigured
|
|
77
|
+
execution environment on [Binder][mybinder], click the "launch binder" badge at the top of the
|
|
78
|
+
README or the link [here][binder]! To learn more about the tutorials and how you can add your own,
|
|
79
|
+
visit the [rigetti/forest-tutorials][forest-tutorials] repository. If you'd rather set everything
|
|
80
|
+
up locally, or are interested in contributing to pyQuil, continue onto the next section for
|
|
81
|
+
instructions on installing pyQuil and the Forest SDK.
|
|
82
|
+
|
|
83
|
+
Installing pyQuil and the Forest SDK
|
|
84
|
+
------------------------------------
|
|
85
|
+
|
|
86
|
+
[![pypi][pypi-badge]][pypi-repo]
|
|
87
|
+
[![conda-forge][conda-forge-badge]][conda-forge-badge]
|
|
88
|
+
[![conda-rigetti][conda-rigetti-badge]][conda-rigetti-repo]
|
|
89
|
+
|
|
90
|
+
PyQuil can be installed using `conda`, `pip`, or from source. To install it from PyPI (via `pip`),
|
|
91
|
+
do the following:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pip install pyquil
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
To instead install pyQuil from source, do the following from within the repository after cloning it:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pip install -e .
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
If you choose to use `pip`, we highly recommend installing pyQuil within a virtual environment.
|
|
104
|
+
|
|
105
|
+
PyQuil, along with quilc, the QVM, and other libraries, make up what is called the Forest
|
|
106
|
+
SDK. To make full use of pyQuil, you will need to additionally have installed
|
|
107
|
+
[quilc](https://github.com/quil-lang/quilc) and the [QVM](https://github.com/quil-lang/qvm).
|
|
108
|
+
For more information, check out the docs!
|
|
109
|
+
|
|
110
|
+
Running your first quantum program
|
|
111
|
+
----------------------------------
|
|
112
|
+
|
|
113
|
+
In just a few lines, we can use pyQuil with the Forest SDK to simulate a Bell state!
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
from pyquil import get_qc, Program
|
|
117
|
+
from pyquil.gates import CNOT, H, MEASURE
|
|
118
|
+
|
|
119
|
+
qvm = get_qc('2q-qvm')
|
|
120
|
+
|
|
121
|
+
p = Program()
|
|
122
|
+
p += H(0)
|
|
123
|
+
p += CNOT(0, 1)
|
|
124
|
+
ro = p.declare('ro', 'BIT', 2)
|
|
125
|
+
p += MEASURE(0, ro[0])
|
|
126
|
+
p += MEASURE(1, ro[1])
|
|
127
|
+
p.wrap_in_numshots_loop(10)
|
|
128
|
+
|
|
129
|
+
qvm.run(p).get_register_map()['ro'].tolist()
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The output of the above program should look something like the following,
|
|
133
|
+
the statistics of which are consistent with a two-qubit entangled state.
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
[[0, 0],
|
|
137
|
+
[1, 1],
|
|
138
|
+
[1, 1],
|
|
139
|
+
[1, 1],
|
|
140
|
+
[1, 1],
|
|
141
|
+
[0, 0],
|
|
142
|
+
[0, 0],
|
|
143
|
+
[1, 1],
|
|
144
|
+
[0, 0],
|
|
145
|
+
[0, 0]]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Using the Forest SDK, you can simulate the operation of a real quantum processor (QPU). If you
|
|
149
|
+
would like to run on the real QPUs in our lab in Berkeley, you can sign up for an account
|
|
150
|
+
on [Quantum Cloud Services][qcs-request-access] (QCS)!
|
|
151
|
+
|
|
152
|
+
Joining the Forest community
|
|
153
|
+
----------------------------
|
|
154
|
+
|
|
155
|
+
If you'd like to get involved with pyQuil and Forest, joining the
|
|
156
|
+
[Rigetti Forest Slack Workspace][slack-invite] is a great place to start! You can do so by
|
|
157
|
+
clicking the invite link in the previous sentence, or in the badge at the top of this README.
|
|
158
|
+
The Slack Workspace is a great place to ask general questions, join high-level design discussions,
|
|
159
|
+
and hear about updates to pyQuil and the Forest SDK.
|
|
160
|
+
|
|
161
|
+
To go a step further and start contributing to the development of pyQuil, good first steps are
|
|
162
|
+
[reporting a bug][bug], [requesting a feature][feature], or picking up one of the issues with the
|
|
163
|
+
[good first issue][first] or [help wanted][help] labels. Once you find an issue to work
|
|
164
|
+
on, make sure to [fork this repository][fork] and then [open a pull request][pr] once your changes
|
|
165
|
+
are ready. For more information on all the ways you can contribute to pyQuil (along with
|
|
166
|
+
some helpful tips for developers and maintainers) check out our
|
|
167
|
+
[Contributing Guide](CONTRIBUTING.md)!
|
|
168
|
+
|
|
169
|
+
To see what people have contributed in the past, check out the [Changelog](CHANGELOG.md) for
|
|
170
|
+
a detailed list of all announcements, improvements, changes, and bugfixes. The
|
|
171
|
+
[Releases](https://github.com/rigetti/pyquil/releases) page for pyQuil contains similar
|
|
172
|
+
information, but with links to the pull request for each change and its corresponding author.
|
|
173
|
+
Thanks for contributing to pyQuil! 🙂
|
|
174
|
+
|
|
175
|
+
Citing pyQuil, Forest, and Quantum Cloud Services
|
|
176
|
+
-------------------------------------------------
|
|
177
|
+
|
|
178
|
+
[![zenodo][zenodo-badge]][zenodo-doi]
|
|
179
|
+
|
|
180
|
+
If you use pyQuil, Grove, or other parts of the Forest SDK in your research, please cite
|
|
181
|
+
the [Quil specification][quil-paper] using the following BibTeX snippet:
|
|
182
|
+
|
|
183
|
+
```bibtex
|
|
184
|
+
@misc{smith2016practical,
|
|
185
|
+
title={A Practical Quantum Instruction Set Architecture},
|
|
186
|
+
author={Robert S. Smith and Michael J. Curtis and William J. Zeng},
|
|
187
|
+
year={2016},
|
|
188
|
+
eprint={1608.03355},
|
|
189
|
+
archivePrefix={arXiv},
|
|
190
|
+
primaryClass={quant-ph}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Additionally, if your research involves taking data on Rigetti quantum processors (QPUs) via
|
|
195
|
+
the Quantum Cloud Services (QCS) platform, please reference the [QCS paper][qcs-paper] using the
|
|
196
|
+
following BibTeX snippet:
|
|
197
|
+
|
|
198
|
+
```bibtex
|
|
199
|
+
@article{Karalekas_2020,
|
|
200
|
+
title = {A quantum-classical cloud platform optimized for variational hybrid algorithms},
|
|
201
|
+
author = {Peter J Karalekas and Nikolas A Tezak and Eric C Peterson
|
|
202
|
+
and Colm A Ryan and Marcus P da Silva and Robert S Smith},
|
|
203
|
+
year = 2020,
|
|
204
|
+
month = {apr},
|
|
205
|
+
publisher = {{IOP} Publishing},
|
|
206
|
+
journal = {Quantum Science and Technology},
|
|
207
|
+
volume = {5},
|
|
208
|
+
number = {2},
|
|
209
|
+
pages = {024003},
|
|
210
|
+
doi = {10.1088/2058-9565/ab7559},
|
|
211
|
+
url = {https://doi.org/10.1088%2F2058-9565%2Fab7559},
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The preprint of the QCS paper is available on [arXiv][qcs-arxiv], and the supplementary
|
|
216
|
+
interactive notebooks and datasets for the paper can be found in the [rigetti/qcs-paper][qcs-repo]
|
|
217
|
+
repository.
|
|
218
|
+
|
|
219
|
+
License
|
|
220
|
+
-------
|
|
221
|
+
|
|
222
|
+
PyQuil is licensed under the
|
|
223
|
+
[Apache License 2.0](https://github.com/rigetti/pyQuil/blob/master/LICENSE).
|
|
224
|
+
|
|
225
|
+
[binder]: https://mybinder.org/v2/gh/rigetti/forest-tutorials/master?urlpath=lab/tree/Welcome.ipynb
|
|
226
|
+
[conda-forge-badge]: https://img.shields.io/conda/vn/conda-forge/pyquil.svg
|
|
227
|
+
[conda-forge-repo]: https://anaconda.org/conda-forge/pyquil
|
|
228
|
+
[conda-rigetti-badge]: https://img.shields.io/conda/vn/rigetti/pyquil?label=conda-rigetti
|
|
229
|
+
[conda-rigetti-repo]: https://anaconda.org/rigetti/pyquil
|
|
230
|
+
[docker-badge]: https://img.shields.io/docker/pulls/rigetti/forest
|
|
231
|
+
[docker-repo]: https://hub.docker.com/r/rigetti/forest
|
|
232
|
+
[docs-badge]: https://readthedocs.org/projects/pyquil/badge/?version=latest
|
|
233
|
+
[docs-repo]: http://pyquil.readthedocs.io/en/latest/?badge=latest
|
|
234
|
+
[forest-tutorials]: https://github.com/rigetti/forest-tutorials
|
|
235
|
+
[jupyter]: https://jupyter.org/
|
|
236
|
+
[mybinder]: https://mybinder.org
|
|
237
|
+
[pepy-badge]: https://pepy.tech/badge/pyquil
|
|
238
|
+
[pepy-repo]: https://pepy.tech/project/pyquil
|
|
239
|
+
[pypi-badge]: https://img.shields.io/pypi/v/pyquil.svg
|
|
240
|
+
[pypi-repo]: https://pypi.org/project/pyquil/
|
|
241
|
+
[qcs-request-access]: https://qcs.rigetti.com/request-access
|
|
242
|
+
[slack-badge]: https://img.shields.io/badge/slack-rigetti--forest-812f82.svg?
|
|
243
|
+
[zenodo-badge]: https://zenodo.org/badge/DOI/10.5281/zenodo.3553165.svg
|
|
244
|
+
[zenodo-doi]: https://doi.org/10.5281/zenodo.3553165
|
|
245
|
+
|
|
246
|
+
[qcs-arxiv]: https://arxiv.org/abs/2001.04449
|
|
247
|
+
[qcs-paper]: https://dx.doi.org/10.1088/2058-9565/ab7559
|
|
248
|
+
[qcs-repo]: https://github.com/rigetti/qcs-paper
|
|
249
|
+
[quil-paper]: https://arxiv.org/abs/1608.03355
|
|
250
|
+
|
|
251
|
+
[bug]: https://github.com/rigetti/pyquil/issues/new?assignees=&labels=bug+%3Abug%3A&template=BUG_REPORT.md&title=
|
|
252
|
+
[feature]: https://github.com/rigetti/pyquil/issues/new?assignees=&labels=enhancement+%3Asparkles%3A&template=FEATURE_REQUEST.md&title=
|
|
253
|
+
[first]: https://github.com/rigetti/pyquil/labels/good%20first%20issue%20%3Ababy%3A
|
|
254
|
+
[help]: https://github.com/rigetti/pyquil/labels/help%20wanted%20%3Awave%3A
|
|
255
|
+
[fork]: https://github.com/rigetti/pyquil/fork
|
|
256
|
+
[pr]: https://github.com/rigetti/pyquil/compare
|
|
257
|
+
[slack-invite]: https://join.slack.com/t/rigetti-forest/shared_invite/enQtNTUyNTE1ODg3MzE2LWQwNzBlMjZlMmNlN2M5MzQyZDlmOGViODQ5ODI0NWMwNmYzODY4YTc2ZjdjOTNmNzhiYTk2YjVhNTE2NTRkODY
|
|
258
|
+
|