Download Latest Version v1.6.1 source code.tar.gz (7.9 MB)
Email in envelope

Get an email when there's a new version of Cirq

Home / v1.5.0
Name Modified Size InfoDownloads / Week
Parent folder
cirq_pasqal-1.5.0-py3-none-any.whl 2025-04-10 33.8 kB
cirq_rigetti-1.5.0-py3-none-any.whl 2025-04-10 72.8 kB
cirq_web-1.5.0-py3-none-any.whl 2025-04-10 425.1 kB
cirq_google-1.5.0-py3-none-any.whl 2025-04-10 597.5 kB
cirq_ionq-1.5.0-py3-none-any.whl 2025-04-10 72.0 kB
cirq_aqt-1.5.0-py3-none-any.whl 2025-04-10 32.0 kB
cirq_core-1.5.0-py3-none-any.whl 2025-04-10 2.0 MB
cirq-1.5.0-py3-none-any.whl 2025-04-10 10.9 kB
README.md 2025-04-10 20.9 kB
v1.5.0 source code.tar.gz 2025-04-10 8.1 MB
v1.5.0 source code.zip 2025-04-10 9.4 MB
Totals: 11 Items   20.8 MB 1

Cirq v1.5.0 release

Summary

Added support for Python 3.13 and NumPy-2. Deprecated the Cirq-Rigetti package, which was changed to an opt-in component of the Cirq suite.

Deprecation of Cirq-Rigetti

