Releases: rigetti/pyquil
v2.7.1
Bugfixes
- The changes to operator estimation (gh-870, gh-896) were not made in a backwards-compatible fashion, and therefore this patch release aims to remedy that. Going forward, there will be much more stringent requirements around backwards compatibility and deprecation (@karalekas, gh-899).
v2.7.0
Improvements and Changes
-
Standard deviation -> standard error in operator estimation (@msohaibalam, gh-870).
-
Update what pyQuil expects from quilc in terms of rewiring pragmas -- they are now comments rather than distinct instructions (@ecpeterson, gh-878).
-
Allow users to deprioritize QPU jobs -- mostly a Rigetti-internal feature (@jvalery2, gh-877).
-
Remove the
qubits
field from theTomographyExperiment
dataclass (@msohaibalam, gh-896).
Bugfixes
-
Ensure that shots aren't lost when passing a
Program
throughaddress_qubits
(@notmgsk, gh-895). -
Fixed the
conda
install command in the README (@seandiscovery, gh-890).
v2.6.0
Improvements and Changes
-
Added a CODEOWNERS file for default reviewers (@karalekas, gh-855).
-
Bifurcated the
QPUCompiler
endpoint parameter into two --quilc_endpoint
andqpu_compiler_endpoint
-- to reflect changes in Quantum Cloud Services (@karalekas, gh-856). -
Clarified documentation around the DELAY pragma (@willzeng, gh-862).
-
Added information about the
local_qvm
context manager to the getting started documentation (@willzeng, gh-851). -
Added strict version lower bounds on the rpcq and networkx dependencies (@notmgsk, gh-828).
-
A slice of a
Program
object now returns aProgram
object (@notmgsk, gh-848).
Bugfixes
-
Added a non-None default timeout to the
QVMCompiler
object and theget_benchmarker
function (@karalekas, gh-850, gh-854). -
Fixed the docstring for the
apply_clifford_to_pauli
function (@kylegulshen, gh-836). -
Allowed the
apply_clifford_to_pauli
function to now work with the Identity as input (@msohaibalam, gh-849). -
Updated a stale link to the Rigetti Forest Slack workspace (@karalekas, gh-860).
-
Fixed a notation typo in the documentation for noise (@willzeng, gh-861).
-
An
IndexError
is now raised when trying to access an out-of-bounds entry in aMemoryReference
(@notmgsk, gh-819). -
Added a check to ensure that
measure_observables
takes as many shots as requested (@marcusps, gh-846).
Special thanks to @willzeng for all the contributions this release!
v2.5.2
This is a bugfix release, repairing a bug in the serialization of ExperimentResults objects.
v2.5.1
This is a bugfix release that corrects some errors found in the operator expectation code.
v2.5.0
Improvements and Changes
- PyQuil's Gate objects now expose
.controlled(q)
and.dagger()
modifiers, which turn a gate respectively into its controlled variant, conditional on the qubitq
, or into its inverse. - The operator estimation suite's
measure_observables
method now exposes areadout_symmetrize
argument, which helps mitigate a machine's fidelity asymmetry between recognizing a qubit in the ground state versus the excited state. - The
MEASURE
instruction in pyQuil now has a mandatory second argument. Previously, the second argument could be omitted to induce "measurement for effect", without storing the readout result to a classical register, but users found this to be a common source of accidental error and a generally rude surprise. To ensure the user really intends to measure only for effect, we now require that they supply an explicitNone
as the second argument.
Bugfixes
- Some stale tests have been brought into the modern era.
v2.4.0
Announcements
- The Quil Compiler (
quilc
) and the Quantum Virtual Machine (qvm
), which are part of the Forest SDK, have been open sourced! In addition to downloading the binaries, you can now build these applications locally from source, or run them via the Docker imagesrigetti/quilc
andrigetti/qvm
. These Docker images are now used as theservices
in the GitLab CI build plan YAML (gh-792, gh-794, gh-795).
Improvements and Changes
-
The
WavefunctionSimulator
now supports the use of parametric Quil programs, via thememory_map
parameter for its various methods (gh-787). -
Operator estimation data structures introduced in v2.2 have changed. Previously,
ExperimentSettings
had two members:in_operator
andout_operator
. Theout_operator
is unchanged, butin_operator
has been renamed toin_state
and its data type is nowTensorProductState
instead ofPauliTerm
. It was always an abuse of notation to interpret pauli operators as defining initial states. Analogous to the Pauli helper functions sI, sX, sY, and sZ,TensorProductState
objects are constructed by multiplying together terms generated by the helper functions plusX, minusX, plusY, minusY, plusZ, and minusZ. This functionality enables process tomography and process DFE (gh-770). -
Operator estimation now offers a "greedy" method for grouping tomography-like experiments that share a natural tensor product basis (ntpb), as an alternative to the clique cover version (gh-754).
-
The
quilc
endpoint for rewriting Quil parameter arithmetic has been changed fromresolve_gate_parameter_arithmetic
torewrite_arithmetic
(gh-802). -
The difference between ProtoQuil and QPU-supported Quil is now better defined (gh-798).
Bugfixes
pyQuil 2.3
PyQuil 2.3 is the latest release of pyQuil, Rigetti's toolkit for constructing and running
quantum programs. A major new feature is the release of a new suite of simulators:
-
We're proud to introduce the first iteration of a Python-based quantum virtual machine (QVM) called PyQVM. This QVM is completely contained within pyQuil and does not need any external dependencies. Try using it with
get_qc("9q-square-pyqvm")
or explore thepyquil.pyqvm.PyQVM
object directly. Under-the-hood, there are three quantum simulator backends:ReferenceWavefunctionSimulator
uses standard matrix-vector multiplication to evolve a statevector. This includes a suite of tools inpyquil.unitary_tools
for dealing with unitary matrices.NumpyWavefunctionSimulator
uses numpy's tensordot functionality to efficiently evolve a statevector. For most simulations, performance is quite good.ReferenceDensitySimulator
uses matrix-matrix multiplication to evolve a density matrix.
-
Matrix representations of Quil standard gates are included in
pyquil.gate_matrices
(gh-552). -
The density simulator has extremely limited support for Kraus-operator based noise models. Let us know if you're interested in contributing more robust noise-model support.
-
This functionality should be considered experimental and may undergo minor API changes.
Important changes to note:
- Quil math functions (like COS, SIN, ...) used to be ambiguous with respect to case sensitivity. They are now case-sensitive and should be uppercase (gh-774).
- In the next release of pyQuil, communication with quilc will happen exclusively via the rpcq protocol.
LocalQVMCompiler
andLocalBenchmarkConnection
will be removed in favor of a unifiedQVMCompiler
andBenchmarkConnection
. This change should be transparent if you useget_qc
andget_benchmarker
, respectively. In anticipation of this change we recommend that you upgrade your version of quilc to 1.3, released Jan 30, 2019 (gh-730). - When using a paramaterized gate, the QPU control electronics only allowed multiplying parameters by powers of two. If you only ever multiply a parameter by the same constant, this isn't too much of a problem because you can fold the multiplicative constant into the definition of the parameter. However, if you are multiplying the same variable (e.g.
gamma
in QAOA) by different constants (e.g. weighted maxcut edge weights) it doesn't work. PyQuil will now transparently handle the latter case by expanding to a vector of parameters with the constants folded in, allowing you to multiply variables by whatever you want (gh-707).
As always, this release contains bug fixes and improvements:
- The CZ gate fidelity metric available in the Specs object now has its associated standard error, which is accessible from the method
Specs.fCZ_std_errs
(gh-751). - Operator estimation code now correctly handles identity terms with coefficients. Previously, it would always estimate these terms as 1.0 (gh-758).
- Operator estimation results include the total number of counts (shots) taken.
- Operator estimation JSON serialization uses utf-8. Please let us know if this causes problems (gh-769).
- The example quantum die program now can roll dice that are not powers of two (gh-749).
- The teleportation and Meyer penny game examples had a syntax error (gh-778, gh-772).
- When running on the QPU, you could get into trouble if the QPU name passed to
get_qc
did not match the lattice you booked. This is now validated (gh-771).
We extend thanks to community member estamm12 for their contribution to this release.
pyQuil 2.2
PyQuil 2.2 is the latest release of pyQuil, Rigetti's toolkit for constructing and running quantum programs. Bug fixes and improvements include:
pauli.is_zero
andpaulis.is_identity
would sometimes return erroneous answers (gh-710).- Parameter expressions involving addition and subtraction are now converted to Quil with spaces around the operators, e.g.
theta + 2
instead oftheta+2
. This disambiguates subtracting two parameters, e.g.alpha - beta
is not one variable namedalpha-beta
(gh-743). - T1 is accounted for in T2 noise models (gh-745).
- Documentation improvements (gh-723, gh-719, gh-720, gh-728, gh-732, gh-742).
- Support for PNG generation of circuit diagrams via LaTeX (gh-745).
- We've started transitioning to using Gitlab as our continuous integration provider for pyQuil (gh-741, gh-752).
This release includes a new module for facilitating the estimation of quantum observables/operators (gh-682). First-class support for estimating observables should make it easier to express near-term algorithms. This release includes:
- data structures for expressing tomography-like experiments and their results
- grouping of experiment settings that can be simultaneously estimated
- functionality to executing a tomography-like experiment on a quantum computer
Please look forward to more features and polish in future releases. Don't hesitate to submit feedback or suggestions as GitHub issues.
We extend thanks to community member petterwittek for their contribution to this release.
pyQuil 2.1
PyQuil 2.1 is an incremental release of pyQuil, Rigetti's toolkit for constructing and running quantum programs. Changes include:
- Major documentation improvements.
QuantumComputer.run()
accepts an optionalmemory_map
parameter to facilitate running parametric executables (gh-657).QuantumComputer.reset()
will reset the state of a QAM to recover from an error condition (gh-703).- Bug fixes (gh-674, gh-696).
- Quil parser improvements (gh-689, gh-685).
- Optional interleaver argument when generating RB sequences (gh-673).
- Our GitHub organization name has changed from
rigetticomputing
torigetti
(gh-713).