Skip to content

Releases: rigetti/pyquil

v2.21.0

14 Jul 21:09
Compare
Choose a tag to compare
Bump version 2.21.0

v2.20.0

05 Jun 21:41
089f18e
Compare
Choose a tag to compare

Announcements

Improvements and Changes

  • Added a PyQuil only rewrite_arithmetic handler, deprecating the previous
    RPC call to quilc in native_quil_to_executable (@kilimanjaro, gh-1210).

Bugfixes

v2.19.0

26 Mar 19:35
e5443bc
Compare
Choose a tag to compare

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 Experiments 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 in pyquil/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

02 Mar 22:52
Compare
Choose a tag to compare

v2.18 (March 3, 2020)

Announcements

Improvements and Changes

Bugfixes

v2.17.0

30 Jan 16:57
Compare
Choose a tag to compare

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

Bugfixes

  • Replace references to non-existent endpoint init arg when constructing QPUCompilers in test_qpu.py (@appleby, gh-1164).
  • Preserve program metadata when constructing and manipulating Experiment objects (@kilimanjaro, gh-1160).

v2.16.0

10 Jan 22:11
Compare
Choose a tag to compare

Announcements

  • The TomographyExperiment class has been renamed to Experiment. In addition, there is a new QuantumComputer.calibration method for performing readout calibration on a provided Experiment, and utilities for applying the results of the calibration to correct for symmetrized readout error. ExperimentSetting objects now also have an additional_expectations attribute for extracting simultaneously measurable expectation values from a single setting when using QuantumComputer.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) and formatcheck (black --check) CI jobs (@karalekas, gh-1132).
  • Ignore fewer flake8 style rules, add the flake8-bugbear plugin, and rename the style-related Makefile targets and CI jobs so that they have a uniform naming convention: check-all, check-format, check-style, and check-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 the check-types CI job (@karalekas, gh-1142).
  • Add helper to merge TomographyExperiments in the experiment module's _group.py file. Move group_experiments from operator_estimation.py to _group.py and rename to group_settings but maintain backwards compatibility (@kylegulshen, gh-1077).
  • The code in gate_matrices.py, numpy_simulator.py, reference_simulator.py, and unitary_tools.py has been typed and reorganized into a new simulation 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, and SyncConnection, 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 the check-types CI job (@karalekas, gh-1146).
  • Use dataclasses instead of namedtuples in the pyquil/device module, and add type annotations to the entire module (@karalekas, gh-1149).
  • Reduced the number of mypy errors in paulis.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 a Sequence 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 a FutureWarning, and add a protoquil keyword argument to MyLazyCompiler.quil_to_native_quil to avoid a TypeError in the migration2-qc.ipynb notebook (@appleby, gh-1138).
  • Removed unused method Program._out() in quil.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

20 Dec 22:29
a762ca4
Compare
Choose a tag to compare

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 new ForestSession 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 with RESET omitted (@kilimanjaro, gh-1118)
  • Broadened the scope of flake8 compliance to the include the examples and docs 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 to LOG_LEVEL=DEBUG to help diagnose problems. In addition, certain errors will no longer print their entire stack trace outside of DEBUG 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 the make typecheck CI job to fail (@erichulburd, gh-1119).
  • Minor fixes for examples/1.3_vqe_demo.py and examples/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

26 Nov 03:49
Compare
Choose a tag to compare

Announcements

  • There is a new QuantumComputer.experiment method for running a collection of quantum programs as defined by a TomographyExperiment. 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, the TomographyExperiment 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 files entrypoint.sh (@karalekas, gh-1105).
  • Added a make typecheck target to run mypy over a subset of the pyquil sources, and enabled typechecks in the GitLab CI pipeline (@appleby, gh-1098).
  • Added support for the XY (parameterized iSWAP) gate family in Programs and in ISAs (@ecpeterson, gh-1096, gh-1107, gh-1111).
  • Removed the tox.ini and readthedocs.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

07 Nov 17:52
Compare
Choose a tag to compare

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 an ipython 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 a Program as a circuit diagram, and pyquil.latex.display renders a Program as an IPython.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 within QuantumComputer.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__ and six 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 to qc.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 new device subdirectory in a completely backwards-compatible fashion (@karalekas, gh-1066, gh-1094).
  • PauliTerm and PauliSum now have __repr__ methods (@karalekas, gh-1080).
  • The experiment-schema-related code in operator_estimation.py has been moved into a new experiment subdirectory (@karalekas, gh-1084, gh-1094).
  • The keyword arguments to measure_observables are now captured as part of the TomographyExperiment class (@karalekas, gh-1090).
  • Type hints have been added to the pyquil.gates, pyquil.quilatom, and pyquil.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 in docs/source/exercises.rst (@appleby, gh-1045).
  • Fixed the Slack Workspace invite link in the README (@amyfbrown, gh-1042).
  • QPU.reset() now checks whether pyquil_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

28 Sep 22:18
Compare
Choose a tag to compare

Announcements

Improvements and Changes

  • The local_qvm context manager has been renamed to local_forest_runtime, which now checks if the designated ports are used before starting qvm/quilc. The original local_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 and qpu.py (@karalekas, gh-991).
  • The test suite for pyQuil now runs much faster, by setting the default value of the --use-seed option for pytest to True (@karalekas, gh-992).
  • Support non-gate instructions (e.g. MEASURE) in to_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 for pytest (@kilimanjaro, gh-1001).
  • PauliSum objects can now be constructed from strings via from_compact_str() and PauliTerm.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 accepts int or float in addition to MemoryReference as its source argument. As a result, you can now STORE an immediate value into a memory register. Also, the EQ, LT, LE, GT, and GE instructions now all accept float in addition to int or MemoryReference as their third and final argument. As a result, you can now perform classical comparisons against an immediate float value. Finally, the CONVERT instruction now accepts any valid memory reference designator (a MemoryReference, 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).