Releases: quantumlib/Cirq
v1.4.1
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
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
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...
v1.2.0
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 acirq.DecompositionContext
that contains options such as acirq.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 ofcirq.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
- Bump cirq version to 1.2.0 by @tanujkhattar in #5969
- Make AsyncioExecutor a shared resource across EngineClients by @wcourtney in #5976
- Add single-qubit detuning parameters to CouplerPulse by @wcourtney in #5971
- Bump json5 and tsconfig-paths in /cirq-web/cirq_ts by @dependabot in #5975
- Fix bug in documentation of phase_flip and bit_flip methods by @tanujkhattar in #5977
- Fix link to noise models by @nickdgardner in #5990
- Add M and R aliases for cirq.measure and cirq.reset by @maffoo in #5993
- Bump http-cache-semantics from 4.1.0 to 4.1.1 in /cirq-web/cirq_ts by @dependabot in #5997
- Removing unnecessary return statement in cirq-core/cirq/circuits/moment.py by @joesho112358 in #6004
- Reducing some code by cleaning up some logic by @joesho112358 in #6003
- Retry bad_gateway in cirq-ionq by @Cynocracy in #6006
- Add
__cirq_debug__
flag and conditionally disable qid validations in gates and operations by @tanujkhattar in #6000 - Fix an error in qvm_stabilizer_example.ipynb by @yinghui-hu in #6010
- Pin Node version by @vtomole in #6014
- IonQ: Handle 409 errors that are injected by Cloudflare by @Cynocracy in #5292
- Bump ipython from 7.31.1 to 8.10.0 in /dev_tools/requirements/deps by @dependabot in #6015
- Correct invalid URLs found in notebook files by @pavoljuhas in #6022
- Adding dimension property to comparison of XPowGate and ZPowGate by @joesho112358 in #6005
- Speed up parameter resolution by checking if val is parameterized and caching the boolean by @tanujkhattar in #6023
- MatrixGate names don't survive serialization by @markedmiston in #6026
- Bump node-fetch and puppeteer in /cirq-web/cirq_ts by @dependabot in #5998
- Simplify dev_tools.notebooks.utils.rewrite_notebook by @pavoljuhas in #6030
- Fixed type annotations in _BaseLineQid and _BaseGridQid by @sarahsor in #6043
- Remove outdated workaround for a bug in black formatter by @pavoljuhas in #6045
- Update and correct pow function for PauliSum by @TarunSinghania in #6019
- Ensure compatible version of numpy in isolated_notebook_test.py by @pavoljuhas in #6038
- pytest - keep "slow" tests deselected after
-k EXPRESSION
by @pavoljuhas in #6034 - Prevent notebook tests from changing the pytest Python environment by @pavoljuhas in #6032
- Install recent version of ply in interop.ipynb by @pavoljuhas in #6033
- Fix failing CI after Pandas 2.0 update by @tanujkhattar in #6051
- Change dtype repr for Numpy 1.24 by @bnavigator in #5991
- Refactor and speed up
cirq.transformers.stratify
by @perlinm in #6013 - Update cirq.contrib.svg to escape < and > characters by @tanujkhattar in #6055
- Escape both
<>
characters in SVG test labels by @pavoljuhas in #6056 - Add weekly CI workflow to test all notebooks by @xXnathankerrXx in #6046
- Use hash of all requirements files in cache keys for ci by @maffoo in #6061
- Update to mypy 1.2 by @maffoo in #6059
- Verify error reporting from the CI-weekly run by @pavoljuhas in #6060
- Use PEP-673 Self type annotations by @maffoo in #6057
- Bump webpack from 5.40.0 to 5.76.0 in /cirq-web/cirq_ts by @dependabot in #6035
- add phase_by method to ZZPowGate by @richrines1 in #6062
- Restore weekly cadence for the CI-weekly workflow by @pavoljuhas in #6066
- Adds User-Agent header to requests by @splch in #6065
- Document json_namespace usage by @95-martin-orion in #6069
- Removing Obsolete json files by @dstrain115 in #6071
- Fix matplotlib deprecation warning by @dstrain115 in #6072
- Access
_row
and_col
attributes directly inGridQubit
instead of using properties by @maffoo in #6075 - Add ZipLongest to cirq_google by @dstrain115 in #6074
- Fix Default InsertStrategy in Circuits Notebook by @xXnathankerrXx in #6079
- Add
Moment.from_ops
to more efficiently construct moments by @maffoo in #6078 - Apply suggestions from CommonTypos checker by @pavoljuhas in #6082
- Fix cirqdev gitter URL by @pavoljuhas in #6084
- Keep up with quimb-1.5.0 by @pavoljuhas in #6087
- Remove deprecated argument of pyplot.stem by @pavoljuhas in #6086
- Fix image links by @yinghui-hu in #6085
- Override gate.controlled() for GlobalPhaseGate to return a ZPowGate by @tanujkhattar in #6073
- Unblock test that requires sympy-1.12 by @pavoljuhas in #6096
- Fix typos in notebooks.md and a plenty of relative links by @pavoljuhas in #6089
- GridDevice serialization refactor by @verult in #6094
- Add metadata to sweeps by @dstrain115 in #6099
- Accept all_qubits in GridDevice._from_device_information() to allow isolated qubits by @verult in #6103
- Bump requests from 2.24.0 to 2.31.0 in /dev_tools/pr_monitor by @dependabot in #6104
- Loosen
networkx
requirements by @vtomole in #6105 - Make
Collector
andPauliSumCollector
work withAbstractCircuit
by @maffoo in #6109 - Add Parameter to cirq_google by @dstrain115 in #6102
- Update cirq.decompose protocol to perform a DFS instead of a BFS on the decomposed OP-TREE by @tanujkhattar in https://github.com/quantumlib/Cirq/p...
Cirq v1.1.0
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
- Support multi-qubit measurements in deferred measurement transformer by @daxfohl in #5787
- Avoid warning on complex-to-float conversion by @pavoljuhas in #5795
- Post 1.0 version policy and release process by @verult in #5747
- Add Observables and PauliStrings by @augustehirth in #5750
- Add QVM pages and mentions in other pages by @augustehirth in #5794
- Update pasqal getting started tutorial to 1.0 by @dstrain115 in #5798
- Links and titles by @augustehirth in #5799
- Bump Cirq version to v1.1.0 by @MichaelBroughton in #5796
- Revert "Add Cirq 1.0 tab to TP." by @MichaelBroughton in #5797
- Fix README links by @95-martin-orion in #5802
- Document fix by @thisisjaymehta in #5807
- Minor style changes to qvm builder code notebook by @augustehirth in #5808
- Add
{Frozen}Circuit.from_moments
to construct circuit by moments. by @maffoo in #5805 - Remove alpha notice. by @MichaelBroughton in #5811
- No qudit Y gate by @viathor in #5814
- Convert iterator to list to list before looping through moments in
def insert
by @vtomole in #5820 - Add binary literal example to methods of SimulatesAmplitudes class by @Caffetaria in #5818
- Add nodes_to_linequbits method to LineTopology by @Caffetaria in #5821
- Created routing utilities subdirectory in cirq-core/transformers and added MappingManager module by @ammareltigani in #5823
- Added str and repr for MappingManager and pushed name 'MappingMananger' to 'cirq' namespace by @ammareltigani in #5828
- Adds AbstractInitialMapper base class and IdentityInitialMapper by @ammareltigani in #5829
- Creates fake grid device for testing qubit connectivity in routing by @ammareltigani in #5830
- Fix mypy type check errors due to sympy update by @tanujkhattar in #5836
- Reduce
atol
in two qubit isometry analytical decompositions to fix failing tests on CI by @tanujkhattar in #5837 - Implements the LineInititialMapper strategy by @ammareltigani in #5831
- Changed mapping manager to use floyd warshall by @ammareltigani in #5843
- Added a public routing swap tag by @ammareltigani in #5844
- Potential fix for unclickable sidebar heading by @augustehirth in #5842
- Fix docstring for
cirq.map_operations
by @tanujkhattar in #5849 - Fix phase in factor by @daxfohl in #5847
- Restrict numpy version to unblock inflight PRs from failing by @tanujkhattar in #5853
- Adds unitary testing for routed circuits by @ammareltigani in #5846
- Adds the main transformer to do routing in Cirq by @ammareltigani in #5838
- Enable testing of cirq_google notebooks. by @dstrain115 in #5766
- Fix typing complaints showing at numpy 1.23 by @pavoljuhas in #5856
- Change to use virtual engine in cirq_google docs by @dstrain115 in #5858
- Fix asv setup and add benchmarks for circuit construction by @tanujkhattar in #5845
- Fix mypy error on master by @tanujkhattar in #5865
- Add benchmarks for parameter resolution by @tanujkhattar in #5864
- Remove TODO markers for fixed issues by @pavoljuhas in #5871
- Add performance benchmarks for CQC circuit routing by @tanujkhattar in #5869
- Added visualization for qubit permutations for routed circuits by @ammareltigani in #5848
- Replace pure python loops with numpy where possible in channels.py. by @MichaelBroughton in #5839
- Tell git to ignore build directories from distutils by @pavoljuhas in #5875
- Fix docstring typos in cirq.devices submodule by @pavoljuhas in #5876
- Adds tutorial ipynb for routing as a transformer by @ammareltigani in #5877
- Speeds up RouteCQC by encoding qubits as integers by @tanujkhattar in #5872
AbstractCircuit.freeze
should not reallocate moments by @vtomole in #5878- Use pytest-randomly for reproducible random test parameters by @pavoljuhas in #5868
- Bump got and gts in /cirq-web/cirq_ts by @dependabot in #5881
- Remove a few debug prints from tests by @vtomole in #5879
- Use GitHub tarball for tensorflow-docs dependency by @pavoljuhas in #5882
- Add performance benchmarks for single qubit randomized benchmarking by @tanujkhattar in #5866
- Generalize filtration of dev requirements that can't be uploaded to pypi by @vtomole in #5886
- Bump node-forge and webpack-dev-server in /cirq-web/cirq_ts by @dependabot in #5854
- Bump json-schema and jsprim in /cirq-web/cirq_ts by @dependabot in #5887
- Address nits in Single Qubit Randomized Benchmarking benchmarks: by @tanujkhattar in #5885
- Fix failing imports from httpcore by @pavoljuhas in #5891
- Bump up the minimum required version of ply by @pavoljuhas in #5890
- untangle entangled tests by @pavoljuhas in #5892
- Optimize circuit/moment resolution to reuse instances if possible by @maffoo in #5894
- Implement the inverse of IonQ native gates by @yitchen-tim in #5889
- Speed up circuit construction when contents are a list of moments by @tanujkhattar in #5898
- Fix test failure on differing precision of float in proto string by @pavoljuhas in #5911
- Small housekeeping in check/pytest by @pavoljuhas in #5899
- Fix issues reported by shellcheck by @pavoljuhas in #5910
- Allow qudits in deferred measurements by @daxfohl in #5850
- Handle confusion matrices in deferred measurements by @daxfohl in #5851
- Add version compatibility policy guidelines for Cirq by @tanujkhattar in #5897
- Add apply_channel optimizations for reset and confusion by @daxfohl in #5917
- Remove checks so that
hold_time
is sweepable by @eliottrosenberg in #5919 - Remove
id
from top-level notebook structure. by @markmcd in #5874 - Add support for arbitrary angles to IonQ native MS Gate by @gmauricio in #5920
- Add support for repeated keys in result protos by @maffoo in #5907
- Allow symbol for coupling_mhz in CouplerPulse gate by @maffoo in #5908
- Fix sympy error by @dstrain115 in #5930
- Fix typo by @viathor in #5935
- Simplify controlled gate for SumOfProducts by @daxfohl in #5873
- Bump terser from 5.7.0 to 5.15.1 in /cirq-web/cirq_ts by...
Cirq v1.0.0
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
- Fix for issue #5637 by @mhucka in #5638
- Remove stale TODO and fix #5546 by @tanujkhattar in #5643
- Bump cirq version to 0.16.0 by @MichaelBroughton in #5640
- Change GridDeviceMetadata qubit type to GridQubit by @verult in #5633
- Fix small issues in Shor tutorial by @dstrain115 in #5639
- Fix CI failure due to incompatible qiskit packages by @pavoljuhas in #5661
- Fix typing of the protocols.commutes() function by @pavoljuhas in #5651
- Remove GlobalPhaseOperation and GateSet.accepts_global_phase by @daxfohl in #5663
- Add init.py to make
cirq.contrib.hacks
a proper package by @maffoo in #5662 - Remove tetris_concat by @daxfohl in #5659
- Migrate StrategyExecutor to new transformer infrastructure by @ammareltigani in #5644
- Add return-type description for
cirq.sample
by @95-martin-orion in #5649 - Pin python-rapidjson in cirq-rigetti. by @MichaelBroughton in #5666
- Fix typing in numpy function arguments by @pavoljuhas in #5657
- Minor updates to development page by @dstrain115 in #5667
- Replace
SwapPermutationReplacer
withcirq.map_operations
by @tanujkhattar in #5655 - Engine creator helper function by @augustehirth in #5658
- Fix more numpy / mypy typing issues by @pavoljuhas in #5669
- Deprecate
MergeNQubitGates
optimizer by @tanujkhattar in #5653 DensePauliString
andMutableDensePauliString
docs and inconsistencies fixes by @tanujkhattar in #5624- Missing stubs for mypy --next by @dabacon in #5670
- Update docstrings for PauliSum. by @MichaelBroughton in #5596
- Change GridDeviceMetadata gate duration property to Mapping type by @verult in #5656
- Modify some numpy types to be compatible with
numpy>=1.20
by @vtomole in #5668 - Revert "Pin python-rapidjson in cirq-rigetti." by @vtomole in #5671
- Remove deprecated ArithmeticOperation by @daxfohl in #5579
- Remove quantum engine sampler by @dstrain115 in #5673
- Remove deprecated experiments by @dstrain115 in #5674
- Remove key protocols frozenset conversion by @daxfohl in #5660
- Remove PasqalConverter deprecation. by @MichaelBroughton in #5672
- Fix remaining mypy/numpy errors by @pavoljuhas in #5677
- Call
cirq.testing.assert_equivalent_repr
forcirq.SingleQubitCliffordGate
andcirq.CliffordTableau
by @vtomole in #5664 - Remove ops.Moment deprecation. by @MichaelBroughton in #5682
- Remove sim v0.16 deprecations by @daxfohl in #5645
- Deprecate classes and paramters in contrib by @dstrain115 in #5684
- Refactored and created an abstraction for control values by @NoureldinYosri in #5362
- Document dimension of X/ZPowGate by @95-martin-orion in #5648
- Link out to ParamResolver in resolve_parameters docstring by @95-martin-orion in #5699
- De-indent channel matrices by @95-martin-orion in #5700
- Remove deprecated SingleQubitGate by @dstrain115 in #5686
with_probability
docstring by @95-martin-orion in #5697- A Cauldron of Doc fixes by @dstrain115 in #5680
- Fix 5702: prevent confusing error if
dev_tools/modules.py
is invoked without arguments by @mhucka in #5706 - Use
@cached_method
for FrozenCircuit properties by @maffoo in #5707 - Remove deprecated stratify module by @dstrain115 in #5714
- Loosen
pyquil
requirements by @vtomole in #5681 - Remove deprecated class PauliTransform by @pavoljuhas in #5703
- Two more small doc fixes by @dstrain115 in #5711
- Remove CrossEntropyResult and CrossEntropyResultDict by @dstrain115 in #5687
- Cirq monofsv cleanup by @95-martin-orion in #5685
- Remove deprecated netural_atoms classes by @dstrain115 in #5695
- Remove Deprecated Quil classes by @dstrain115 in #5710
- Change exponent asterisks in doc string to carats by @dstrain115 in #5716
- Remove remaining quil magic methods by @dstrain115 in #5723
- unleash confusion map by @pavoljuhas in #5717
- Remove final_state_vector deprecations. by @MichaelBroughton in #5720
- Dedicated method for creating circuit from op tree with EARLIEST strategy by @daxfohl in #5332
- Remove virtual_predicate deprecations. by @MichaelBroughton in #5724
- Remove deprecated merge_single_qubit optimizer by @dstrain115 in #5725
- Improve common_gates docstrings by @95-martin-orion in #5722
- remove 2 deprecated create_device_proto_* methods for v0.16 release by @kmlau in #5704
- Remove a batch of deprecated optimizers by @dstrain115 in #5727
- Finish removing optimizers by @dstrain115 in #5729
- More numpy types by @vtomole in #5683
- Improve Fourier Checking tutorial by @dstrain115 in #5708
- Remove circuits.CircuitDag by @dstrain115 in #5733
- Nitpick on comment after #5724 by @pavoljuhas in #5732
- Fix 5701: avoid
dev_tools/modules.py print_version
failing by @mhucka in #5705 - Add async methods to AbstractEngine and AbstractJob by @maffoo in #5555
- Remove deprecated calls in examples/bcs_mean_field by @dstrain115 in #5737
- Eigengate docs: move init to class docs for better rendering by @dstrain115 in #5735
- Fix the definition of PhasedFSimGate by @eliottrosenberg in #5736
- Add json serialization to sweeps by @dabacon in #5618
- Fix reference to
run_batch
inrun_batch_async
docs by @maffoo in #5740 - Fix incomplete sentences by @augustehirth in #5741
- GridDevice: Exclude MeasurementGates in validation of qubit pairs by @verult in #5654
- Cache the hash of frozen circuits to avoid recomputing by @maffoo in #5738
- Remove gatesets deprecations. by @MichaelBroughton in #5679
- Remove deprecated class SerializableDevice by @pavoljuhas in #5743
- Remove unused method SimulationState.with_qubits by @pavoljuhas in #5748
- Fix very trivial grammar issues & typos in docs/start/basics by @mhucka in #5752
- Re-enable doctest by @dabacon in #5742
- json serialize SharedRuntimeInfo.device by @pavolju...
Cirq v0.15.0
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 ofcirq.circuits.Moment
. Recommended use is stillcirq.Moment
. cirq.QuilOutput
has moved tocirq_rigetti.quil_output.QuilOutput
and will be removed in a future version.Circuit.tetris_concat
is moving toCircuit.concat_ragged
.Circuit.final_state_vector
will no longer support positional arguments and will no longer supportqubits_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 newSimulationTrialResult
objects instead.SparseSimulatorStep
will no longer use thesimulator
argument.OperationTarget
will be replaced withcirq.SimulationStateBase
.SimulationState
and children classes (i.e.StabilizerSimulationState
) will no longer support positional args and log_of_measurement_results (replaced byclassical_data
arg).DensityMatrixStepResult
will no longer supportsimulator
parameter.StepResult
has had mutators deprecated in favor of constructing new objects.SimulationProductState
changed argument names tosim_state
.StateVectorSimulatorState
no longer used.ActOnArgs
(and variants) have been replaced by<variant>SimulationState
.StateVectorSimulationState
swap_target_tensor_for
andsubspace_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 newcirq.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
andleast_squares_xeb_fidelity_from_probabilities
deprecated in favor ofcirq.experiments.xeb_fitting
.generate_boixo_2018_supremacy_circuits_v2
,generate_boixo_2018_supremacy_circuits_v2_grid
andgenerate_boixo_2018_supremacy_circuits_v2_bristlecone
has moved torecirq.beyond_classical
module.CrossEntropyResult
,cirq.experiments.xeb_fitting.XEBCharacterizationResult
deprecated in favor ofcirq.experiments.xeb_fitting.XEBCharacterizationResult
.build_entangling_layers
deprecated in favor ofcirq.experiments.random_quantum_circuit_generation
.collect_grid_parallel_two_qubit_xeb_data
moved torecirq.benchmarks.xeb.collect_grid_parallel_two_qubit_xeb_data
.compute_grid_parallel_two_qubit_xeb_results
moved torecirq.benchmarks.xeb.compute_grid_parallel_two_qubit_xeb_results
.measurement_key_names
protcol will use frozensets.act_on
protocol will change argumentarg
name tosim_state
.PauliTransform
replaced in favor ofDensePauliString
.GlobalPhaseOperation
useglobal_phase_operation
instead.ArithmeticOperation
going away in favor of justArithmeticGate
.Gatesets
no longer haveaccept_global_phase_op
argument, instead a user must provide thecirq.GlobalPhaseGate
.NoiseModelFromNoiseProperties
virtual_predicate
renamed tois_virtual
.QuirkArithmeticOperation
deprecated in favor ofcirq.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 tocirq-core
.SimulatedLocalProcessor.get_device
andEngineProcessor.get_device
no longer requires agate_sets
parameter.EngineProcessor.list_calibrations
parameter names changed fromlatest_timestamp_seconds
tolatest_timestamp
andearliest_timestamp_seconds
toearliest_timestamp
.QuantumEngineSampler
deprecated in favor ofcirq_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 requiregate_sets
parameter.Engine.sampler
replaced withEngine.get_sampler
.get_engine_device
now no longer requiresgate_sets
parameter.SerializableDevice
andSerializableGateset
are going away in favor ofCircuitSerializer
andGridDevice
metadata information.optimize_for_{xmon,sycamore}
are going away in favor ofcirq.optimize_for_target_gateset
using the xmon and sycamore gatesets.
What's Changed
- Add iterator support for AbstractJob by @dstrain115 in #5136
- Pin Jinja2 version for build_docs CI. by @MichaelBroughton in #5138
- Bump cirq version to 0.15.0 by @MichaelBroughton in #5134
- Bump minimist from 1.2.5 to 1.2.6 in /cirq-web/cirq_ts by @dependabot in #5140
- Remove deprecated two_qubit_matrix_to_diagonal_and_operations and two_qubit_matrix_to_operations by @tonybruguier in #5102
- Fix broken caching in CliffordGate and add test by @dabacon in #5142
- Cleanup docs/noise.ipynb in preparation for Cirq 1.0 launch by @tanujkhattar in #5147
- Speed up a slow transformer test by @dabacon in #5146
- Make pylint parallel by @dabacon in #5144
- [workflow] Preliminary timing information by @mpharrigan in #5021
- Add docstring for
cirq.TRANSFORMER
public object by @tanujkhattar in #5149 - Base class for quantum states by @daxfohl in #5065
- Allow any object with supporting protocols to be the action in act_on by @daxfohl in #5111
- Fix raiser is not callable. by @MichaelBroughton in #5155
- Corrected result.data implementation. by @MichaelBroughton in #5153
- Support specific IonQ targets (qpu.generation) by @Cynocracy in #5141
- Upgrade black to stable version with format stability guarantees by @maffoo in #5157
- Format cirq-core with latest version of black by @maffoo in #5159
- Clarify virtual tag docstring by @dabacon in #5161
- Format cirq-google with latest version of black by @maffoo in #5160
- Ignore large-scale formatting changes for git blame by @maffoo in #5162
- Remove --pre from notebooks after release. by @MichaelBroughton in #5135
- Update to pylint 2.13 by @maffoo in #5156
- Update educators/intro.ipynb in preparation for Cirq 1.0 launch by @tanujkhattar in #5163
- Disable broken symbols. by @MichaelBroughton in #5...
Cirq v0.14.1
Patch release to fix vendor issue #5210.
No other changes introduced.
Cirq v0.14.0
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(...)
orcircuit.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
(useget_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 tocirq.TwoQubitGateTabulationResult
)GateTabulation
(moved tocirq.TwoQubitGateTabulation
)gate_product_tabulation
(moved tocirq.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...