Skip to content

Releases: quantumlib/Cirq

v1.4.1

27 Jun 00:46
v1.4.1
Compare
Choose a tag to compare

Cirq v1.4.1 release

Patch release which updates cirq-rigetti to use pyquil v4 and fixes
documentation build problems due to conflicting requirements per #6500.

Patches included w/r to v1.4.0

9bf365e Improve replace_version tool and development wheels (#6626)
e228340 Make implicit Optional type hints in Quantum Engine PEP 484 compliant (#6640)
6f5b4b2 Update cirq-rigetti to use pyquil v4 (#6281)
d38f24a Update requirements.txt (#6633)
4112b59 CI - add Python 3.12 tests to ci-daily (#6605)
b0e5b1d Fix CI lint failure by pinning to protobuf-4 (#6650)
2975d10 Bump cirq version to 1.4.1

v1.4.0

30 May 04:28
v1.4.0
Compare
Choose a tag to compare

Cirq v1.4.0 release

Summary

Added support for Python 3.12 and increased minimum Python version to 3.10.

Removal of cirq-ft

The cirq-ft package introduced in 1.2.0 was deleted after its move to the
Qualtran repository at https://github.com/quantumlib/Qualtran.git.
Please use that repository for fault-tolerant resource estimation needs.

cirq-core

Added cirq.UniformSuperpositionGate for creating uniform superposition
from a subset of n-qubit basis states. Added transformer that implements
dynamical decoupling for idle moments in a circuit. Added cirq.UNIT_SWEEP
as an alias for the cirq.UnitSweep but with a constant-style name.
Exposed the Mølmer–Sørensen MSGate at the top level cirq namespace.

cirq-google

Removed functions create_calibration_program and create_batch_program.
Added tag class FSimViaModelTag to enable execution of the FSimGate
using polynomial model.

A Huge Thank You

Thank you to all our contributors for this release:

Bicheng Ying, Cheng Xing, Dax Fohl, Doug Strain, Eliott Rosenberg,
Greg Kahanamoku-Meyer, jbrixon, Josha91, kenya-sk, Lawal Olufowobi,
Matthew Harrigan, Matthew Neeley, Miguel Costa, Nour Yosri, Pavol Juhas,
Pragya Jain, Prakhar Bhatnagar, Renyi Chen, richrines1, Sam Burdick,
Seneca Meeks, Tanuj Khattar, William Courtney, Yury Shefer

What's Changed

ab86979 Flush deprecations before minor release (#6622)
a9776d0 Nicer string representation for InverseCompositeGate (#6262)
2cfdf1f Add convenience methods to create PhasedXZ gate from ZYZ decomposition (#6569)
1a8caa4 Proper text files end with a newline character (#6614)
778e9e9 Freshen-up cirq dependencies (#6616)
e4b6ab2 Fix spurious failure of the check/all script (#6611)
ee4d702 enable simulation of controlled gates in classical simulator (#6589)
528b2d2 Update list of pre-release notebooks (#6609)
e11d297 Fix nightly build of the staging cirq website (#6615)
f246c2b Add Quantum Engine Support for InternalGate (#6613)
aa04196 Create a generalized uniform superposition state gate (#6506)
df07e94 Release pins from all pytest-related packages (#6602)
bf67f29 CI - deflake Isolated pytest Ubuntu (#6603)
cf86dda Suppress superfluous warnings from numpy (#6599)
2a907bf Delete cirq_ft (#6596)
3160056 CI - deflake Isolated pytest Ubuntu (#6593)
ee2b78f Optimise QubitPermutationGate decomposition (#6588)
9ddb8c8 Add a note about conda env to dev doc (#6592)
f79f902 Implement dynamical decoupling. (#6515)
f6bfb7f NEP-29 - enforce minimum Python version 3.10 (#6591)
46eab2d Support Python 3.12 (#6516)
bfba965 Avoid DivisionByZero error when TensorNetwork simplifies to a scalar (#6586)
69e3de1 Optimize Clifford.pow by using binary exponentiation (#6581)
3080d93 Add a new gauge for SqrtCZ and support SqrtCZ† and fix and improve spin inversion gauge (#6571)
614c78a Set maxsize of request queue to Quantum Engine (#6576)
37e8df9 Escape & in SVG diagrams (#6579)
2474d47 Removed deprecated processor_ids (#6563)
5828147 Fix __len__ of empty Product sweep to match actual length (#6575)
3ff41a4 CI - downgrade to macos-13 which has the needed Python versions (#6578)
e1b03ef Update AQT Backend (#6441)
21986dd Add UNKNOWN status code to retryable Quantum Engine errors (#6565)
2eb6d63 Add Quantum Engine support for cirq.CZPowGate (#6562)
7b7c93d check/all - exit with error status if any of checks failed (#6561)
d16b12c Avoid state vector normalization if it worsens the round offs (#6556)
c18feed display tags by str instead of repr in circuit diagrams (#6530)
1bec6b5 Improve repr of _BaseAncillaQid classes with prefix (#6555)
436c937 Remove the --pre option from verify-published-package.sh (#6536)
857e202 Bugfix in comparison_key and nicer with_dimension of _BaseAncillaQid (#6554)
9ab6601 Loosen the scipy condition in requirements.txt (#6549)
7792dac Remove doc references to stale gitter channel (#6540)
b8f0663 Add FSimViaModel Gate into device.proto (#6548)
bc3f9ff CI - migrate to docker compose v2 (#6547)
f9f0d66 Introduce gauge compilation (#6526)
45c5fa3 Ensure the result of simulation is normalized (#6522)
acb7bf8 pin scipy to ~1.12.0 to temporarily fix ci (#6545)
f955650 Add Serialization and Deserialization Support of FSimViaModelTag. (#6539)
7b97ead Fix density matrix references in other simulators (#6537)
fc3cc70 Add FSimViaModelTag (#6527)
2e28ae1 Undo temporary version pin of mpmath (#6535)
5a479db Install cirq pre-release with stable dependencies (#6534)
e5ad426 Fix ci-daily workflow failures on Mac OS X (#6532)
46e4483 Initialize processor sampler with the default device config key (#6521)
edd8393 Merge serializable_forms and deserialized_forms (#6520)
edda3a5 Add UNIT_SWEEP as an alias for UnitSweep (#6518)
83382ae Add documentation to cirq.decompose protocol regarding specific target gateset (#6439)
632f8b3 Ignore Python code formatting in git blame (#6514)
527af77 Add newly serializable gates to supported grid device gates (#6499)
1a6c16a Format all files with black-24.3.0 (#6513)
42927b8 Fix capitalization of GitHub in docs (#6509)
a2425eb Update ClassicalSimulator to confirm to simulation abstraction (#6432)
7780c01 Preserve circuit tags in transformer_primitives.map_operations (#6505)
dadfdcb Added MSGate to top level (#6466)
0f4822b update parallel XEB notebook (#6494)
2700f95 Remove python3.9 from CI tests (#6495)
dc1065d Update T1 experiment (#6487)
bc76660 Add serialization support to more gates (#6479)
4513892 Update start notebook to use get_engine instead of get_qcs_objects_for_notebook (#6483)
6dbac6b Add new get_hardware_engine_and_authenticate_user (#6485)
d75d43f Add warning when converting global phase operator to OpenQASM 2.0 (#6476)
eef7c5c Enable test_docker_pre after pinning the mpmath transitive dependency (#6481)
78f05f4 Fix maximum version limit for mpmath (#6482)
e11132e Fix mpmath version to 1.3.0 due to incompatibility with sympy (#6477)
02d29a9 Support serialization of cirq-google.CouplerPulse gate (#6472)
598c84f Add a convenience method that runs both RB and XEB (#6471)
e76702f No longer support create_calibration_program and create_batch_program (#6442)
33eea01 Rework SerializableByKey handling to improve performance (#6469)
a4ec796 Address NumPy and NotImplemented deprecation warnings (#6465)
a8bd9a5 Change str of ResultDict to print out repeated measurements (#6468)
d432730 Bugfix in _strat_has_stabilizer_effect_from_decompose (#6467)
6a40da5 Enable testing of quimb-dependent notebook (#6461)
c2e37df CI - update GitHub actions to node20 (#6462)
adf5155 Combine RB and XEB to compute inferred errors (#6455)
c3de706 CI - update GitHub actions to node20 (#6450)
2cb7ffe Specify CODECOV_TOKEN for uploading coverage reports (#6459)
ef0137c Relax version requirement on duet (#6454)
f1aacd7 [Refactoring]: split devices.noise_utils into qis.noise_utils and devices.noise_utils (#6453)
ab9e10a Suppress matplotlib warnings on non-interactive use of show() (#6449)
34a8e59 Combine 2q parallel XEB into two methods, one for benchemarking and the other for visualization (#6443)
b9d2def Bump up to codecov/codecov-action@v4 compatible with node20 (#6448)
36e91b0 Fix ci-daily notebook failures on Mac OS X (#6444)
57c52fe CI - update GitHub actions to node20 (#6445)
f2c6f3c Add an optional CompilationTargetGateset postprocessor to contract the circuit (#6433)
5dd05bf Run product state functions inplace to avoid copies where possible (#6396)
e9e12ee remove partial CZs if allow_partial_czs=False (#6436)
9f07ce8 Fix font family for svg (#6423)
5ed8f16 update quimb version to fix CI (#6438)
2ef1909 Add readout plotting tools (#6425)
ee56c59 Rm build_rtd_docs CI job and its dependencies (#6417)
ba4c6aa convert identity to phased xz in qubit characterization (#6421)
91c3f45 convert cliffords to xz in qubit characterization (#6420)
a3eed6b convert SingleQubitCliffordGate to phasedXZ during serialization (#6419)
7da7f64 Add ParallelRandomizedBenchmarkingResult class (#6412)
9c451a2 Update sphinx version (#6415)
8ae5bbb Pin sphinx dependencies that require Sphinx 5.0 or later (#6414)
968ed4c Remove cached_property backport (#6398)
4d35768 switch from bash to template approach for creating pypi config file (#6409)
ea6fabc use token to upload to pypi (#6406)
c8f7ed7 fix small normalization bug (#6404)
aa57be5 Fix common typos (#6403)
9e86d36 optimize clifford benchmark circuit creation for a total 94.5% speedup (#6401)
b3e0eeb make SingleQubitCliffordGate immutable singletons and use it in qubit_characterizations for a 37% speedup (#6392)
8a7f675 Fix "Build docs" CI job by temporarily pinning alabaster to 0.7.13 (#6399)
d33b1a7 Don't create a new list of qubits in Gate.on (#6390)
7c9b713 Modify run_batch_async (#6387)
99993b9 Check identity first when comparing moments (#6388)
a2530fe Speed up construction of single qubit pauli operations - cirq.X(q) (#6316)
181d7aa Check value equality first when comparing circuits (#6375)
1961207 Add parallel randomized benchmarking (#6382)
2ce4ed1 Add exponential fitting to RandomizedBenchMarkResult (#6385)
321786d Easy changes to difficult terminology (#6340)
e3fbd98 Optimize qid comparisons (#6386)
2f3c1e2 Optimize cached_method when wrapping no-arg methods (#6381)
ec727ca Revert "Change default for streaming feature flag to false (#6310)" (#6380)
33c2573 Cache Qid instances for common types (#6371)
6d437c4 Update start doc to specify recommended python version (#6370)
be7b059 Short-circuit value equality with an identity check (#6372)
7578110 Use spawn in _compat_test.py to avoid fork problems (#6374)
30b6c39 Fix test_notebooks_against_cirq_head for MacOS platform (#6366)
6ea5ae1 Bump cirq version to 1.4.0 (#6369)

v1.3.0

01 Dec 22:10
Compare
Choose a tag to compare

Cirq v1.3.0 release

Summary

Deprecation of cirq-ft

The newly created cirq-ft package (from 1.2.0) will be moving to its new home in the qualtran repository. Please pull from that repository to get all your fault-tolerant resource estimation goodness.

Qubit management

Two new qubit managers (GreedyQubitManager and SimpleQubitManager) can help manage creation and allocation of temporarily or borrowed ancilla qubits.

Performance improvements

Many minor performance improvements have been made over the past 6 months to help speed up troublesome corner cases, such as json serialization, transformers, circuit creation, and symbol resolution.

A classical simulator for simulating circuits without superposition (such as Toffoli, CNOT, X, SWAP, etc) has been added.

A Huge Thank You

Thank you to all our contributors for this release:

Andreas Bengtsson, Bram Evert, Cheng Xing, Doug Strain, Dripto Debroy, eliottrosenberg, Emilio Peláez, Fionn Malone, Jon Donovan, Jose Urruticoechea, Matthew Neeley, Nishna Aerabati, Nafay Najam, Noureldin, Ogah Jackreece Ejini, Pavol Juhas, richrines1, Ryan Hill, Sam Burdick, Sanuj Sharma, Seneca Meeks, Shef, Spencer Churchill, Suyash Damle, Tanuj Khattar, yinghui-hu, Yisu Peng

What's Changed

9b65f68 Remote problematic terminology from test (#6368)
dbbca73 Change master to main in documentation (#6365)
ced1383 Restore code coverage (#6364)
3ac43f6 Switch master to main in CI tools and dev tools (#6363)
3c6a305 Deprecate Cirq-FT module in favour of Qualtran (#6362)
cf973a5 Remove leftover dummy terms from the Cirq sources (#6358)
9142f6a Fix MacOS installation instructions for mactex with brew (#6361)
6aa9d0d Cleanup classical simulator code and fix a couple of bugs (#6344)
a55f962 Fix typos in the documentation. (#6359)
a4ba95b Break intermediate measurements on 3+ qubits into single qubit measurements in RouteCQC#6293 (#6349)
7f47e13 Created using Colaboratory (#6360)
b5b3b74 ProcessorSampler: route run_batch to run_sweep (#6357)
2fdb447 Remove dummy from cirq-core (#6356)
3a64ef1 StreamManager: make function params explicit (#6355)
26dbabc Speed up hashing for GridQubit, LineQubit, and NamedQubit (#6350)
3c81961 Update docs/tutorials/google/start.pynb (#6346)
9a8298d Update start.ipynb (#6342)
8d07cab Optimize ParamResolver.value_of (#6341)
392083b StreamManager: retry with get result request on already exist errors (#6345)
0e288a7 Bump @babel/traverse from 7.14.5 to 7.23.2 in /cirq-web/cirq_ts (#6318)
2f702c8 Add classical simulator (#6124)
39bd926 Change default for streaming feature flag to false (#6310)
0b90ed6 Increase coverage of clifford protocols to parity_gates (#6338)
11ae0bd Make RouteCQC errorout on intermediate measurements on 3+ qubits (#6307)
aa312bc Fix flaky behavior of test_xeb_fidelity (#6337)
2f7d732 Cache Circuit properties between mutations (#6322)
5485227 Run unit tests without affecting user browser session (#6333)
fec68ae Fix ci-daily pytest failure (#6335)
34e8dab Extend Clifford protocol for 2+ qubit operations through analytical check and falling back to decompose (#6332)
17313e7 ci - show 20 slowest tests on Linux, Windows and Mac (#6334)
5556e72 ci - skip slow tests on PR, run them in daily ci instead (#6331)
1eced48 Moved rigetti integration test logic to higher level conftest.py file… (#6328)
1549785 remove default values of InternalGate (#6330)
235a0c6 Add documentation for cirq google's support for google internal gates (#6301)
455f50b Build clifford tableau just once during SingleQubitCliffordGate to PhasedXZGate conversion (#6325)
ec84a05 Preserve subcircuits passed to [Frozen]Circuit.from_moments (#6320)
96b3842 Move qubit management transformers from Cirq-FT to Cirq-core (#6319)
105d975 Adds 2q prep for iswap instead of sqrt_iswap (#6314)
a98fc61 Make ancilla for BiQubitsMixer sided too. (#6313)
9b65f68 Remote problematic terminology from test (#6368)
dbbca73 Change master to main in documentation (#6365)
ced1383 Restore code coverage (#6364)
3ac43f6 Switch master to main in CI tools and dev tools (#6363)
3c6a305 Deprecate Cirq-FT module in favour of Qualtran (#6362)
cf973a5 Remove leftover dummy terms from the Cirq sources (#6358)
9142f6a Fix MacOS installation instructions for mactex with brew (#6361)
6aa9d0d Cleanup classical simulator code and fix a couple of bugs (#6344)
a55f962 Fix typos in the documentation. (#6359)
a4ba95b Break intermediate measurements on 3+ qubits into single qubit measurements in RouteCQC#6293 (#6349)
7f47e13 Created using Colaboratory (#6360)
b5b3b74 ProcessorSampler: route run_batch to run_sweep (#6357)
2fdb447 Remove dummy from cirq-core (#6356)
3a64ef1 StreamManager: make function params explicit (#6355)
26dbabc Speed up hashing for GridQubit, LineQubit, and NamedQubit (#6350)
3c81961 Update docs/tutorials/google/start.pynb (#6346)
9a8298d Update start.ipynb (#6342)
8d07cab Optimize ParamResolver.value_of (#6341)
392083b StreamManager: retry with get result request on already exist errors (#6345)
0e288a7 Bump @babel/traverse from 7.14.5 to 7.23.2 in /cirq-web/cirq_ts (#6318)
2f702c8 Add classical simulator (#6124)
39bd926 Change default for streaming feature flag to false (#6310)
0b90ed6 Increase coverage of clifford protocols to parity_gates (#6338)
11ae0bd Make RouteCQC errorout on intermediate measurements on 3+ qubits (#6307)
aa312bc Fix flaky behavior of test_xeb_fidelity (#6337)
2f7d732 Cache Circuit properties between mutations (#6322)
5485227 Run unit tests without affecting user browser session (#6333)
fec68ae Fix ci-daily pytest failure (#6335)
34e8dab Extend Clifford protocol for 2+ qubit operations through analytical check and falling back to decompose (#6332)
17313e7 ci - show 20 slowest tests on Linux, Windows and Mac (#6334)
5556e72 ci - skip slow tests on PR, run them in daily ci instead (#6331)
1eced48 Moved rigetti integration test logic to higher level conftest.py file… (#6328)
1549785 remove default values of InternalGate (#6330)
235a0c6 Add documentation for cirq google's support for google internal gates (#6301)
455f50b Build clifford tableau just once during SingleQubitCliffordGate to PhasedXZGate conversion (#6325)
ec84a05 Preserve subcircuits passed to [Frozen]Circuit.from_moments (#6320)
96b3842 Move qubit management transformers from Cirq-FT to Cirq-core (#6319)
105d975 Adds 2q prep for iswap instead of sqrt_iswap (#6314)
a98fc61 Make ancilla for BiQubitsMixer sided too. (#6313)
fefe350 Make SingleQubitCompare output registers directional (#6312)
fee056e Move GreedyQubitManager from Cirq-FT to Cirq-Core (#6309)
87f77be Create separate unary and streaming RPC tests in engine_test.py (#6311)
4dc36d5 Integrate StreamManager with run_sweep() (#6285)
c6f60bc Apply fix from typo scan of quantumai website, cl/570431484 (#6308)
bef756e Allow specifying settings field from Cirq-ionq (#5817)
fd18da5 Make OpIdentifier serializable for all inputs (#6295)
1948e73 Change signature of cirq_ft.And gate to use directional registers like Qualtran (#6302)
c696323 Rename cirq_ft.Registers to cirq_ft.Signature to match data types in Qualtran (#6300)
61d9671 Fix stream_manager_test type warnings (#6299)
acbc624 Do not allow creating registers with bitsize 0 (#6298)
8e4e7d1 Add bitsize field to Cirq-FT Registers (#6286)
188bb94 Add registry sweep documentation to cirq_google (#6291)
907ec3a Try to make docstring render correctly (#6283)
d805d82 Make InternalGate hashable if all gate args are hashable (#6294)
1366494 Apply minor doc fixes (#6289)
b630298 Fix matplotlib typing (#6290)
f715527 Fix documentation of FSimGate (#6288)
432d57a Add serialization support for InsertionNoiseModel (#6282)
cf005c2 add to ionq code owners (#6273)
6c14cfa StreamManager: Add mechanism to close the request iterator (#6263)
deedb45 Changed FakeQuantumRunStream to support arbitrary response and exception timing (#6253)
6fae409 Delete SelectionRegisters and replace uses of Registers with Tuple[Register, ...] (#6278)
e235642 Variable spacing QROM should depend upon structure of different data sequences and not exact elements (#6280)
eddb2d9 Add caching to value_equality_values decorator for auto generated methods. (#6275)
0e80fa5 v0.3 API + debiasing (#6077)
b70b2fc Add new processor selector parameters in cirq-google/engine run methods (#6267)
b28bfce Speed up parameter resolution for cirq.Duration (#6270)
c7048f5 codecov - exclude protobuf-generated sources from coverage analysis (#6268)
041ce5d Add tags to cirq.FrozenCircuit (#6266)
83609eb Make device parameter units/idx optional (#6264)
8bd2161 Support the new quantum engine processor_selector in engine_client (#6254)
56b5db2 add back add/remove_qubit to density matrix sim state (#6259)
ed26d2f Fix ordering issue in random_rotations_between_grid_interaction_layers_circuit (#6261)
7ed95aa Speed up cirq.map_operations and cirq.map_operations_and_unroll (#6250)
be6218e codecov - tolerate small decrease in coverage (#6258)
5bbdc22 Apply variable-spaced optimization to QROM circuits (#6257)
6abc740 remove extra User-Agent prefix in the ionq API header (#6232)
999fd94 Avoid skipping code lines depending on random seed (#6256)
86f17eb Update documentation to prevent markdown rendering of underscores as italics (#6255)
6e38a27 Fix coverage exclusion syntax (#6241)
6b44704 Check if python starts python3 (#6239)
95cb43f Remove temporary directories after test done (#6236)
30fa6f5 Fix bug in cirq-ft due to which T-complexity fails for gates with an empty decomposition / no-op (#6252)
95c672a Support the deprecated_parameter decorator for asynchronous functions. (#6247)
64e1a7f Fix CI requirements for Changed files test (#6243)
9fbaa05 Fix quoting i...

Read more

v1.2.0

18 Jul 17:50
Compare
Choose a tag to compare

Cirq v1.2.0 release

Summary

This Cirq release focuses on making it easier to express and do resource estimations for Fault Tolerant Quantum Algorithms, with a number of high level improvement summarized as follows:

Improvements to Cirq-Core

  • Cirq protocols (eg: cirq.unitary) and simulators (eg: cirq.Simulator) now support gates that allocate new qubits as part of their decomposition
  • cirq.QubitManager is a new top-level abstraction that defines the interface for a qubit allocator/deallocator which can be used to manage ancilla qubits at the time of circuit construction.
  • cirq.decompose infrastructure is updated s.t. new composite gates can override the _decompose_with_context_ method to gain access to a cirq.DecompositionContext that contains options such as a cirq.QubitManager to help with allocating ancilla qubits at the time of circuit construction.

Cirq-FT: A new sub-package for Fault-Tolerant algorithms

Cirq-FT is a new sub-package for rapid prototyping and resource estimation of fault tolerant algorithms that extends Cirq. Some notable features include

  • A concept of qubit Register / Registers that make it easier for composite gates to express their signature in terms of named groups of logical qubits.
  • A cirq_ft.GateWithRegisters base class, which acts as a SHIM on top of the flat qubits API of cirq.Gate class and helps users define their composite gates using qubit registers.
  • New protocols, like cirq_ft.TComplexity, for macroscopic resource estimation.
  • New compilation transformers for mapping ancilla allocation / deallocation requests in a compute graph (eg: cirq circuit) to physical qubits, supporting both clean and dirty allocations.
  • A well-annotated and well-tested library of hierarchical gate decompositions which implements all the circuit primitives from Encoding Electronic Spectra in Quantum Circuits with Linear T Complexity. Table IV containing resource estimates of circuits with ~10^10 T-gates can be reproduced in under a minute demonstrating the scalability of the framework.

Other notable changes

  • Dropped support for Python 3.7 and Python 3.8 and added support for Python 3.11
  • Performance improvements for parameter resolution and a new __cirq_debug__ flag that provides an option to disable validations at the time of circuit construction.

What's Changed

Read more

Cirq v1.1.0

20 Dec 23:28
Compare
Choose a tag to compare

Cirq v1.1.0 release

Summary

This Cirq release focuses on tracking and improving performance of key workflows like circuit construction, parameter resolution etc. The release also adds a new transformers framework for qubit routing and provides an efficient implementation of the qubit routing algorithm described in arXiv:1902.08091 [quant-ph]

As part of this release, we have also published our new backwards compatibility guidelines.

Backwards Incompatible Changes

7892143 Print multi-qubit circuit with asymmetric depolarizing noise correctly (#5931) by Paige
af1267d Allow repeated measurements in deferred transformer (#5857) by Dax Fohl

What's New

New top level objects in cirq-core:

  • RoutingSwapTag
  • AbstractInitialMapper
  • HardCodedInitialMapper
  • LineInitialMapper
  • MappingManager
  • RouteCQC
  • routed_circuit_with_mapping

What's Changed

Read more

Cirq v1.0.0

18 Jul 22:34
Compare
Choose a tag to compare

What's new

Cirq has officially left alpha and is v1.0. With this release comes new policies on API stability as well as functionality gaurantees for the long term. Along with some minor bug fixes and tweaks, this release focuses on stabilizing the APIs within cirq-core. With cirq-core we intend to follow along with semver and only make breaking changes with moves to new major versions. For the vendor packages we plan to continue to allow developers to iterate at speed and will do best effort on ensuring any API changes come with as little friction as possible. For all the details on this policy please see: release.md.

To make this upgrade as smooth as possible, we recommend first upgrading your installation to Cirq v0.15 to surface any deprecation warnings or upcoming breakages you might experience, once those are resolved, you can safely install Cirq v1.0.0.

Thank you all so much for your hard work.

What's Changed

Read more

Cirq v0.15.0

29 Jun 18:07
f904a09
Compare
Choose a tag to compare

Cirq v0.15.0 release

Summary

This Cirq release focuses on fine tuning user APIs and library organization, with no new major feature additions. This release features lots of deprecations and long standing bug fixes in anticipation of the upcoming Cirq 1.0 release as well as a few refactors. This release fixes over 150 oustanding issues in Cirq and stabilizes many of the rough edges in the library. In upgrading to 1.0 it is recommended to first upgrade to this version to receive deprecation warnings for any changed functionality before moving to Cirq 1.0

Breaking changes

f904a09 Roll back the default on unitary to np.complex64, change default for final_state_vector #5636
4594a1f Add qubits to PauliStringPhasor #5565
61fefe6 Lock down CircuitOperation and ParamResolver #5548
b1a5d23 Deprecate PauliTransform #5498
3c8b036 Use np.complexfloating for dtypes that should be complex #5488
39795e1 Move CircuitDag to contrib #5481
2bff437 Measurement confusion maps #5480
9bead0b Remove special CXPowGate.on. #5471
9f37af1 Pass through None during param resolution #5466
95bebae Reject formulas as keys of ParamResolvers #5384
2d84676 Change qubit str representation #5343

Changes to top level objects

cirq-core

New top level objects

  • is_valid_placement
  • ArithmeticGate
  • ISWAP_INV
  • ms
  • q
  • create_transformer_with_kwargs
  • drop_terminal_measurements
  • two_qubit_matrix_to_ion_operations
  • QuantumStateRepresentation
  • CliffordTableauSimulationState
  • DensityMatrixSimulationState
  • SimulationProductState
  • SimulationState
  • SimulationStateBase
  • StabilizerChFormSimulationState
  • StabilizerSimulationState
  • StabilizerStateChForm
  • StateVectorSimulationState
  • ParamMappingType
  • TParamValComplex

Objects or parameters that are marked as deprecated and will be removed in coming releases (too long to list all individual deprecations)

  • Using cirq.ops.Moment has been deprecated in favor of cirq.circuits.Moment. Recommended use is still cirq.Moment.
  • cirq.QuilOutput has moved to cirq_rigetti.quil_output.QuilOutput and will be removed in a future version.
  • Circuit.tetris_concat is moving to Circuit.concat_ragged.
  • Circuit.final_state_vector will no longer support positional arguments and will no longer support qubits_that_should_be_present, instead identity operations should be placed on existing qubits that one wants included in the state vector.
  • SimulationTrialResult.final_step_result along with class mutators will be deprecated in favor of constructing new SimulationTrialResult objects instead.
  • SparseSimulatorStep will no longer use the simulator argument.
  • OperationTarget will be replaced with cirq.SimulationStateBase.
  • SimulationState and children classes (i.e. StabilizerSimulationState) will no longer support positional args and log_of_measurement_results (replaced by classical_data arg).
  • DensityMatrixStepResult will no longer support simulator parameter.
  • StepResult has had mutators deprecated in favor of constructing new objects.
  • SimulationProductState changed argument names to sim_state.
  • StateVectorSimulatorState no longer used.
  • ActOnArgs (and variants) have been replaced by <variant>SimulationState.
  • StateVectorSimulationState swap_target_tensor_for and subspace_index methods will be made private.
  • SimulatorBase mutators are deprecated in favor of constructing a new class instance.
  • cirq.neutral_atom module will be going away. Optimizing for neutral atom gates can be done with the new cirq.optimize_for_target_gateset with a neutral atom gateset. Devices have moved out to respective vendors.
  • cirq.ion module will be going away. Like neutral atom optimizers and devices were moved out to vendors where appropriate.
  • least_squares_xeb_fidelity_from_expectations and least_squares_xeb_fidelity_from_probabilities deprecated in favor of cirq.experiments.xeb_fitting.
  • generate_boixo_2018_supremacy_circuits_v2, generate_boixo_2018_supremacy_circuits_v2_grid and generate_boixo_2018_supremacy_circuits_v2_bristlecone has moved to recirq.beyond_classical module.
  • CrossEntropyResult, cirq.experiments.xeb_fitting.XEBCharacterizationResult deprecated in favor of cirq.experiments.xeb_fitting.XEBCharacterizationResult.
  • build_entangling_layers deprecated in favor of cirq.experiments.random_quantum_circuit_generation.
  • collect_grid_parallel_two_qubit_xeb_data moved to recirq.benchmarks.xeb.collect_grid_parallel_two_qubit_xeb_data.
  • compute_grid_parallel_two_qubit_xeb_results moved to recirq.benchmarks.xeb.compute_grid_parallel_two_qubit_xeb_results.
  • measurement_key_names protcol will use frozensets.
  • act_on protocol will change argument arg name to sim_state.
  • PauliTransform replaced in favor of DensePauliString.
  • GlobalPhaseOperation use global_phase_operation instead.
  • ArithmeticOperation going away in favor of just ArithmeticGate.
  • Gatesets no longer have accept_global_phase_op argument, instead a user must provide the cirq.GlobalPhaseGate.
  • NoiseModelFromNoiseProperties virtual_predicate renamed to is_virtual.
  • QuirkArithmeticOperation deprecated in favor of cirq.QuirkArithmeticGate.

cirq-google

New top level objects

  • prepare_characterization_for_circuits_moments
  • GoogleNoiseProperties
  • GridDevice
  • NoiseModelFromGoogleNoiseProperties
  • EngineResult
  • ProcessorSampler
  • noise_properties_from_calibration
  • HardcodedQubitPlacer

Objects or parameters that are marked as deprecated and will be removed in coming releases

  • 'XMON','FSIM_GATESET','SQRT_ISWAP_GATESET','SYC_GATESET','NAMED_GATESETS' moved to GridDevice.metadata.gateset` if applicable.
  • GateTabulation has moved to cirq-core.
  • SimulatedLocalProcessor.get_device and EngineProcessor.get_device no longer requires a gate_sets parameter.
  • EngineProcessor.list_calibrations parameter names changed from latest_timestamp_seconds to latest_timestamp and earliest_timestamp_seconds to earliest_timestamp.
  • QuantumEngineSampler deprecated in favor of cirq_google.ProcessorSampler.
  • get_engine_sampler now has no arguments needed.
  • create_noiseless_virtual_processor_from_proto, create_noiseless_virtual_engine_from_proto, create_noiseless_virtual_processor_from_template, create_noiseless_virtual_engine_from_templates now no longer require gate_sets parameter.
  • Engine.sampler replaced with Engine.get_sampler.
  • get_engine_device now no longer requires gate_sets parameter.
  • SerializableDevice and SerializableGateset are going away in favor of CircuitSerializer and GridDevice metadata information.
  • optimize_for_{xmon,sycamore} are going away in favor of cirq.optimize_for_target_gateset using the xmon and sycamore gatesets.

What's Changed

Read more

Cirq v0.14.1

11 Apr 02:09
Compare
Choose a tag to compare

Patch release to fix vendor issue #5210.

No other changes introduced.

Cirq v0.14.0

24 Mar 08:30
Compare
Choose a tag to compare

Cirq v0.14.0 release

Highlights

Transformers

Revamped and deprecated many of the old and buggy optimizers found in cirq.optimizers with new cirq.transformer implementations. New transformers have well defined functionality with CircuitOperations and should be easier to use overall.

Classical Control

Cirq now has support for classical control in NiSQ relevant regimes. Classically controlled operations and measurement feedforward operations are supported. Extension into arbitrary classical logic on top of this is not on the immediate roadmap.

Devices

Devices have undergone a rework. Functionality to: attach a device to a circuit, use a device as a means to decompose a circuit, and exploration related functions have been removed. Devices now validate circuits and carry a DeviceMetaData property if more description of the device is needed.

Misc

In addition to the larger changes mentioned above, this release also includes new experiment utilities for characterizing device readout errors with cirq.measure_confusion_matrix. The cirq.decompose function contract has now been tightened to return a circuit containing just X,Y,Z,C*Z gates (assuming a decomposition is possible). Repeated measurement keys will now store temporal measurements (where previously they would be disallowed). New simulation techniques based on (https://arxiv.org/abs/2112.08499) and more.

Breaking changes

c20c99b Add cirq.eject_phased_paulis transformer to replace cirq.EjectPhasedPaulis (#4958)
bfa2602 Make PauliMeasurementGate respect sign of the pauli observable. (#4836)
89f88b0 Remove use of .device in contrib. (#4821)
b0519b3 Convert cirq.Result to ABC and add ResultDict implementation (#4806)
6937e41 Add ClassicalDataStore class to keep track of qubits measured (#4781)
1d8d2f3 Implement PauliStringPhasorGate (#4696)
4985a51 Remove EngineTimeSlot (#4608)

Changes to top level objects

cirq-core

New top level objects

  • DeviceMetadata
  • GridDeviceMetadata
  • NoiseModelFromNoiseProperties
  • NoiseProperties
  • OpIdentifier
  • SuperconductingQubitsNoiseProperties
  • TensoredConfusionMatrices
  • measure_confusion_matrix
  • density_matrix_kronecker_product
  • state_vector_kronecker_product
  • BooleanHamiltonianGate
  • ClassicallyControlledOperation
  • CliffordGate
  • GlobalPhaseGate
  • global_phase_operation
  • PauliStringPhasorGate
  • SynchronizeTerminalMeasurements

New or renamed top level objects from cirq.transformers

  • align_left
  • align_right
  • CompilationTargetGateset
  • CZTargetGateset
  • compute_cphase_exponents_for_fsim_decomposition
  • decompose_clifford_tableau_to_operations
  • decompose_cphase_into_two_fsim
  • decompose_multi_controlled_x
  • decompose_multi_controlled_rotation
  • decompose_two_qubit_interaction_into_four_fsim_gates
  • defer_measurements
  • dephase_measurements
  • drop_empty_moments
  • drop_negligible_operations
  • eject_phased_paulis
  • eject_z
  • expand_composite
  • is_negligible_turn
  • map_moments
  • map_operations
  • map_operations_and_unroll
  • merge_k_qubit_unitaries
  • merge_k_qubit_unitaries_to_circuit_op
  • merge_moments
  • merge_operations
  • merge_operations_to_circuit_op
  • merge_single_qubit_gates_to_phased_x_and_z
  • merge_single_qubit_gates_to_phxz
  • merge_single_qubit_moments_to_phxz
  • optimize_for_target_gateset
  • parameterized_2q_op_to_sqrt_iswap_operations
  • prepare_two_qubit_state_using_cz
  • prepare_two_qubit_state_using_sqrt_iswap
  • SqrtIswapTargetGateset
  • TRANSFORMER
  • TransformerContext
  • TransformerLogger
  • three_qubit_matrix_to_operations
  • transformer
  • two_qubit_matrix_to_cz_operations
  • two_qubit_matrix_to_diagonal_and_cz_operations
  • two_qubit_matrix_to_operations
  • two_qubit_gate_product_tabulation
  • TwoQubitCompilationTargetGateset
  • TwoQubitGateTabulation
  • TwoQubitGateTabulationResult
  • toggle_tags
  • unroll_circuit_op
  • unroll_circuit_op_greedy_earliest
  • unroll_circuit_op_greedy_frontier
  • StabilizerState
  • ActOnStabilizerArgs
  • SimulationTrialResultBase
  • ResultDict
  • ClassicalDataDictionaryStore
  • ClassicalDataStore
  • ClassicalDataStoreReader
  • Condition
  • KeyCondition
  • MeasurementType
  • SympyCondition
  • cirq_type_from_json
  • control_keys
  • HasJSONNamespace
  • json_cirq_type
  • json_namespace
  • LabelEntity
  • measurement_keys_touched
  • SupportsControlKey
  • with_key_path_prefix
  • with_rescoped_keys

Pre-existing optimizers with the same names as the given transformers have also been deprecated in favor of these newer implementations.

Objects or parameters that are marked as deprecated and will be removed in coming releases (too long to list all individual deprecations)

  • Attaching devices to circuits via Circuit(...) or circuit.with_device.
  • device.{qubit_set, decompose_operation, qid_pairs, can_add_operation_into_moment}
  • SymmetricalQidPair
  • The above changes impact all vendor packages as well as contrib.
  • All old optimizer implementations have been replaced/updated with new transformer implementations.
  • ActOnDensityMatrixArgs (multiple parameters)
  • ActOnStateVectorArgs (multiple parameters)
  • ActOnStabilizerCHFormArgs (multiple parameters)

cirq-google

New top level objects

  • ValidatingSampler
  • FSimGateFamily
  • known_2q_op_to_sycamore_operations
  • two_qubit_matrix_to_sycamore_operations
  • SycamoreTargetGateset
  • CIRCUIT_SERIALIZER
  • ExecutableGroupResultFilesystemRecord
  • execute
  • QubitPlacer
  • CouldNotPlaceError
  • NaiveQubitPlacer
  • RandomDevicePlacer
  • ProcessorRecord
  • EngineProcessorRecord
  • SimulatedProcessorRecord
  • SimulatedProcessorWithLocalDeviceRecord

Objects or parameters that are marked as deprecated and will be removed in coming releases

  • Bristlecone
  • Foxtail
  • XmonDevice
  • EngineProcessor.list_calibrations (latest_timestamp_seconds -> latest_timestamp)
  • EngineProcessor.list_calibrations (earliest_timestamp_seconds ->earliest_timestamp)
  • Engine.sampler (use get_sampler instead)
  • optimized_for_sycamore (new_device is going away)
  • optimized_for_xmon (new_device is going away)
  • ConvertToSycamoreGates (use cirq.optimize_for_target_gateset instead)
  • ConvertToSqrtIswapGates (use cirq.optimize_for_target_gateset instead)
  • TwoQubitGateCompilation (moved to cirq.TwoQubitGateTabulationResult)
  • GateTabulation (moved to cirq.TwoQubitGateTabulation)
  • gate_product_tabulation (moved to cirq.two_qubit_gate_product_tabulation)
  • SerializableDevice.qubit_set (use device.metadata property where applicable)
  • deserialize (removed support for device attachment to circuit)

A Huge Thank You

Thank you to all our contributors for this release:

Abraham Asfaw, Adam Zalcman, Aleksandr Pak, Alex McNamara, Animesh Sinha, Anna Nachesa, Antoine (Tony) Bruguier, augustehirth, Bicheng Ying, Cheng Xing, Dave Bacon, Dax Fohl, dependabot[bot], Doug Strain, Evan Peters, Freyam Mehta, Hosseinberg, Ilja Livenson, Jintao YU, Jon Donovan, Matthew Harrigan, Matthew Neeley, Michael A. Perlin, Michael Broughton, Nathanael Thompson, Orion Martin, Pavol Juhas, Tanuj Khattar, Victory Omole, Zachary Crockett

Full change list

33580bb Rename TestDevice -> FakeDevice to avoid pytest confusion (#5066)
45624ff Add support for deep=True flag in cg.optimized_for_sycamore and cg.SycamoreTargetGateset transformers (#5126)
cdd3f8c DeviceSpecification proto updates (#5056)
091582e Bugfix in handling of deep=True flag in cirq.merge_k_qubit_unitaries transformer (#5125)
89e7210 Add support for deep=True to cirq.optimize_for_target_gateset transformer (#5124)
518d828 Add support for deep=True to merge_single_qubit_gates* transformers (#5123)
92d19f6 Add support for deep=True to cirq.merge_k_qubit_unitaries transformer (#5122)
64a6723 Add support for deep=True to cirq.eject_z transformer (#5115)
04d58c4 Add support for deep=True to cirq.align_left and cirq.align_right transformers (#5112)
ca4bb72 Add support for deep=True to cirq.eject_phased_paulis transformer (#5116)
d2f284d Add support for deep=True to cirq.expand_composite transformer (#5119)
b45e63d Add support for deep=True to cirq.synchronize_terminal_measurements transformer (#5118)
155f607 Add support for deep=True to cirq.stratified_circuit transformer (#5117)
869d83b Add support for deep=True to cirq.drop_negligible_operations transformer (#5114)
fade070 Add support for deep=True to cirq.drop_empty_moments transformer (#5113)
cfa255a Add add_deep_support flag to @cirq.transformer decorator (#5108)
aed4eb8 Bugfixes in handling nested tags_to_ignore + deep=True in cirq.map_moments and cirq.map_operations transformer primitives (#5109)
e0a64dd Extract BufferedDM/SV/MPS from ActOnDM/SV/MPSArgs (#4979)
d3c4853 Add assert_decompose_ends_at_default_gateset to consistent protocols test to ensure all cirq gates decompose to default gateset (#5107)
6af5387 Add support for deep=True flag to remaining transformer primitives (#5106)
2693951 Improve support for recursively applying transformer primitives on circuit operations using deep=True (#5103)
caadb0c Deprectate log_of_measurement_result input (#5100)
848bfde Add default decomposition for cirq.QubitPermutationGate in terms of adjacent swaps (#5093)
e0f7432 Deprecate `cir...

Read more

Cirq v0.13.1

26 Oct 18:07
Compare
Choose a tag to compare

This release removes the measurement_key and measurement_keys protocols. These protocols were supposed to be removed in Cirq 0.13.0, but were missed.

Complete list of changes:

7d74e3c Flush missed v0.13 backlog items. (#4600)