Cirq Versions Save

A python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.

v1.3.0

5 months ago

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

9b65f686 Remote problematic terminology from test (#6368) dbbca739 Change master to main in documentation (#6365) ced13835 Restore code coverage (#6364) 3ac43f64 Switch master to main in CI tools and dev tools (#6363) 3c6a305b Deprecate Cirq-FT module in favour of Qualtran (#6362) cf973a53 Remove leftover dummy terms from the Cirq sources (#6358) 9142f6a8 Fix MacOS installation instructions for mactex with brew (#6361) 6aa9d0de Cleanup classical simulator code and fix a couple of bugs (#6344) a55f9626 Fix typos in the documentation. (#6359) a4ba95b6 Break intermediate measurements on 3+ qubits into single qubit measurements in RouteCQC#6293 (#6349) 7f47e133 Created using Colaboratory (#6360) b5b3b748 ProcessorSampler: route run_batch to run_sweep (#6357) 2fdb447d Remove dummy from cirq-core (#6356) 3a64ef15 StreamManager: make function params explicit (#6355) 26dbabc6 Speed up hashing for GridQubit, LineQubit, and NamedQubit (#6350) 3c819619 Update docs/tutorials/google/start.pynb (#6346) 9a8298da Update start.ipynb (#6342) 8d07cabc Optimize ParamResolver.value_of (#6341) 392083b9 StreamManager: retry with get result request on already exist errors (#6345) 0e288a75 Bump @babel/traverse from 7.14.5 to 7.23.2 in /cirq-web/cirq_ts (#6318) 2f702c88 Add classical simulator (#6124) 39bd9269 Change default for streaming feature flag to false (#6310) 0b90ed6f Increase coverage of clifford protocols to parity_gates (#6338) 11ae0bd3 Make RouteCQC errorout on intermediate measurements on 3+ qubits (#6307) aa312bcd Fix flaky behavior of test_xeb_fidelity (#6337) 2f7d7325 Cache Circuit properties between mutations (#6322) 54852270 Run unit tests without affecting user browser session (#6333) fec68ae6 Fix ci-daily pytest failure (#6335) 34e8dab0 Extend Clifford protocol for 2+ qubit operations through analytical check and falling back to decompose (#6332) 17313e71 ci - show 20 slowest tests on Linux, Windows and Mac (#6334) 5556e729 ci - skip slow tests on PR, run them in daily ci instead (#6331) 1eced48d Moved rigetti integration test logic to higher level conftest.py file… (#6328) 15497859 remove default values of InternalGate (#6330) 235a0c6e Add documentation for cirq google's support for google internal gates (#6301) 455f50be Build clifford tableau just once during SingleQubitCliffordGate to PhasedXZGate conversion (#6325) ec84a057 Preserve subcircuits passed to [Frozen]Circuit.from_moments (#6320) 96b38428 Move qubit management transformers from Cirq-FT to Cirq-core (#6319) 105d975a Adds 2q prep for iswap instead of sqrt_iswap (#6314) a98fc616 Make ancilla for BiQubitsMixer sided too. (#6313) 9b65f686 Remote problematic terminology from test (#6368) dbbca739 Change master to main in documentation (#6365) ced13835 Restore code coverage (#6364) 3ac43f64 Switch master to main in CI tools and dev tools (#6363) 3c6a305b Deprecate Cirq-FT module in favour of Qualtran (#6362) cf973a53 Remove leftover dummy terms from the Cirq sources (#6358) 9142f6a8 Fix MacOS installation instructions for mactex with brew (#6361) 6aa9d0de Cleanup classical simulator code and fix a couple of bugs (#6344) a55f9626 Fix typos in the documentation. (#6359) a4ba95b6 Break intermediate measurements on 3+ qubits into single qubit measurements in RouteCQC#6293 (#6349) 7f47e133 Created using Colaboratory (#6360) b5b3b748 ProcessorSampler: route run_batch to run_sweep (#6357) 2fdb447d Remove dummy from cirq-core (#6356) 3a64ef15 StreamManager: make function params explicit (#6355) 26dbabc6 Speed up hashing for GridQubit, LineQubit, and NamedQubit (#6350) 3c819619 Update docs/tutorials/google/start.pynb (#6346) 9a8298da Update start.ipynb (#6342) 8d07cabc Optimize ParamResolver.value_of (#6341) 392083b9 StreamManager: retry with get result request on already exist errors (#6345) 0e288a75 Bump @babel/traverse from 7.14.5 to 7.23.2 in /cirq-web/cirq_ts (#6318) 2f702c88 Add classical simulator (#6124) 39bd9269 Change default for streaming feature flag to false (#6310) 0b90ed6f Increase coverage of clifford protocols to parity_gates (#6338) 11ae0bd3 Make RouteCQC errorout on intermediate measurements on 3+ qubits (#6307) aa312bcd Fix flaky behavior of test_xeb_fidelity (#6337) 2f7d7325 Cache Circuit properties between mutations (#6322) 54852270 Run unit tests without affecting user browser session (#6333) fec68ae6 Fix ci-daily pytest failure (#6335) 34e8dab0 Extend Clifford protocol for 2+ qubit operations through analytical check and falling back to decompose (#6332) 17313e71 ci - show 20 slowest tests on Linux, Windows and Mac (#6334) 5556e729 ci - skip slow tests on PR, run them in daily ci instead (#6331) 1eced48d Moved rigetti integration test logic to higher level conftest.py file… (#6328) 15497859 remove default values of InternalGate (#6330) 235a0c6e Add documentation for cirq google's support for google internal gates (#6301) 455f50be Build clifford tableau just once during SingleQubitCliffordGate to PhasedXZGate conversion (#6325) ec84a057 Preserve subcircuits passed to [Frozen]Circuit.from_moments (#6320) 96b38428 Move qubit management transformers from Cirq-FT to Cirq-core (#6319) 105d975a Adds 2q prep for iswap instead of sqrt_iswap (#6314) a98fc616 Make ancilla for BiQubitsMixer sided too. (#6313) fefe3501 Make SingleQubitCompare output registers directional (#6312) fee056e9 Move GreedyQubitManager from Cirq-FT to Cirq-Core (#6309) 87f77be0 Create separate unary and streaming RPC tests in engine_test.py (#6311) 4dc36d54 Integrate StreamManager with run_sweep() (#6285) c6f60bc0 Apply fix from typo scan of quantumai website, cl/570431484 (#6308) bef756e2 Allow specifying settings field from Cirq-ionq (#5817) fd18da57 Make OpIdentifier serializable for all inputs (#6295) 1948e732 Change signature of cirq_ft.And gate to use directional registers like Qualtran (#6302) c6963234 Rename cirq_ft.Registers to cirq_ft.Signature to match data types in Qualtran (#6300) 61d96711 Fix stream_manager_test type warnings (#6299) acbc6247 Do not allow creating registers with bitsize 0 (#6298) 8e4e7d14 Add bitsize field to Cirq-FT Registers (#6286) 188bb94a Add registry sweep documentation to cirq_google (#6291) 907ec3af Try to make docstring render correctly (#6283) d805d823 Make InternalGate hashable if all gate args are hashable (#6294) 13664940 Apply minor doc fixes (#6289) b630298d Fix matplotlib typing (#6290) f715527b Fix documentation of FSimGate (#6288) 432d57a8 Add serialization support for InsertionNoiseModel (#6282) cf005c2d add to ionq code owners (#6273) 6c14cfa7 StreamManager: Add mechanism to close the request iterator (#6263) deedb453 Changed FakeQuantumRunStream to support arbitrary response and exception timing (#6253) 6fae4097 Delete SelectionRegisters and replace uses of Registers with Tuple[Register, ...] (#6278) e2356428 Variable spacing QROM should depend upon structure of different data sequences and not exact elements (#6280) eddb2d9c Add caching to value_equality_values decorator for auto generated methods. (#6275) 0e80fa52 v0.3 API + debiasing (#6077) b70b2fcf Add new processor selector parameters in cirq-google/engine run methods (#6267) b28bfce0 Speed up parameter resolution for cirq.Duration (#6270) c7048f50 codecov - exclude protobuf-generated sources from coverage analysis (#6268) 041ce5df Add tags to cirq.FrozenCircuit (#6266) 83609ebe Make device parameter units/idx optional (#6264) 8bd21618 Support the new quantum engine processor_selector in engine_client (#6254) 56b5db2e add back add/remove_qubit to density matrix sim state (#6259) ed26d2f7 Fix ordering issue in random_rotations_between_grid_interaction_layers_circuit (#6261) 7ed95aa3 Speed up cirq.map_operations and cirq.map_operations_and_unroll (#6250) be6218e1 codecov - tolerate small decrease in coverage (#6258) 5bbdc223 Apply variable-spaced optimization to QROM circuits (#6257) 6abc7401 remove extra User-Agent prefix in the ionq API header (#6232) 999fd94a Avoid skipping code lines depending on random seed (#6256) 86f17eb8 Update documentation to prevent markdown rendering of underscores as italics (#6255) 6e38a274 Fix coverage exclusion syntax (#6241) 6b44704a Check if python starts python3 (#6239) 95cb43f5 Remove temporary directories after test done (#6236) 30fa6f59 Fix bug in cirq-ft due to which T-complexity fails for gates with an empty decomposition / no-op (#6252) 95c672ab Support the deprecated_parameter decorator for asynchronous functions. (#6247) 64e1a7fd Fix CI requirements for Changed files test (#6243) 9fbaa054 Fix quoting in shell scripts per shellcheck-0.9 (#6245) 13f05fdf Revert "Integrate StreamManager with run_sweep() (#6233)" (#6242) 2fcdeb8d codecov - fix syntax for excluding code lines from coverage (#6240) c193c482 Fix bug in controlled() method of CCX and CCZ gates (#6237) 5e342c2b codecov - evaluate coverage at 0.1% resolution (#6238) 86479ae7 Integrate StreamManager with run_sweep() (#6233) 5c36dc00 fix ms gate equality (#6231) 081afab2 Add decomposition for CCZ gate and IonQTargetGateset when qubits are all-to-all connected (#6095) 14baaa59 Add StreamManager (#6199) c5afccea Fix Isolated pytest (#6229) 701538c3 Support empty invert_mask in measument gate deserialization (#6224) c510fffb Update requirements.txt (#6226) c15dd038 Fix typo and add more helpful assertion message. (#6221) 1c038c32 Pin mypy-protobuf version and fix failing qasm test (#6222) 91f690d4 Add cirq specific environment variables to ionq (#6216) d81d07c2 Move AsyncioExecutor to separate file. (#6192) c4a2b93f Add Codecov coverage badge to the main README file (#6220) 43f6a7fd create cirq_google.api.v2.InternalGate proto (#6212) db1b37b2 Fix notebook failure in CI tests (#6218) 76b8a96e Integrate CI with codecov coverage reports (#6193) 43d03726 Use f-strings in the pr_monitor tool (#6208) 6e562e64 Add ResponseDemux (#6190) e16fbf44 Bump word-wrap from 1.2.3 to 1.2.4 in /cirq-web/cirq_ts (#6209) 8241c4e0 Bump cirq version to 1.3.0 (#6207) edc820a5 Remove flynt dependency (#6205) 344d0206 Simplify StatePreparationAliasSampling tests by relying on Cirq simulators to simulate operations allocating ancillas (#6204) 83ede366 Make Cirq-FT registers multi-dimensional (#6200) a076858a Add Python 3.11 tests to CI (#6191) 45ed2287 Ignore string updates for consider-using-f-string (#6203) 5f5f513e Fix flaky test to make Windows CI runs consistent (#6202) 084e273a Use f-strings instead of percent operator or str.format() (#6198) b72a5328 Create cirq_google.InternalGate (#6194) c93224eb Implemented 8n T complexity decomposition of LessThanEqual gate (#6156) cb05a694 Create consistency check for unitary with ancilla (#6196) 8e70f775 Remove dependency on the flynt tool (#6164) 3fe34384 Speed up execution time of merge_single_qubit_moments_to_phxz transformer by avoiding redundant calls to unitary protocol (#6174) d98be50e Delete dependencies pinning done over 2 years ago (#6189) 60508bc3 Update pr_monitor/Dockerfile to Python 3.9 (#6188) a041ef80 Handle shape mismatch for cirq.dirac_notation (#6179) 9dff0115 Fix failing tests for Python 3.11 (#6181) 5d3e681a Remove unused warnings filter for pytest (#6186) 56259e49 Clean up after getting compatibility with numpy-1.24 (#6187) 8a41b4a0 added ci-daily (#6177) 221d6752 Retire unused Dockerfile (#6184) 5db4af71 Remove references to cirq_qubitization in cirq_ft (#6183) 508677ad Create a unitary to pauli string transformer (#6100) ad6e6494 Handle qubits in the str of StateVectorTrialResult (#6180) 98496955 Decompose protocol must create a context when given None and SimpleQubitManager must add a prefix to its qubits (#6172) 7b753f63 Remove invalid extra commas from json data (#6176) bc09047e Bump minimum python version to 3.9 (#6167) 74cee7e8 Add support for > 32 qudits to cirq.sample_state_vector. Fix for #6031 (#6090) af4688df Skip utility sims (#6170) 421d492b copied colabs (#6169) 6565fc5a CI - run pylint checks with dependencies installed (#6163) 228c7e6f Fix LaTeX formatting for arbitrary-angle MS gate (#6166) f4605da7 Set cachetools min version to 5.3 (#6161) dfedcd60 Delete redundant setup.cfg files (#6122) 374947dc Remove overwrite_existing fields in CreateQuantumProgramRequest and CreateQuantumJobRequest (#6160) 6c251a3d Remove numpy<1.24 restriction from requirements.txt (#6149) f3965e82 Add Device Parameter metadata serialization to cirq_google (#6113) 3b699a48 BugFix in cirq.map_operations (#6155) b3376590 CI - update GitHub actions (#6153) 1bae5437 Try to fix _bz2 issue. (#6151) d2362760 Add units to device parameter (#6140) c5dbb11a Launch Cirq-FT: Cirq for Fault Tolerant Algorithms sub-package (#6138) 26af12ee Allow measure_single_paulistring to have negative coefficient (#6143) 9a1609ce Make cirq.FREDKIN gate self-inverse (#6135) c08649fb added resolver for Sympy.Float to improve performance (#6128) d7fb8ece Replace usage of functions deprecated in NumPy 1.25 (#6133) 092b9961 Fail early in _strat_has_stabilizer_effect_from_unitary (#6131) 24abfa1d Pin cirq_rigetti pyquil dependency to pyquil-3.* (#6129) 0ef302f9 Changed simulators fallback to decompose_once and removed ancilla support from DensityMatrixSimulator (#6127) ebc52d53 Remove references to cirq_google.Foxtail (#6126) 3ac3c30d Inconsistent ordering of tags (#6123) cb89f3af Update Density Matrix and State Vector Simulators to work when an operation allocates new qubits as part of its decomposition (#6108) 33934390 Add new subpackage cirq-ft (#6121) 49b2cfb0 Add modulo to equal_up_to_global_phase (#6058) 1ed879d8 Quantum Shannon Decomposition (#6020) 20b3d93e Add _decompose_with_context_ protocol to enable passing qubit manager within decompose (#6118) 91777087 Add support for allocating qubits in decompose to cirq.unitary (#6112) 99e8a137 Ensure that cirq.decompose traverses the yielded OP-TREE in dfs ordering (#6117) b1e09a9e Update cirq.decompose protocol to perform a DFS instead of a BFS on the decomposed OP-TREE (#6116) ebec38b8 Add Parameter to cirq_google (#6102) 36d67c15 Make Collector and PauliSumCollector work with AbstractCircuit (#6109) 16ed00d3 Loosen networkx requirements (#6105) 50a49a9c Bump requests from 2.24.0 to 2.31.0 in /dev_tools/pr_monitor (#6104) 97e8b986 Accept all_qubits in GridDevice._from_device_information() to allow isolated qubits (#6103) 683286b9 Add metadata to sweeps (#6099) 0066a530 GridDevice serialization refactor (#6094) 091688da Fix typos in notebooks.md and a plenty of relative links (#6089) da9c4122 Unblock test that requires sympy-1.12 (#6096) a95f0096 Override gate.controlled() for GlobalPhaseGate to return a ZPowGate (#6073) f2cd706e Fix image links (#6085) df3acbed Remove deprecated argument of pyplot.stem (#6086) dc23f873 Keep up with quimb-1.5.0 (#6087) 6d3f27ea Fix cirqdev gitter URL (#6084) d292dcce Apply suggestions from CommonTypos checker (#6082) c5367eb1 Add Moment.from_ops to more efficiently construct moments (#6078) ae336a65 Fix Default InsertStrategy in Circuits Notebook (#6079) c1d64518 Add ZipLongest to cirq_google (#6074) 2a57894e Access attributes directly in GridQubit instead of using properties (#6075) 03405d1b Fix matplotlib deprecation warning (#6072) 66ae2bca Removing Obsolete json files (#6071) f9ce9baf document json_namespace usage (#6069) a96a98c2 Adds User-Agent header to requests (#6065) 79286a1d Restore weekly cadence for the CI-weekly workflow (#6066) ee2d32a8 add phase_by method to ZZPowGate (#6062) 8ac690d9 Bump webpack from 5.40.0 to 5.76.0 in /cirq-web/cirq_ts (#6035) 5c2bcdaf Use PEP-673 Self type annotations (#6057) 1445f12e Verify error reporting from the CI-weekly run (#6060) e7ef9d4a Update to mypy 1.2 (#6059) 6a5b3ea8 Use hash of all requirements files in cache keys for ci (#6061) 31bf1ac1 Add weekly CI workflow to test all notebooks (#6046) ae622500 Escape both <> characters in SVG test labels (#6056) cde65be8 Update cirq.contrib.svg to escape < and > characters (#6055) 6a97ccaa Refactor and speed up cirq.transformers.stratify (#6013) 663d404f Change dtype repr for Numpy 1.24 (#5991) 6b0c0985 Fix failing CI after Pandas 2.0 update (#6051) f1149962 Install recent version of ply in interop.ipynb (#6033) 0cc0458a Prevent notebook tests from changing the pytest Python environment (#6032) 611edeed pytest - keep "slow" tests deselected after -k EXPRESSION (#6034) 2c51eca3 Ensure compatible version of numpy in isolated_notebook_test.py (#6038) 402260c6 Update and correct pow function for PauliSum (#6019) 4607dd1e Remove outdated workaround for a bug in black formatter (#6045) cc8fc312 Fixed type annotations in _BaseLineQid and _BaseGridQid (#6043) 7335e715 Fixed type annotations in _BaseLineQid and _BaseGridQid (#6043) f636c5f0 Simplify dev_tools.notebooks.utils.rewrite_notebook (#6030) 8b97aa5d Bump node-fetch and puppeteer in /cirq-web/cirq_ts (#5998) c8f7a029 MatrixGate names don't survive serialization (#6026) 18991b5b Speed up parameter resolution by checking if val is parameterized and caching the boolean (#6023) f6a92a09 Adding dimension property to comparison of XPowGate and ZPowGate (#6005) a8275837 Correct invalid URLs found in notebook files (#6022) af6624d5 Bump ipython from 7.31.1 to 8.10.0 in /dev_tools/requirements/deps (#6015) 08fee59a IonQ: Handle 409 errors that are injected by Cloudflare (#5292) 1ad63aaa Pin Node version (#6014) 93545bee Fix an error in qvm_stabilizer_example.ipynb (#6010) 27dd6076 Add __cirq_debug__ flag and conditionally disable qid validations in gates and operations (#6000) fd491e0f Retry bad_gateway in cirq-ionq (#6006) dd2667a4 Reducing some code by cleaning up some logic (#6003) 3dc9629e Removing unnecessary return statement in cirq-core/cirq/circuits/moment.py (#6004) a3520bc3 Bump http-cache-semantics from 4.1.0 to 4.1.1 in /cirq-web/cirq_ts (#5997) 0c523d45 Add M and R aliases for cirq.measure and cirq.reset (#5993) 24a0d2e6 Fix link to noise models (#5990) 25ecba92 Fix bug in documentation of phase_flip and bit_flip methods (#5977) 7f0c2789 Bump json5 and tsconfig-paths in /cirq-web/cirq_ts (#5975) b0140366 Add single-qubit detuning parameters to CouplerPulse (#5971) 0c4f7420 Make AsyncioExecutor a shared resource across EngineClients (#5976)

v1.2.0

10 months ago

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

New Contributors

Full Changelog: https://github.com/quantumlib/Cirq/compare/v1.1.0...v1.2.0

A Huge Thank You

Thank you to all our contributors for this release:

Ben Greiner, Cheng Xing, Doug Strain, Joe Schulte, Jon Donovan, Mark Edmiston, Matthew Harrigan, Matthew Neeley, Michael A. Perlin, Noureldin, Ogah Jackreece Ejini, Orion Martin, Pavol Juhas, Piotr Lewandowski, S Jeeva, Seneca Meeks, Siddharth Mehta, Spence Churchill, Tanuj Khattar, Tarun Singhania, Uzair Faruqui, Victory Omole, William Courtney, carthick, jli0108, nickdgardner, richrines1, sarahsor, skushnir123, xXnathankerrXx, yinghui-hu

v1.1.0

1 year ago

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

7892143d Print multi-qubit circuit with asymmetric depolarizing noise correctly (#5931) by Paige af1267dd 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

New Contributors

Full Changelog: https://github.com/quantumlib/Cirq/compare/v1.0.0...v1.1.0

A Huge Thank You

Thank you to all our contributors for this release:

Adam Zalcman, Ammar Eltigani, Andreas Bengtsson, Aria, Cheng Xing, Dax Fohl, Doug Strain, Germán Mauricio Muñoz, Jay Mehta, Mark McDonald, Matthew Neeley, MichaelBroughton, Orion Martin, Paige, Pavol Juhas, Tanuj Khattar, Tim (Yi-Ting), Victory Omole, augustehirth, chasesadri, dependabot[bot], eliottrosenberg, michael

v1.0.0

1 year ago

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

New Contributors

Full Changelog: https://github.com/quantumlib/Cirq/compare/v0.15.0...v1.0.0

A very special thanks to the all the contributors we've had over the years:

Abhik Banerjee, Abhishek Chakraborty, Abraham Asfaw, Adam Zalcman, AJ Hanus, Alapan Chaudhuri, Albert Frisch, Aleksandr Pak, Alexis Shaw, Alex McNamara, Ali Panahi, Ammar Eltigani, Ana Sofia Uzsoy, Andreas Bengtsson, Andrea Skolik, Andrew Hancock, Andriy Kushnarov, Animesh Sinha, Anna Nachesa, Antoine (Tony) Bruguier, Antonio Martinez, asaf david, augustehirth, Balint Pato, balopat, Bao Nguyen, Ben Brady, Bicheng Ying, Billy Lamberta, brett koonce, Bryan A. O'Gorman, Bryan Bonnet, bryano, bt3gl, Casey Duckering, Cheng Xing, Chen Jialin, Cirq Bot, cjcarey, Cody Poole, cognigami, Craig Gidney, crystalzhaizhai, Daniel (Bochen) Tan, Dave Bacon, David Cox, David Yonge-Mallo, Dax Fohl, dependabot[bot], dkafri, Dmytro Fedoriaka, Dominic Widdows, Doug Strain, Drew, eliottrosenberg, Eric Hulburd, Etsuji Nakai, evan, Evan Peters, FallenApart, Freyam Mehta, fvkg, Gaurav Mann, Gregory Clark, Guen Prawiroatmodjo, gwhitehawk, Hannah Sim, harryputterman, Henrique Silvério, Hosseinberg, idk3, Ilja Livenson, ishmum123, Ishmum Jawad Khan, Jack Ceroni, Jae H. Yoo, Jannes Stubbemann, Jimmy Yao, Jintao YU, jitendrs, Jon Donovan, joshp112358, jshede, karlunho, Kevin J. Sung, KevinVillela, Kislay Kishore, K M Lau, Kunal Arya, Laurent AJDNIK, Leonid Kuligin, lilies, lindmarkm, Loïc Henriet, madcpf, Malice, Mark Daoust, Martin Ganahl, Martin Leib, Matteo Pompili, Matthew Harrigan, Matthew McEwen, Matthew Neeley, Max Hettrich, melonwater211, Mia von Steinkirch, Mia von Steinkirch, Ph.D., M.Sc, Michael A. Perlin, Michael Broughton, MichaelBroughton, Mike Hucka, Misha Brukman, m-szalay, Muyuan Li, Nathanael Thompson, Nathan Shammah, Nicholas Rubin, Niko Savola, Noureldin, Oliver O'Brien, Orion Martin, Patrick Nannt, Pavol Juhas, Paweł Pamuła, Peter Karalekas, Philip Massey, Pieter Eendebak, Ping Yeh, pschindler, Purva Thakre, Rhea Parekh, Rishabh, Rishit Vora, Robert Hundt, Ryan Babbush, Ryan Gonzalez, Ryan LaRose, Ryan Levy, Sagar Dollin, Samarth Vadia, sboixo, sebgrijalva, Seb Grijalva, Seun Omonije, Shadab Hussain, Shaswata Das, Shrill Shrestha, smadhuk, smitsanghavi, Smit Sanghavi, Spencer Churchill, stoykojulia, TAKAHASHI Shuuji, Tanuj Khattar, Tim Gates, Timo Eckstein, Timothy Man, Tim Swast, Tony Bruguier, tonybruguier-google, twojno, Unai Corzo, Vamsi Krishna Devabathini, Victory Omole, Walker Willetts, William Courtney, wing, Wojciech Mruczkiewicz, XiaoMiQC, Yash Katariya, YBC, yourball, Yusheng Zhao, Zachary Crockett, Zeeshan Ahmed, Zhang Jiang, Zijun Chen, Zijun "Jimmy" Chen, zoltanegyed

v0.15.0

1 year ago

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

New Contributors

Full Changelog: https://github.com/quantumlib/Cirq/compare/v0.14.1...v0.15.0

A Huge Thank You

Thank you to all our contributors for this release:

Adam Zalcman, Antoine (Tony) Bruguier, augustehirth, Bicheng Ying, Cheng Xing, Dave Bacon, Dax Fohl, Dominic Widdows, Doug Strain, Jon Donovan, Matthew Harrigan, Matthew Neeley, MichaelBroughton, Orion Martin, Pavol Juhas, Robert Hundt, smadhuk, Tanuj Khattar, Timo Eckstein, Victory Omole

v0.14.1

2 years ago

Patch release to fix vendor issue #5210.

No other changes introduced.

v0.14.0

2 years ago

v0.13.1

2 years ago

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:

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

v0.13.0

2 years ago

Cirq v0.13.0 release

Highlights

ProjectorString + ProjectorSum

Added cirq.ProjectorString and cirq.ProjectorSum for compact representations and calculations involving projection operations.

Gatesets

Construct cirq.GateFamily and cirq.Gateset to test gates and operations for membership in well-defined groups.

NamedTopologies

Basic circuit to device placement routines (get_placements, draw_placements) have been added to Cirq, powered by NamedTopology.

Simulator performance improvements

Cirq's built-in simulators now dynamically factorize the simulated state into non-entangled subsets of qubits (when possible). This dramatically improves performance for circuits consisting of disconnected subsystems, and permits simulation of larger numbers of qubits for such circuits.

Clifford Tableau Decomposition

Upgraded existing clifford operations and circuits to make use of Tableau representation where appropriate and implemented baseline tableau to circuit decomposition using methods outlined in this paper.

Breaking changes

  • Retain log_of_measurement_results throughout simulation (#4465):
    • Step results will include all measurements from previous moments in the simulation.
  • Exponent should be drawn on target qubit in CX and CCX gates (#4462):
    • Tests depending upon diagrams of CX and CCX can now fail.
  • Replace isinstance(op, GateOperation) checks in cirq_google optimizers to support other operation types (#4459):
    • Note that TaggedOperations which were earlier ignored by the optimizers would now be considered, and hence this is potentially a breaking change if people were implicitly relying on TaggedOperations not getting compiled by the optimizers.
  • Resolve inconsistencies in using controlled gates & controlled operations (#4167):
    • gate_operation.controlled_by() can now return a cirq.GateOperation instead of cirq.ControlledOperation in cases where the underlying gates have specialized gate.controlled() implementations.
    • This also leads to a change in diagram of the controlled gates with specialized controlled implementations. For eg: Controlled S gate is now plotted as CZPowGate (@ --- @ ** 0.5) instead of ControlledOperation with Z ** 0.5 as subgate(@ ---- S)
    • op.controlled_by for 3Q gates like CCX, CCZ, CSWAP will now return ControlledOperation with sub_operation = <underlying non-controlled gate>. Eg: CCCX (i.e. sub_gate = X) instead of CTOFFOLI (i.e. sub_gate = TOFFOLI) etc.
    • Diagrams for ControlledOperations will now always have the exponent drawn on the target qubit (in case of multi qubit sub_operation, the exponent will always be on the first qubit if not the underlying gate does not explicitly specify a target index).

Changes to top level objects

cirq-core

New top level objects

  • NamedTopology
  • draw_gridlike
  • LineTopology
  • TiltedSquareLattice
  • get_placements
  • draw_placements
  • estimate_parallel_single_qubit_readout_errors
  • AnyIntegerPowerGateFamily
  • AnyUnitaryGateFamily
  • GateFamily
  • Gateset
  • measure_paulistring_terms
  • measure_single_paulistring
  • ParallelGate
  • ParallelGateFamily
  • parallel_gate_op
  • PauliMeasurementGate
  • StatePreparationChannel
  • ProjectorSum
  • decompose_clifford_tableau_to_operations
  • choi_to_kraus
  • choi_to_superoperator
  • kraus_to_superoperator
  • operation_to_superoperator
  • superoperator_to_choi
  • superoperator_to_kraus
  • state_vector_to_probabilities
  • dataclass_json_dict
  • measurement_key_name
  • measurement_key_obj
  • measurement_key_names
  • measurement_key_objs
  • SupportsKraus

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

  • cirq.SupportsOnEachGate
  • cirq.TwoQubitGate -> Define num_qubits manually
  • cirq.ThreeQubitGate -> Define num_qubits manually
  • cirq.ParallelGateOperation -> Use cirq.ParallelGate(gate, num_copies).on(qubits)
  • cirq.measurement_key_names -> parameter allow_decompose removed
  • cirq.is_measurement -> parameter allow_decompose removed
  • cirq.kraus_to_channel_matrix -> Use cirq.kraus_to_superoperator instead
  • cirq.operation_to_channel_matrix -> Use cirq.operation_to_superoperator instead
  • cirq.CompletionOrderedAsyncWorkPool -> Use duet.AsyncCollector instead
  • cirq.SerializableGateSet.gate_set_name -> Use name instead

cirq-google

New top-level objects

  • Serializer
  • ExecutableSpec
  • KeyValueExecutableSpec
  • QuantumExecutable
  • QuantumExecutableGroup
  • BitstringsMeasurement
  • SharedRuntimeInfo
  • RuntimeInfo
  • ExecutableResult

A Huge Thank You

Thank you to all our contributors for this release:

Adam Zalcman, Alapan Chaudhuri, Ali Panahi, Ana Sofia Uzsoy, Animesh Sinha, Antoine (Tony) Bruguier, Balint Pato, Bicheng Ying, cognigami, Dave Bacon, Dax Fohl, Doug Strain, Eric Hulburd, Guen Prawiroatmodjo, ishmum123, Ishmum Jawad Khan, Mark Daoust, Matthew Harrigan, Matthew Neeley, melonwater211, MichaelBroughton, Nathanael Thompson, Orion Martin, Pieter Eendebak, Ryan LaRose, Shrill Shrestha, Smit Sanghavi, Tanuj Khattar, twojno, Victory Omole, Zeeshan Ahmed

Full change list

8a7d6f84 Removing 0.13.0.dev -> 0.13.0 50271af8 Made the Density Matrix Plotter (#4493) aaf969d8 Allow any qubit type in quimb density matrix (#4547) e4e90197 GateFamily & Gatesets cleanups and bugfixes (#4569) 686e6b1a Removes sections related to experimental features. (#4573) 5aca52d0 Roll forward "Enable CircuitOp serialization" (#4511) 1f14edf6 Fix "tex" -> "text" (#4571) 888aeb7a Make Instance GateFamily check for equality ignoring global phase (#4542) 66c694a9 [cirqflow] Quantum runtime skeleton - part 1 (#4565) 033c604c Remove v0.13 deprecations. (#4567) 9f3034cb Replace isinstance(op, GateOperation) checks in cirq_google optimizers to support other operation types. (#4459) bd2e63c0 Boolean Hamiltonian gate yields fewer gates (#4386) 3d509219 [cirqflow] Provide concrete ExecutableSpec (#4559) 978dbacf Add measurement_key_obj and measurement_key_objs protocols. (#4497) f11846ec Add copyright notices to conftests (#4561) e66ac537 Document conversion tools between channel representations (#4554) 09da3914 Fix variational algorithm tutorial (#4541) eaa7f333 [cirqflow] QuantumExecutableGroup (#4551) 7e0d5d24 Add Azure Quantum docs and tutorials (#4530) 0d9eb4ef More channel representation conversion tools (#4553) 02b46580 Compute a Kraus representation from the Choi matrix (#4549) 241695a3 Acctually assert in kraus_protocol_test.py (#4546) f48efe0f Resolve inconsistencies in using controlled gates & controlled operations (#4167) 9d0ac9cb Add Clifford Tableau decomposition function (#4183) e6dc1e08 Use Gatesets in cirq/neutral_atoms (#4525) bd1cdbcd [cirqflow] Quantum Executable (#4527) da635241 Fixed test_clifford_circuit_3 (#4534) 5daaec6d Fix resolving integer divisions (#4521) 88be1ef1 Fix broken path instructions in setting up a dev environment (#4519) 004eed10 Add separators argument to to_json function. (#4537) 6d9bbacd Re-add all_measurement_keys and deprecate it (#4540) 34d0f8b5 Replace the underlying representation of SingleCliffordGate by CliffordTableau (#4165) 44e063b9 Code Quality Fixes in StatePreparationChannel (#4503) e2564235 [Named Topologies] LineTopology nodes_as_linequbits (#4536) 95916155 Idiomatic use of "segments" in floquet calibration tutorial (#4528) 3a287c28 Use Gatesets in cirq/optimizers/* (#4526) 2868382e Use Gatesets in cirq_ionq/* (#4524) dfc33a10 Use Gatesets in cirq_pasqal/* (#4523) 61718ca2 Use Gatesets in cirq/ion (#4522) 4d1b9c00 Add common gate families as part of adopting gatesets across Cirq. (#4517) f8ffbea1 Fix docstring for fsim gate (#4520) f1964e5b Explicitly throw TimeoutError when job times out (#4514) 9f6c359e Exponent should be drawn on target qubit in CX and CCX gates (#4462) 9f371b0d Consolidate SQRT_ISWAP gate defs (#4229) cf5b45db Little json things (#4506) 7759c05f Add type annotation on FrozenCircuit.to_op (#4505) 0041657c Add cirq.GateFamily and cirq.Gateset (#4491) 464ef048 Fix broken tutorials depending on cirq pre-release (#4504) f1e676fa Fix incorrect index in intro.ipynb (#4502) 3725c6a2 Implemented State Preparation Gate (#4482) b80c2656 Fix broken Floquet tutorial (#4496) 91bfb5c1 [Docs] Add calibration FAQ (#4442) b3fa1bf5 Abstract out auth+device+sampler boilerplate from cirq_google tutorials (#4286) 578c956b Bump the proto requirements to match the generated data. (#4473) eb3d84c4 Replace decomposition in measurement_key_protocol with explicit implementations (#4471) 676431da Adds PauliMeasurementGate (#4444) 9349802d Append list of wrapped finders in sys.meta_path with list of non-wrapped finders (#4467) 3b6ddfb9 Refactor ActOnArgs.kron/factor/transpose to reduce code duplication (#4463) 7951f84a Deprecate Two/ThreeQubitGate (#4207) 0dce2c1a [Obs] 4.5 - High-level API (#4392) 2988803b Retain log_of_measurement_results throughout simulation (#4465) 9130e2ab cirq-google: Export Serializer on top-level cirq_google namespace (#4474) d8004c67 Enable missing-param-doc pylint rule. (#4457) 6ce9a06d Upgrade notebook (#4468) b44387aa Bring back nest-asyncio to allow running notebooks with latest release (#4472) de31ee92 Use duet for asynchrony, in particular for Collector (#4009) 58cda7a4 Serialize SingleQubitCliffordGate (#4421) 932f0659 Added r(theta, phi) gate (#4455) 886fc516 dataclass_json_dict (#4391) 6ecaf079 Named Topologies (#4370) 1c2eafb3 Add missing code for ProjectorSum serialization in TFQ (#4456) 454c1a3c Allow initialization of MeasurementKeys with empty strings (#4445) 9ad0db17 install pyquil qvm and compiler (#4435) c8dca6bc Noise validate and docs (#4447) 1532975d Fix typing for Google measurements functions (#4450) 82a76988 Rename kraus.py to kraus_protocol.py (#4454) 743c5bad Fix reference to np.random.poisson (#4452) d4717d89 Do not sort qubits by default in pauli_string to fix inconsistencies with pauli_string.gate (#4446) 91f4c765 Fix repr for MeasurementGate so that eval(repr(g)) == g (#4443) 4f881d71 state vector to probability utility method (#4439) 662de03c Replace from numpy.random import poisson with import numpy as np in cirq-core/cirq/contrib/acquaintance/gates_test.py (#4451) 11f751fa Add ParallelGate and deprecate ParallelGateOperation (#4398) a99fef97 Add tutorial on comparing current performance to latest calibration (#4180) b1db3fa7 Fix MeasurementKey repr s.t. eval(repr(k)) == k (#4441) e0c4a8af Add tutorial on circuit optimization, gate alignment, & spin echoes (#4373) d259a8c2 Add name to circuit serializers (#4422) 739808df ProjectorSum object for TFQ (#4364) e6c584b6 Calibration to fidelity (#4431) aa8184c7 Replace existing calls of SupportsChannel to SupportsKraus (#4438) 5ee2288f Add SupportsKraus to cirq/__init__.py (#4437) 8d02bde2 Change definition of rise time for coupler pulse (#4427) 601a9237 Channel matrix -> superoperator (#4433) ac873c6c Metrics to noise (#4389) cad0c336 Allow ActOnArgsContainer to support protocols.act_on (#4371) 9d615c5e Improve speed of random circuit generation (take 2) (#4430) fb4cf437 updated cirq.Circuit to cirq.AbstractCircuit (#4372) 6e5d6844 Add missing-raises-doc rule to the linter and subsequent refactor. (#4345) 04dea0cb Deperecate property test. (#4432) 36904401 Rename measurement_key protocol to measurement_key_str (#4403) 5a248eb6 Revert "Improve speed of random circuit generation" (#4429) 75eccd33 Improve speed of random circuit generation (#4428) 782efcd0 pre-release notebooks -> stable (#4423) 37dfc636 Simultaneous readout (#4415) 28feee1f [Docs] Remove redundant note about cirq pre install in noise guide (#4413) 8e1a08d9 Add modules to book yaml (#4419) e4645d1f Fix XL size labeling everywhere. (#4420) 4aeb719c Size labels (#4402) eb42d4a6 Updates release.md and verification scripts. (#4417) db1b310d Bump dev version to v0.13.0.dev. (#4416)

v0.12.0

2 years ago

Cirq v0.12.0 release

Highlights

All Cirq vendor modules have been extracted

Following the example of cirq-google now we have cirq.aqt, cirq.pasqal and cirq.ionq extracted to their corresponding new cirq modules. These are standalone packages that can be installed on their own with pip install cirq-<module>.

Rigetti support

In collaboration with Rigetti, the cirq-rigetti module is now avaiable to access the Rigetti QVM and Rigetti Quantum Computing Service runtimes.

Two-qubit unitary decomposition for (inverse) sqrt-iSWAP

Arbitrary two-qubit unitaries can be now decomposed to single and two-qubit gates using only 3 sqrt-iSWAP gates, compared to the previous 6 sqrt-iSWAP gates. This is an exact analytical compiler based on https://arxiv.org/abs/2105.06074

Typescript development and 3D Circuits

The cirq-web module adds the framework to develop new, interactive, Typescript based widgets for notebook environments. Two new widgets are added as an example: BlochSphere visualization and 3D Circuits.

Python 3.9 support

We now officially support python 3.9, it is included in our testing suite.

Performance boost for low entanglement circuits

Starting with https://github.com/quantumlib/Cirq/pull/4100 all simulators now dynamically allocate/deallocate memory when entangling between qubits or measuring/resetting qubits. This allows users to simulate larger number of qubits than otherwise would have been possible, with the requirement that not too much entanglement between qubits exist at any given moment in the circuit.

Breaking changes

  • cirq.MergeInteractions behavior change (#4288):
    • MergeInteractions skips merging CZ gates if there are already equal or fewer in a sequence than the synthesized result (to prevent increasing the gate count). Previously, a tagged partial CZ gate could slip through and not be optimized even if allow_partial_czs=False.
  • changes in mutability of step_result.get_state(copy=False) (#4110):
    • Manual changes made to a step_result.get_state(copy=False) array are no longer preserved by default. If this behavior is required, it will continue to work if split_untangled_qubits=False, but this PR sets split_untangled_qubits=True.

Changes to top level objects

cirq-core

New top level objects

  • SymmetricalQidPair
  • is_cptp
  • BooleanHamiltonian
  • KrausChannel
  • MixedUnitaryChannel
  • ProjectorString
  • reset_each
  • SQRT_ISWAP
  • SQRT_ISWAP_INV
  • MergeInteractionsToSqrtIswap
  • two_qubit_matrix_to_sqrt_iswap_operations
  • entanglement_fidelity
  • kraus_to_channel_matrix
  • kraus_to_choi
  • operation_to_channel_matrix
  • operation_to_choi
  • ActOnArgsContainer
  • OperationTarget
  • StepResultBase
  • GenericMetaImplementAnyOneOf
  • MEASUREMENT_KEY_SEPARATOR
  • has_kraus
  • kraus
  • SupportsActOnQubits

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

  • cirq.aqt, deadline v0.14
  • cirq.pasqal, deadline v0.14
  • cirq.ionq, deadline v0.14
  • cirq.channel -> cirq.kraus, deadline v0.13
  • cirq.has_channel -> cirq.has_kraus, deadline v0.13
  • cirq.SupportChannel -> cirq.SupportKraus, deadline v0.13
  • cirq.ActOnArgs.axes will be removed, use protocols.act_on instead, deadline v0.13
  • cirq_google.GateOpDeserializer.serialized_gate_id -> serialized_id
  • cirq_google.SerializableGateSet.serialize parameter use_constants_table_for_tokens -> use_constants, deadline v0.13
  • cirq_google.SerializableGateSet.with_added_gates -> with_added_types, deadline v0.13
  • cirq_google.SerializableGateSet.supported_gate_types -> supported_interal_types, deadline v0.13

cirq-google

No changes to top level objects.

New modules

  • cirq-aqt
  • cirq-pasqal
  • cirq-ionq
  • cirq-rigetti
  • cirq-web

A Huge Thank You

Thank you to all our contributors for this release:

Adam Zalcman, Ana Sofia Uzsoy, Antoine (Tony) Bruguier, Balint Pato, Bicheng Ying, Casey Duckering, Craig Gidney, Dax Fohl, Dmytro Fedoriaka, Doug Strain, Eric Hulburd, Jannes Stubbemann, Laurent AJDNIK, madcpf, Malice, Mark Daoust, Martin Leib, Matthew Harrigan, Matthew Neeley, Michael Broughton, MichaelBroughton, Nathanael Thompson, Niko Savola, Noureldin, Orion Martin, Ryan LaRose, Seun Omonije, Smit Sanghavi, Tanuj Khattar, Victory Omole, Wojciech Mruczkiewicz

Full change list

8cba3246 Update serialization.md to include deprecation of serializable values (#4411) 1168164c Fix link on jupyter notebook (#4409) abc71590 Revert "Simultaneous readout" (#4406) 66fd2473 implement aspen qubits and devices (#4378) 0d4a31bd 3D circuit visualization using Typescript dev environment (#4334) 10c78c92 Add print_version and replace_version to module.py (#4399) eb72fb54 Simultaneous readout (#4307) 10b15e07 Fix cirq-core dependencies (#4369) 8c505fb2 update json serialization docs + add module docs (#4397) 9d695c50 Fix BooleanHamiltonian.with_qubits() to work with not only NamedQubits (#4396) 3810349a Reorganize serializers (#4385) 78db1026 Add missing import cirq (#4387) c3f9a5d6 T1 decay for simulator (#4326) e56e15d2 Boolean Hamiltonian gate (#4309) 2466bc3a Throw TypeError around any call in if hasattr(obj, '__iter__') and not isinstance(obj, str): to deal with a numpy special case (#4382) 120eb873 [Obs] 4.4 - Checkpointing (#4352) b1dc9735 Proto serialization v25 (#4333) fb915780 GeneralizedAmplitudeDampingChannel docstring (#4374) f7b882ce Measureable channels and mixtures (#4194) 409a412d Disallow empty measurement keys and fix tests using empty keys (#4060) 9c230536 Lazily create TrialResult.final_simulator_state (#4317) 9467ad3c Add is_cptp predicate (#4365) 2b1e4070 Updated calls to np.prod to use dtype=np.int64. (#4363) 9a38c2d2 Projectors for TensorFlow quantum (#4331) 2467e390 IdentityGate optimizations for act_on and independent states (S) (#4340) 0f9fa3fa Optimize swap gates (#4169) fb43b84c Fix floquet quirk url (#4347) bae702c3 Revert "Enable CircuitOp serialization." (#4355) 809fe66f Revert "Allow CircuitOperations in cirq.optimized_for_sycamore" (#4356) ecb02021 [Obs] 4.4 - Readout error mitigation (#4323) 187915d4 Allow CircuitOperations in cirq.optimized_for_sycamore (#4336) 0209c651 Complete implementation of the permit_mixed_moments option (#4342) 4d956c57 Enable CircuitOp serialization. (#4344) 055db683 Allow intercepting decomposer while preserving structure. (#4343) 912110f2 Adds cirq-rigetti (#4302) 7a279173 Floquet notebook missed review nits (#4341) 093c1715 Fix citation and explanation in Floquet calibration example (#4335) b92f379f Make (cirq.X, cirq.Y, cirq.Z)**1 returned type as _Pauli{X,Y,Z} instead of {X,Y,Z}PowGate (#4330) dc013726 Attempt to Fix PauliSumCollector.collect_async warning under notebook(short-term solution) (#4004) 16dd1bb2 better error messaging when deprecated module can't be imported (#4324) c629c382 Re-alias TrialResult to Result in json. (#4319) b8e05873 Fix cirq_web README from large Typescript development PR merge (#4314) a3109a77 pauli_sum_collector.estimate_energy() should return float when energy.imag == 0 (#4313) 0d8bf311 Add missing quote in circuits.ipynb (#4320) 68f76980 T1 constant calculation (#4290) d9e1f937 Fix NameError in visualizing calibration metrics tutorial (#4316) d624a55e Add docstyle rule to the linter and subsequent refactor. (#4311) 7407a28b Test deserializer on infinite recursion. (#4315) c28646fe Sample independent qubit sets without merging state space (#4110) 5ca4ab6e Move on_each to Gate, and deprecate SupportsOnEachGate (#4303) 4852c468 Fix automerge checks (#4308) ada1b09c Add an option to build a PauliSum from a Sympy Boolean expression (#4282) b1a35bf5 Revert "Switch to using the incremental pylint. Turn on documentation linters. (#4267)" (#4306) 52aba59a Switch to using the incremental pylint. Turn on documentation linters. (#4267) cea9eece Return self in Operation.with_tags if adding no tags (#4301) c8be2069 Add reset_each function by analogy with measure_each (#4294) 418d0678 Remove bazel from repo (#4297) 4ec906d3 Allow on_each for multi-qubit gates (#4281) e2b44774 Use partial_trace to factor density matrix (#4300) 6cfdda73 [XEB] Cycle depths during analysis (#4278) 5c3125e9 Add py39 testing to CI test matrix. (#4296) d850bd0f Add Circuit Optimizer for sqrt-iSWAP (#4224) 504bdbb9 Fix behavior of MergeInteractions for tagged partial CZ gates (#4288) c80e4637 Add two-qubit unitary decomposition for (inverse) sqrt-iSWAP (#4213) 24bac557 Typescript development in Cirq and prototype Bloch sphere implementation (#4171) 6282c067 SimulatorBase independent qubits optimization (#4100) 6b6fc980 fix for issue #4087 (#4103) 680f8973 Revert "Support qubits in MeasurementKey and update JSON serialization of keys" (#4277) 14336215 Fix docker (#4230) 55417eea Extract cirq-pasqal (#4241) 608e678b Remove cirq.IonDevice.can_add_operation_into_moment (#4271) 534b9518 Add qubits as a param of PauliSum.matrix() (#4203) d3795718 Refactor private static methods to module functions. (#4231) b1801aba Add coupler pulse gate (#4130) 6d2cd169 No DeprecationWarning deduping during testing (#4239) ff230df1 Update tutorials on calibration (#4258) 36e5f60e Add method to get "mapped_circuit" from CircuitOperations (#4188) 09a2ea5f Support sqrt(iSWAP) and Sycamore gates in Floquet calibration (#4248) aba9fa95 [Docs] Fix dev group link on support page (#4259) 2f07cc9e Fix the CZ ops on the Clifford Tableau Implementation (#4182) 700a6c02 add cancel workflow (#4256) 418e08df Propagate channel from GateOperation to its Gate (#4255) 02f39513 add flynt to pytest-minimal (#4250) fb289677 Add Optional name to MatrixGate parameter (#4201) d7a5b9ba Removes direct URL requirements from cirq[dev-env] (#4249) 81d2097d Support decompose protocol on cirq.Moment (#4251) 81436fee Support qubits in MeasurementKey and update JSON serialization of keys (#4123) 7d9e6035 [4173] Add atol/rtol for unitary checks in MatrixGate (#4220) 42782774 update python version to 3.8 (#4245) 4960e177 Fix extras_require for the cirq metapackage setup.py (#4246) a2f107cd Expand Floquet calibration to arbitrary FSim gates (#4164) ba2cd7fd Removing noise model check in Simulator initialization (#4216) 099fc740 Draw zero-target operations below circuit text diagrams as annotations (#4234) ef5ae035 Qasm for pauli X sqrts (#4113) 65711e10 Remove axes from ActOnArgs, pass qubits explicitly to act_on (#4089) 566ce2bc Extracting cirq-ionq (#4205) 59d80187 Fix EjectPhasedPaulis incorrectly treating X0 as X1 (#4219) 87f2961f Add cirq-aqt to pip install command in development.md (#4221) 73359bf8 fix aqt ref (#4212) 72993b50 Density matrix simulator EVs (#3979) 0d7534a8 Update Google Best Practices (#4168) 1f2328f1 fix AQT link + logo (#4206) b5c0f803 Rename channel.py to kraus.py (#4204) 6af64a27 Fixing isolation in isolated notebook tests (#4202) e151a669 Add two-qubit interaction heatmap to parallel xeb tutorial (#4199) 2dafb29a fixing notebook test errors when no tests collected (#4196) 55873b90 Rename cirq.channel to cirq.kraus (#4195) b43eaaa8 Extract cirq_aqt (#4157) 020008b6 sharding isolated notebook tests (#4192) 1d1f3a8e Triage party config and docs (#3740) 2d7641b8 Allow to pass Circuit to single-qubit gates compensation (#4118) 007a3cdc Fix path in __version__ docstring for setup.py in cirq-google (#4174) 3b315cdf Optimize is_measurement protocol (#4140) 8e7e302b GH actions ubuntu 20 04 (#4148) db8baea4 Fix codeowners for docs and modularized folder structure (#4160) 8b5866ff Minor improvements to echoes tutorial (#4128) 66b2102d Fix the typo in clifford_gate_test::test_commutes_pauli (#4149) 06b34df8 Add edges to device (#3993) 074c4e4a Entanglement fidelity of a quantum channel (#4158) 7065c6d8 Channel matrix (#4146) 0311e174 Update cirq_google to import from cirq directly (#4156) bc4123ef Rename _channel_ to _kraus_ (#4139) b95c3657 Fix contrib-requirements (#4155) 3ea9c873 Consistent parameter indentation in README.rst (#4150) 705f37bd Slight speed up to notebook tests (#4147) fec7710b Improve docstring for operation_to_choi (#4143) 836bbda9 Consolidate dependencies (#4131) b28b1633 Choi representation (#4132) 6c72b5b9 Fix pathname in misc check tool (#4133) 71285d21 (De-)serialization of CircuitOperations (#3923) 0c0366b3 Add inverse method for Clifford tableau (#4111) 7d1e1685 Add then method for composing two Clifford tableaux (#4096) edbee2c8 bump cirq to v0.12.0.dev (#4121) 51d68847 Add tutorial on selecting qubits and calibrating for an experiment (#4108) 3e06fdf2 Add to_phased_xz_gate function for SingleQubitCliffordGate (#4050) 38ed9ac2 add binary_paintshop example to ionq (#4101) 83b211b8 floquet.ipynb - idiomatic numpy indexing (#4107) ce58f422 [XEB] Multiprocessing spawn (#4090) 5fdb80d9 [XEB] Theory notebook: fix pauli vs. depol error number (#4097) 115e50ed Remove separate script for nightly devsite diff (#4105) f7c1156c Updating notebook pip installs after v0.11 release (#4102) 849849d5 Provide sweep-iterator API. (#4094) b4c445f3 Use MeasurementKey in CircuitOperation (#4086)