The Cirq-Rigetti subpackage has been deprecated. For more details or to provide feedback, see [#7058]. Cirq-Rigetti needs to be installed explicitly using pip install cirq-rigetti as it is not included with the cirq installation anymore. Note that installation of Cirq-Rigetti requires a downgrade to Python 3.12 and NumPy-1.

cirq-core

Added BitMaskKeyCondition to provide multiqubit classical control conditions with bit masks. Added support to concatenate parameter sweeps as a new sweep. Added preliminary support for parsing OpenQASM-3. Improved MatrixGate decomposition to compensate for global phase change. Added function for computing Rényi entropy. Added transformers for cphase gauge transformation, simulation of depolarizing noise, and for performing randomized measurement protocol. Added contrib utilities for readout error benchmarking and an experimental workflow for Z-phase calibration of two-qubit gates.

API change

In next release the default value of the use_repetition_ids argument of the CircuitOperation will change from True to False. Please pass an explicit use_repetition_ids=True to preserve the current behavior of the code.

cirq-google

Enhanced serialization capability to support more circuit objects and parameter types for the cirq-google service backend. Added support for stimcirq gates and operations. Enhanced sweep proto messages with typed units and optional metadata. Added support for custom device parameter overrides for circuit execution.

cirq-ionq

Added definitions for the IonQ ZZGate and for device gatesets AriaNativeGateset and ForteNativeGateset. Added capability for circuit transpilation to native gatesets.

A Huge Thank You

Thank you to all our contributors for this release:

Alessandro Cosentino, Ashiq Firoz, Benno Bielmeier, Bharath Thotakura, Bicheng Ying, Chamod Perera, Codrut Grosu, Danni Wang, Dave Bacon, Dax Fohl, Divyanshu Verma, Doug Strain, Eliott Rosenberg, Festus Ayobami Owumi, Gaurav Gyawali, Ilya K. Drozdov, Jacob Selig, Justin Pan, K M Lau, Matthew Neeley, Michael A. Perlin, Michael Hucka, Nate Stemen, Nour Yosri, Pavol Juhas, Radu Marginean, Renyi Chen, richrines1, Rodolfo Carobene, Rohan Jain, Roland Siegbert, Ryan Hill, Rémi Doreau, Seneca Meeks, Shivansh Mittal, Victory Omole, William Courtney, Yash Gondhalekar

What's Changed

6e47e2ee Add classical conditions to cirq_google proto (#7250) da6ec5d0 Fix serialization error in cirq_google (#7260) 65a4105e Avoid using NotImplemented as a boolean (#7259) 66c630b3 Fix typos in XEB (#7254) 6fd52aa1 Do mild editing for grammar, consistency, and Markdown (#7246) cc4f208d Correct minor typo in BitMaskKeyCondition (#7251) b199b212 Fix issue [#7245]: update docs referring to calibration_api.ipynb (#7253) 9b367de0 Switch notebooks from dev to stable cirq where possible (#7247) bdf92492 Fix a few capitalization typos (#7244) 58d9619a Flip back to default use_repetition_ids=True in CircuitOperation (#7237) 5ee16b73 Fix docker installation for cirq_pre_release image (#7240) 0684419c Address pandas warning about deprecated DataFrameGroupBy.apply default (#7235) 0a326d07 Assume PhasedXPowGate is different from XPowGate and YPowGate (#7070) d39112e9 Add tuples, ndarrays, and complex numbers to cirq_google proto (#7226) 9fd4751a Ignore spurious PollerCompletionQueue errors in AsyncioExecutor (#6492) 02941bf6 Allow _mixture_ to return gates instead of just raw unitary matrices (#7048) d87d87e5 Fix EigenGate equality (#7057) a68adcd1 Compensate for global phase in MatrixGate decomposition (#7118) 5a81b3d1 Remove previously deprecated fields in cirq_google proto (#7183) 4436b853 Test qcircuit pdf generation without extra prepare_only argument (#7227) 9cb81ad9 Switch to unquoted type annotations part 1 (#7193) 24b07a80 Fix ALL THE COVERAGE (#7220) d909a6ef Recommend use of unquoted annotations in coding style guide (#7222) 11f0f516 Clarify docstring of is_parameterized (#7215) c34989b4 Improve cirq-dev installation command (#7213) f6187b39 Better stimcirq serialization (#7192) efabff10 Resolve issue [#7000] by adding PR labeler workflow (#7203) 586b3f63 Change a list of if statements into match (#7204) 75f0dd3b Add bytes to cirq_google proto (#7201) 4b87002b Revise Community section (#7199) b1409709 Fix [#5497]: update IonQ docs to remove decompose_operation (#7198) 8a3d1ef9 Create a new condition that allows easy control by bitmasks (#7166) 48195703 Update and make minor additions to docs/ in time for Cirq 1.5 (#7175) 250f1296 Sort import statements - no change in the effective code (#7195) fa18b82c Improve check of expected shell commands in check/format-incremental (#7196) 0f652e11 Update Zenodo info & correct a small typo (#7191) c3d315e6 Fix isort invocation in format-incremental (#7194) 3b268c25 Add isort for import linting (#7181) cdbc196e Avoid frequent test failure in greedy_test.py by increasing timeout (#7188) c95af3e0 Fix WaitGate for multiple qubits in cirq_google proto (#7189) 53d33312 Simplify python package description (#7187) 0eea89e8 Fix flakes in pauli_string_measurement_with_readout_mitigation_test (#7185) 80a63b90 Fix np.einsum type annotations (#7184) 815649ca Update _NPY_MAXDIMS (#7167) b3561b44 Add a tool for measuring expectation values of Pauli strings with readout error mitigation (#7067) eddb281d Add boolean support to cirq_google protos (#7177) ea1679d5 Deprecate Cirq-Rigetti (#7176) 71c3cf1d Clarify the license statement for examples/ (#7173) aaa66f67 Decouple cirq package from cirq-rigetti (#7170) 4bdf21fa Add missing license files & do minor updates to dot files (#7161) 2bfa1cda Add info to CITATION.cff (#7140) 43d033b5 Add ability to add custom tag (de)serializers (#7169) 840bb2bc Avoid Moment typechecks when (un)freezing circuits (#7150) ce317201 Fix moment commutation detection for group-commuting operations (#7082) 0551f85c Allow cirq-google installation with protobuf-5 (#7147) 5d59cf72 Ensure InsertStrategy.NAME is identical after pickle round-trip (#7138) abf6051b Update pass_operations_over with fixed conjugated_by (#7123) e014f4dd Small fixes of linalg.decompositions (#7128) b3af2ee3 Fix nondeterminacy in Circuit.insert (simplified) (#7043) 8073d4cf Fix deserialization of reset gates when dimensions missing (#7135) 5e7bc330 Add missing import of qiskit.qasm2 in unit test (#7137) 21675522 Support for stimcirq gates and operations in cirq_google protos (#7101) 78d30e70 Remove sweep_must_pass (#7124) 927f600b Add cphase_gauge (#7111) fe728560 cirq-google - get CZ gate noise properties from engine calibration data (#7116) 3b9ecebc Add magic square game (#7109) 6ff3d66f [Bugfix] Re-allow non-integral line/grid qubits (#7110) 2ad41366 Correct the sweep order example in the docstring (#7104) fe946a12 Use fixed PauliString.after() (#7103) 22ed25ed Fix conjugated_by of PauliString (#7065) 8f2f1981 Ensure SycamoreGate instances are preserved over serialization (#7093) 61548e0d Fix decompose for controlled CZ gates with phase shift (#7071) 60551b42 Partial support of reset gate in cirq_google protos (#7095) 09432f66 Fix [#6970]: mention release cadence (#7099) d8ec3e47 Remove apt package pandoc and add shellcheck (#7096) 094eb9a7 Add badge for OpenSSF score (#7097) 9604ab18 Add warning about GenAI code generation (#7098) 7a834a05 Remove arg_function_language (#7092) 96583fe7 Add a .editorconfig file (#7081) 931bc666 Increase min version of Python Requests for multiple security advisories (#7075) aee2c30c Support parameters in InternalTag (#7060) e3b46a1f Increase min version of Python tqdm for security (#7076) f30e6d4b Remove rST-specific code in snippets_test.py (#7085) a2bf6e8b Add workflow for OpenSSF Scorecard (#7074) ca6ceb37 Allow ability to plug in custom (de)serializers for cirq_google protos (#7059) d5c2b414 Make mypy pass no matter if qsimcirq is installed or not (#7063) dd3df78c Fix the format of CliffordGate repr (#7046) bc9fc97c Improve the readability of CliffordTableau _full_str_ function (#7047) 1c55f3fe Partial Support for tags in cirq_google protos (#7044) 83f3579c Add NDArrays to cirq-google protos (#7032) e2de439e Remove [float,int] unions from type declarations (#7042) 7f461218 Add InternalTag to support non-public tags (#7040) 72e1d203 Clean up redundant complex type unions (#7041) 14d61c8d Compile to ZZ gate instead of MS for Forte backends when transpiling to native IonQ gates (#6973) d589bfcc Move coverage configuration to pyproject.toml (#7038) dee2c5cd Allow symbolic scalars in linear combinations (#7030) 35322ae3 Specify long_description_content_type so that PyPI accepts wheels (#7035) cc82f526 Fix QASM lexer when identifiers start with keywords (#7018) 6c9db55b Move moment index into circuit message (#7008) 5c198ce2 Allow symbolic scalars in LinearDict (#7003) 0e5db120 Enable test of the Contract-a-Grid-Circuit.ipynb notebook (#7015) 5e8466bf Avoid CI flake due to random-seed-dependent test (#7016) 6b2f4d70 Update and refresh cirq-* module README files (#6900) aba898c6 Minor edits and updates to Markdown files in docs/ (#7009) bb10251b Reformat miscellaneous .md files outside of docs/ (#6999) d936ee32 Overhaul top-level README and convert to Markdown (#6988) 4a123091 doctest - exclude third-party sources in node_modules (#7011) 3208b947 Add snapshot_id to get_sampler interface on engine object (#7005) 08b1efb8 Streamline proto serialization of circuits with duplicate operations (#6991) 6ebc78b5 Fix check/nbformat installation and execution (#7004) 0e5df4e2 Fix mapped measurement keys of repeat_until fields in CircuitOperations (#6881) e6c11014 Fix logic for handling repetition_ids in CircuitOperation.replace (#6984) 785fd1cb Update .markdownlintrc (#6990) d1503716 Bump grpcio-tools from 1.59 to 1.62 (#6976) 238ce873 Use encoding UTF-8 when opening files (#6989) ab62c254 CI - run the pytest-numpy-2 job also with Python 3.13 (#6974) b4190e9d Add PyPI keywords and edit maintainers name (#6992) b73eb280 Add a default fallback for the equal_up_to_global_phase protocol (#6950) 435f3e15 Support numpy qid indexes (#6987) 79d562ad Update scientific Python core dependencies per NEP-29 and SPEC-0 (#6975) 0f21e0a2 Implement _value_equality_approximate_values_ for PhasedISwapPowGate (#6959) 48aadd03 Perf optimization for building circuits using only appends (#6882) ebbaad6b Replace OpTree with OP_TREE (#6960) 4206cb15 Fix classical conditions getting optimized ahead of their measurements (#6872) 870860f3 Optimize qubit hash for Set operations (#6908) eec204f2 Add a function for running circuits in a shuffled order with readout error benchmarking (#6945) 9945db64 Apply as_sweep for SqrtCZGauge (#6931) 55c592be [cleanup] Remove unused GridParallelXEBMetadata class (#6909) 05bb69a0 Refactor engine client test_create_job test names for better clarity and consistency (#6885) 0a955cc9 Correct noise channel approximate equality (#6632) 426178ba Revert "#6586 - Avoid DivisionByZero error when TensorNetwork simplifies to a scalar" (#6958) 2b49589f Support custom gate defintions in QASM parser (#6917) 3a835dd9 Add a new sweep metadata from/to proto approach (#6925) 1efa25c6 Add construction examples to docstrings of ClassicallyControlledOperation (#6913) 57d9d21c Streamline proto serialization of circuits with duplicate moments (#6941) 5ab78696 Improve __pow__ for SingleQubitCliffordGate (issue [#6327]) (#6919) be8b04b2 Pass sweep_transformer recursively (#6951) df776a06 Add YAML file linter (#6896) 0b796d13 Fix order preservation in align_right (#6899) 84adca96 Handle qudits in drop_terminal_measurements (#6879) 2949afdc Improve __str__ and __repr__ for SingleQubitCliffordGate (issue [#6326]) (#6920) b127bb73 Consider all-false invert_mask equal to no invert_mask (#6952) 2933c726 Fix qasm tests for qiskit 1.0 (#6927) 0361a81c Fix dd issue in calling PauliString.after (#6943) cd9a3ff2 Remove notebooks refering to removed service (#6580) 63e4c7d8 Disallow passing types as tags (#6947) 326a287f Add Markdown file linter (#6895) f596c43b Make qubits a memoized property of Moment (#6894) 7f66b421 Add info to examples/README.rst & convert to Markdown (#6889) 7bb36c32 Remove references to run_batch in engine docs (#6948) 988ecbc1 Adjust some more TeX expressions for rendering in web docs (#6942) 3a130418 Support inverse gate JSON seralization (#6912) 5d317bad Add recommended files for community support & update CONTRIBUTING.md (#6898) dbada0e1 Add bitwise option to Sympy evaluator for classical controls (#6914) ecf9ed75 Re-enable streaming Engine interface (#6930) bb86fb15 Avoid flaky test execution in z_phase_calibration_test (#6928) 9ada8a81 Fix flaky curve fitting tests (#6916) 25b33621 Fix diagram for Identity with no qubits (#6926) 3e16e15a Apply as_sweep for iswap_gauge, spin_inversion_gauge, sqrt_iswap_gauge (#6911) b5a04f04 Fix documentation for PhasedXZGate (#6870) 5ffb3add CircuitOperation: change use_repetition_ids default to False (#6910) b840178f Add metadata into single sweep (#6869) 83a8e0e5 Add examples for transform_qubits function (#6915) c5d29fe9 Add documentation for QASM export (#6891) 4ad58f6f Return NotImplemented for diagram info for empty PauliStringPhasors (#6880) 0f8701fc Add more informative message for improper cirq.qasm arguments (#6905) 59ab27ac Infer QASM for classical KeyConditions in circuit (#6871) 32bf399f Fix exponent location on classically controlled diagrams (#6897) e446d74d Replace references to "master" branch with "main" (#6888) 686766fc Support run_sweep in GaugeTransformer. Pioneered in the CZ Gauge (#6852) 29d99d36 Create a transformer cancels the effect of Z-phases (#6837) 0d9a6ee7 Allow passing a callable to de/serialization funcs (#6855) 324a086f Make DensityMatrixSimulator more numerically stable (#6850) ea605d48 Disable local Google Cloud credentials in tests (#6851) 4d03aea7 Add ability to pass tags to XEB and related methods (#6836) 2e79aa7a Support serialization of sweeps with tunits (#6829) f07a4b50 Add Concat to cirq-google sweep proto (#6821) e9fbabce Support "cu1", "cu3", and "crz" in QasmParser (#6820) def1b080 Add Concat to Sweeps (#6819) 35733fd4 Disable streaming by default (#6818) e61e3be1 Add zip_longest support to the cirq_google sweep proto (#6815) 495d913e Divert cirq.Sampler's run_batch to run_batch_async (#6813) 429bb9b2 Add parsing of the reset instruction to QASM parser (#6710) 550555d6 Vectorize readout mitigation (#6812) d760f00e Add option to specify batch size (#6809) e0087b06 Allow measurement keys with differing qubits in OpenQASM (#6803) 76125a23 Force decimals in scientific notation for OpenQASM 2.0 (#6802) 02f2f845 Preliminary support for parsing OpenQASM 3.0 (#6797) 2991e808 Update docs to use quantumai-oss-maintainers@googlegroups.com (#6804) 7096acdf Fix Moment.resolve_parameter for constant sympy expressions (#6794) f2c7330a Preliminary support for outputting to OpenQASM 3.0 (#6795) 326df25f Add custom args to value equality (#6799) dc8a43bb Fix phase_by protocol for tagged operations (#6792) 30f5b482 Create a way to encode general functions (#6788) fd95547a Replace type_workarounds.NotImplementedType with types.NotImplementedType (#6790) d1b0430d Add DynamicalDecouplingTag to cirq-google (#6782) 4bc068c4 Add throttle for jobs run with ProcessorSampler (#6786) 170b20bc Parallel XEB: Add option to specify pairs (#6787) 59be462b Create workflow for Z-phase calibration (#6728) 81d3fd99 Limit the number of db reads using duet.Limiter (#6783) ae6e4e4a Support TUnits in circuit serialization (#6781) c0b8aedd Batch circuit submit in cirq_ionq (#6652) 7a7ef2ba Create an insertion_sort transformer and incorporate it into the transpiling protocol (#6776) f9ed1484 Transpile to native IonQ gates (#6572) 81f66b99 Add request limiter when polling for results (#6774) 351a08e5 Add TypedUnits to the requirements of cirq-google (#6773) 01b0c125 Update pyquil dependency and remove workaround pinning of quil (#6763) e8e53da9 Mark QSD QFT5 with xfail (#6767) 9ff9b6be Use pytest fixture for multiprocessing Pool in XEB tests (#6766) 54f9e8c7 Allow external users to use snapshot_id (#6739) 57183653 Fix Quantum Shannon Decomposition (#6756) 95204668 coverage - exclude code guarded by if TYPE_CHECKING (#6753) 769ad501 Update copyright checker and switch to pylint-3 (#6751) 55b2c308 CI - fix flaky type check failure in cirq.vis.heatmap (#6750) 95f6a3f1 CI - fix flakiness of stream_manager_test on Windows (#6749) ce1d9035 Restore cirq_google.api.v2 protos deleted in 6442 (#6746) 756abe31 Dynamical decoupling: Support pulling through the whole circuit with non-clifford moments (#6718) bb24dae0 Update the const proto field name (#6744) 2bbc3c4c CI - add temporary job pytest-numpy-2 to test with NumPy-2 on Ubuntu (#6740) 3fefe298 Fix [#6706] – Update sources for compatibility with NumPy 2 (#6724) d15549c9 Exclude conftest.py files from enforcing changed-code coverage (#6738) 484df6f3 Silence pytest warnings about asyncio fixture scope (#6736) ad29fa87 Fix Rigetti check for Aspen family device kind (#6734) d74e0dce Add support for const sweep with None (#6729) 2adc2189 Implement and enforce explicit re-export for cirq modules (#6722) 19af193e Update node dependencies & generate bundled JavaScript files (#6720) f56a799c Introduce a generic value type for DeviceParametersDiff proto (#6712) f0ead96a Limit maximum multiprocessing pool size in xeb tests (#6713) 6037f184 Update sources for mypy-1.11.1 (#6707) e3fbf20d Stop using deprecated module pkg_resouces (#6708) d94c457b Add IdentityGate._commutes_ (#6702) 8d8a6c57 Enable pulling through Clifford operations, also add an option of only applying dd to single qubit gate moments (#6675) 16401168 Avoid CI flakes due to random-seed-dependent unit tests (#6700) e2e8aefa Mark ProjectorSum class as unhashable (#6701) 5377fff5 Test hash consistency of cirq objects loaded from a pickle (#6677) 51e8c3d4 Fix recent type check failure in the CI (#6699) c6b69a2d Update NumPy APIs that will be removed in numpy-2.0 (#6693) cd3182a3 Move Coupler to cirq_gooogle.ops (#6697) 978b5e39 Add serialization for Coupler Qids (#6682) 3fee420b Add validation for couplers (#6681) 60ab3c0a Eliminate awful slowdown of EigenGate._value_equality_values_ (#6695) 2e510148 Fix docstrings for the ionq GPIGate and GPI2Gate (#6694) c25678ef np.infty no longer supported in NumPy 2.0 (#6692) 94f1e094 Exclude all setup.py files from typecheck (#6690) bae02e4d Allow using protobuf version 5 and later (#6683) c58a05c3 Add GridCoupler Qid to cirq_google (#6678) bc4cd6d6 Added random single-qubit CUE and Clifford gates (#6670) 45a6bbbd Fix XEB error rate computation (#6673) ee934fe4 Use np.complex128 for simulating xeb circuits (#6672) df20ade1 Fix bug that caused XEB to fail when requesting depth > 100 (#6671) 8d09a322 Fix equality for cphase gate initialized with sympy constant (#6669) 75b3f408 Adds tools for appending randomized measurement bases and processing renyi entropy from bitstring (#6664) 3922a63a Add noise amplification transformer (#6665) 5d22a538 Support creating XEB calibration options for arbitary FSim like gates (#6657) 590a9f5f Update files to conform to new mypy standard (#6662) 32d48331 Change to optimize_for_target_gateset in docs (#6658) da5c3b51 Add uncorrelated readout error mitigation for arbitrarily long Pauli strings (#6654) ac63c604 cirq_pasqal getting_started.ipynb - enforce single operation per moment (#6656) 9c836ba3 Fix error on MSGate unitary matrix (#6645) 4b8e8e41 Enforces specifying run_name and device_config_name on Engine interfaces (#6649) 0aae3c12 CI - add Python 3.12 tests to ci-daily (#6605) 71c79da7 Allow highlighting a subset of qubits when displaying heatmap (#6642) 2c993f8d Pass metadata to sweeps (#6644) 5f7881ff Remove implicit thread creation in XEB sampling (#6643) 03aa5114 Allow passing None to AbstractCircuit.from_moments (#6637) ac3a70fc Make implicit Optional type hints in Quantum Engine PEP 484 compliant (#6640) 543d9cd4 Fix Xa*Zb*Zb*Zb works but Xa*Zb**3 (#6618) 16de0690 Improve replace_version tool and development wheels (#6626) d077532d Add a new proto DeviceParametersDiff which provides a compact way to bundle multiple DeviceParameters and their values (#6583)

Source: README.md, updated 2025-04-10