Releases: rigetti/pyquil
Releases · rigetti/pyquil
v2.21.0
v2.20.0
Announcements
Improvements and Changes
- Added a PyQuil only
rewrite_arithmetic
handler, deprecating the previous
RPC call toquilc
innative_quil_to_executable
(@kilimanjaro, gh-1210).
Bugfixes
v2.19.0
Changelog
Improvements and Changes
- Add a section to
CONTRIBUTING.md
about publishing packages to conda-forge
(@appleby, gh-1186). - Correctly insert state preparation code in
Experiment
s before main program code
(@notmgsk, gh-1189). controlled
modifier now accepts either a Sequence of control qubits or a single control qubit. Previously, only a single control qubit was supported (@adamglos92, gh-1196).
Bugfixes
- Fix flakiness in
test_run
inpyquil/test/test_quantum_computer.py
(@appleby, gh-1190). - Fix a bug in QuantumComputer.experiment that resulted in a TypeError being
raised when called multiple times on the same experiment when the underlying QAM
was a QVM based on a physical device (@appleby, gh-1188).
v2.18.0
v2.18 (March 3, 2020)
Announcements
Improvements and Changes
Bugfixes
- Fixed the QCS access request link in the README (@amyfbrown, gh-1171).
- Fix the SDK download link and instructions in the docs (@amyfbrown, gh-1173).
- Removed HALT from valid Protoquil / supported Quil. (@kilimanjaro, gh-1176).
- Fix error in comment in Noise and Quantum Computation page (@jlapeyre gh-1180)
v2.17.0
Announcements
- In order to make the pyQuil examples more accessible, we recently made a new repository, rigetti/forest-tutorials, which is set up so that the example notebooks can be run via a web browser in a preconfigured execution environment on Binder. The pyQuil README now has a "launch binder" badge for running these tutorial notebooks, as well as a "Quickstart" section explaining how they work. To run the tutorial notebooks, click the badge in the README or the link here (@karalekas, gh-1167).
Improvements and Changes
- Pin the
antlr4-python3-runtime
package to belowv4.8
(@karalekas, gh-1163). - Expand upon the acknowledgements file to mention contributions from pre-QCS and list previous maintainers (@karalekas, gh-1165).
- Use the rigetti/gitlab-pipelines repository's template YAMLs in the
.gitlab-ci.yml
, and add a section toCONTRIBUTING.md
about the CI/CD pipelines (@karalekas, gh-1166). - Add another round of improvements to the README (@karalekas, gh-1168).
Bugfixes
- Replace references to non-existent
endpoint
init arg when constructingQPUCompiler
s intest_qpu.py
(@appleby, gh-1164). - Preserve program metadata when constructing and manipulating
Experiment
objects (@kilimanjaro, gh-1160).
v2.16.0
Announcements
- The
TomographyExperiment
class has been renamed toExperiment
. In addition, there is a newQuantumComputer.calibration
method for performing readout calibration on a providedExperiment
, and utilities for applying the results of the calibration to correct for symmetrized readout error.ExperimentSetting
objects now also have anadditional_expectations
attribute for extracting simultaneously measurable expectation values from a single setting when usingQuantumComputer.experiment
(@karalekas, gh-1152, gh-1158).
Improvements and Changes
- Type hints have been added to the
quil.py
file (@rht, gh-1115, gh-1134). - Use Black for code style and enforce it (along with a line length of 100) via the
style
(flake8
) andformatcheck
(black --check
) CI jobs (@karalekas, gh-1132). - Ignore fewer
flake8
style rules, add theflake8-bugbear
plugin, and rename the style-relatedMakefile
targets and CI jobs so that they have a uniform naming convention:check-all
,check-format
,check-style
, andcheck-types
(@karalekas, gh-1133). - Added type hints to
noise.py
, began verifying in the CI (@rht, gh-1136). - Improved reStructuredText markup in docstrings (@peterjc, gh-1141).
- Add helper to separate
ExperimentResults
by groups of qubits on which their operator acts (@kylegulshen, gh-1078). - Added typing to the
pyquil/latex
module and added the module to thecheck-types
CI job (@karalekas, gh-1142). - Add helper to merge
TomographyExperiment
s in theexperiment
module's_group.py
file. Movegroup_experiments
fromoperator_estimation.py
to_group.py
and rename togroup_settings
but maintain backwards compatibility (@kylegulshen, gh-1077). - The code in
gate_matrices.py
,numpy_simulator.py
,reference_simulator.py
, andunitary_tools.py
has been typed and reorganized into a newsimulation
subdirectory, maintaining backwards compatibility (@karalekas, gh-1143). - Added a
.travis.yml
file to enable Travis CI for external-contributor builds, and upgraded GitLab CI style checks to py37 (@karalekas, gh-1145). - Delete
api/_job.py
,JobConnection
, andSyncConnection
, which have been deprecated for over a year and a half (@karalekas, gh-1144). - Added typing to the
pyquil/experiment
module and added the module to thecheck-types
CI job (@karalekas, gh-1146). - Use
dataclasses
instead ofnamedtuples
in thepyquil/device
module, and add type annotations to the entire module (@karalekas, gh-1149). - Reduced the number of
mypy
errors inpaulis.py
(@rht, gh-1147). - Compile to XY gates as well as CZ gates on dummy QVMs (@ecpeterson, gh-1151).
QAM.write_memory
now accepts either aSequence
of values or a single value (@tommy-moffat, gh-1114).- Added type hints for all remaining top-level files (@karalekas, gh-1150).
- Added type annotations to the whole
pyquil.api
module (@karalekas, gh-1157).
Bugfixes
- Don't attach pipes to stdout/stderr when starting quilc and qvm processes in
local_forest_runtime
. This prevents the pipe buffers from getting full and causing hung quilc/qvm for long running processes (@appleby, gh-1122). - Pass a sequence to
np.vstack
to avoid aFutureWarning
, and add a protoquil keyword argument toMyLazyCompiler.quil_to_native_quil
to avoid aTypeError
in themigration2-qc.ipynb
notebook (@appleby, gh-1138). - Removed unused method
Program._out()
inquil.py
(@rht, gh-1137). - Fixed string concatenation style, caused by
black
(@peterjc, gh-1139).
Special thanks this release to @rht and @peterjc for their contributions to type annotations and RST docstrings, respectively.
v2.15.0
Announcements
- PyQuil now supports encryption for communication with the QPU. It does so by requesting an
Engagement
from Forest Dispatch, which includes the keys necessary for encryption along with the endpoints to use. This workflow is managed by the newForestSession
class, and in the general case is transparent to the user (@kalzoo, gh-1123).
Improvements and Changes
- LaTeX circuit output now ignores
RESET
instructions by default, rendering instead the (equivalent) program withRESET
omitted (@kilimanjaro, gh-1118) - Broadened the scope of
flake8
compliance to the include theexamples
anddocs
directories, and thus the whole repository (@tommy-moffat, gh-1113). DEFGATE ... AS PAULI-SUM
is now supported (@ecpeterson, gh-1125).- Add unit test for validating Trotterization order (@jmbr, gh-1120).
- Updated the authentication mechanism to Forest server. Preferentially use credentials found at
~/.qcs/user_auth_credentials
and fall back to~/.qcs/qmi_auth_credentials
(@erichulburd, gh-1123). - The log level can now be controlled with the
LOG_LEVEL
environment variable, set toLOG_LEVEL=DEBUG
to help diagnose problems. In addition, certain errors will no longer print their entire stack trace outside ofDEBUG
mode, for a cleaner console and better user experience. This is only true for errors where the cause is well known (@kalzoo, gh-1123). - Connection to the QPU compiler now supports both ZeroMQ and HTTP(S) (@kalzoo, gh-1127).
- Bump quilc / qvm parent Docker images to v1.15.1 (@karalekas, gh-1128).
Bugfixes
- Pinned the
mypy
version to work around issue with nested types causing themake typecheck
CI job to fail (@erichulburd, gh-1119). - Minor fixes for
examples/1.3_vqe_demo.py
andexamples/quantum_walk.ipynb
(@appleby, gh-1116). - Only request engagement from Forest Dispatch when QPU and QPU Compiler addresses are not provided by other configuration sources (@kalzoo, gh-1130).
v2.14.0
Announcements
- There is a new
QuantumComputer.experiment
method for running a collection of quantum programs as defined by aTomographyExperiment
. These objects have a main program body and a collection of state preparation and measurement specifications, which capture the structure of many near-term applications and algorithms like the variational quantum eigensolver (VQE). In addition, theTomographyExperiment
encodes information about symmetrization, active qubit reset, and the number of shots to perform on the quantum backend (e.g. the QVM or QPU). For more information check out the API documentation sections on the Quantum Computer and on the Experiment Module (@karalekas, gh-1100).
Improvements and Changes
- Type hints have been added to the
PauliTerm
class (@rht, gh-1075). - The
rigetti/forest
Docker image now has less noisy output due to stdout and stderr redirection to log filesentrypoint.sh
(@karalekas, gh-1105). - Added a
make typecheck
target to runmypy
over a subset of the pyquil sources, and enabled typechecks in the GitLab CI pipeline (@appleby, gh-1098). - Added support for the
XY
(parameterizediSWAP
) gate family inProgram
s and inISA
s (@ecpeterson, gh-1096, gh-1107, gh-1111). - Removed the
tox.ini
andreadthedocs.yml
files (@karalekas, gh-1108). - Type hints have been added to the
PauliSum
class (@rht, gh-1104).
Bugfixes
- Fixed a bug in the LaTeX output of controlled unitary operations (@kilimanjaro, gh-1103).
- Fixed an example of using the
qc.run
method in the docs to correctly declare the size of a memory register (@appleby, gh-1099). - Specify UTF-8 encoding when opening files that might contain non-ascii characters, such as when reading the pyquil README.md file in setup.py or when serializing / deserializing pyquil.experiment objects to/from JSON (@appleby, gh-1102).
v2.13.0
Announcements
- Rather than installing pyQuil from PyPI, conda-forge, or the source directly, users with Docker installed can pull and run the
rigetti/forest
Docker image to quickly get started with compiling and simulating quantum programs! When running the image, a user will be dropped into anipython
REPL that has pyQuil and its requirements preinstalled, along with quilc and qvm servers running in the background (@karalekas, gh-1035, gh-1039). - Circuit diagram generation has had a makeover! In particular, the
pyquil.latex
module provides two mechanisms for generating diagrams from pyQuil programs:pyquil.latex.to_latex
generates human-readable LaTeX output expressing aProgram
as a circuit diagram, andpyquil.latex.display
renders aProgram
as anIPython.display.Image
for inline viewing in Jupyter Notebooks. Learn more about these features in the new example notebook (@kilimanjaro, gh-1074).
Improvements and Changes
- Added a
Makefile
with some simple targets for performing common build operations like creating and uploading a package (@karalekas, gh-1032). - Replaced symmetrization in
operator_estimation
with functionality contained withinQuantumComputer.run_symmetrized_readout
(@kylegulshen, gh-1047). - As part of the CI, we now package and push to TestPyPI on every commit, which de-risks breaking the
setup.py
and aids with testing (@karalekas, gh-1017). - We now calculate code coverage as part of the CI pipeline (@karalekas, gh-1052).
- Moved the program generation from
measure_observables
into its own private function (@kylegulshen, gh-1043). - All uses of
__future__
andsix
have been dropped (@karalekas, gh-1060). - The
conftest.py
has been moved to the project root dir (@karalekas, gh-1064). - Using
protoquil
as a positional argument toqc.compile
has been deprecated, and it is now a keyword-only argument (@karalekas, gh-1071). PauliSum
objects are now hashable (@ecpeterson, gh-1073).- The code in
device.py
as been reorganized into a newdevice
subdirectory in a completely backwards-compatible fashion (@karalekas, gh-1066, gh-1094). PauliTerm
andPauliSum
now have__repr__
methods (@karalekas, gh-1080).- The experiment-schema-related code in
operator_estimation.py
has been moved into a newexperiment
subdirectory (@karalekas, gh-1084, gh-1094). - The keyword arguments to
measure_observables
are now captured as part of theTomographyExperiment
class (@karalekas, gh-1090). - Type hints have been added to the
pyquil.gates
,pyquil.quilatom
, andpyquil.quilbase
modules (@appleby, gh-999). - We now support Python 3.8 and it is tested in the CI (@karalekas, gh-1093).
Bugfixes
- Updated
examples/meyer_penny_game.py
with the correct path to the Meyer Penny game exercise indocs/source/exercises.rst
(@appleby, gh-1045). - Fixed the Slack Workspace invite link in the README (@amyfbrown, gh-1042).
QPU.reset()
now checks whetherpyquil_config.qpu_url
exists before updating the endpoint so as not to break custom connections (@kylegulshen, gh-1072).- Fixed pretty printing of parameter expressions where π is involved (@notmgsk, gh-1076).
- Fixed a regression in
PyQVM.execute
that prevented it from running programs containing user-defined gates (@appleby, gh-1067). - Remove some stale code for pulling quilc version info (@notmgsk, gh-1089).
v2.12.0
Announcements
- There is now a Contributing Guide for those who would like to participate in the development of pyQuil. Check it out! In addition, pyQuil now has a Bug Report Template, and a Feature Request Template, which contain sections to fill out when filing a bug or suggesting an enhancement (@karalekas, gh-985, gh-986, gh-996).
Improvements and Changes
- The
local_qvm
context manager has been renamed tolocal_forest_runtime
, which now checks if the designated ports are used before startingqvm
/quilc
. The originallocal_qvm
has been deprecated (@sauercrowd, gh-976). - The test suite for pyQuil now runs against both Python 3.6 and 3.7 to ensure compatibility with the two most recent versions of Python (@karalekas, gh-987).
- Add support for the
FORKED
gate modifier (@kilimanjaro, gh-989). - Deleted the deprecated modules
parameters.py
andqpu.py
(@karalekas, gh-991). - The test suite for pyQuil now runs much faster, by setting the default value of the
--use-seed
option forpytest
toTrue
(@karalekas, gh-992). - Support non-gate instructions (e.g.
MEASURE
) into_latex()
(@notmgsk, gh-975). - Test suite has been updated to reduce the use of deprecated features (@kilimanjaro, gh-998, gh-1005).
- Certain tests have been marked as "slow", and are skipped unless the
--runslow
option is specified forpytest
(@kilimanjaro, gh-1001). PauliSum
objects can now be constructed from strings viafrom_compact_str()
andPauliTerm.from_compact_str()
supports multi-qubit strings (@jlbosse, gh-984).
Bugfixes
- Strength two symmetrization was not correctly producing orthogonal arrays due to erroneous truncation, which has been fixed (@kylegulshen, gh-990).
- The
STORE
instruction now acceptsint
orfloat
in addition toMemoryReference
as itssource
argument. As a result, you can nowSTORE
an immediate value into a memory register. Also, theEQ
,LT
,LE
,GT
, andGE
instructions now all acceptfloat
in addition toint
orMemoryReference
as their third and final argument. As a result, you can now perform classical comparisons against an immediatefloat
value. Finally, theCONVERT
instruction now accepts any valid memory reference designator (aMemoryReference
, a string, or a tuple of type(str, int)
) for both its arguments (@appleby, gh-1010). - Raise an error if a gate with non-constant parameters is provided to
lifted_gate
(@notmgsk, gh-1012).