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 #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 ifsplit_untangled_qubits=False
, but this PR setssplit_untangled_qubits=True
.
- Manual changes made to a
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
8cba324 Update serialization.md to include deprecation of serializable values (#4411)
1168164 Fix link on jupyter notebook (#4409)
abc7159 Revert "Simultaneous readout" (#4406)
66fd247 implement aspen qubits and devices (#4378)
0d4a31b 3D circuit visualization using Typescript dev environment (#4334)
10c78c9 Add print_version and replace_version to module.py (#4399)
eb72fb5 Simultaneous readout (#4307)
10b15e0 Fix cirq-core dependencies (#4369)
8c505fb update json serialization docs + add module docs (#4397)
9d695c5 Fix BooleanHamiltonian.with_qubits() to work with not only NamedQubits (#4396)
3810349 Reorganize serializers (#4385)
78db102 Add missing import cirq
(#4387)
c3f9a5d T1 decay for simulator (#4326)
e56e15d Boolean Hamiltonian gate (#4309)
2466bc3 Throw TypeError
around any
call in if hasattr(obj, '__iter__') and not isinstance(obj, str):
to deal with a numpy special case (#4382)
120eb87 [Obs] 4.4 - Checkpointing (#4352)
b1dc973 Proto serialization v25 (#4333)
fb91578 GeneralizedAmplitudeDampingChannel docstring (#4374)
f7b882c Measureable channels and mixtures (#4194)
409a412 Disallow empty measurement keys and fix tests using empty keys (#4060)
9c23053 Lazily create TrialResult.final_simulator_state (#4317)
9467ad3 Add is_cptp predicate (#4365)
2b1e407 Updated calls to np.prod to use dtype=np.int64. (#4363)
9a38c2d Projectors for TensorFlow quantum (#4331)
2467e39 IdentityGate optimizations for act_on and independent states (S) (#4340)
0f9fa3f Optimize swap gates (#4169)
fb43b84 Fix floquet quirk url (#4347)
bae702c Revert "Enable CircuitOp serialization." (#4355)
809fe66 Revert "Allow CircuitOperations in cirq.optimized_for_sycamore" (#4356)
ecb0202 [Obs] 4.4 - Readout error mitigation (#4323)
187915d Allow CircuitOperations in cirq.optimized_for_sycamore (#4336)
0209c65 Complete implementation of the permit_mixed_moments option (#4342)
4d956c5 Enable CircuitOp serialization. (#4344)
055db68 Allow intercepting decomposer while preserving structure. (#4343)
912110f Adds cirq-rigetti (#4302)
7a27917 Floquet notebook missed review nits (#4341)
093c171 Fix citation and explanation in Floquet calibration example (#4335)
b92f379 Make (cirq.X, cirq.Y, cirq.Z)**1
returned type as _Pauli{X,Y,Z} instead of {X,Y,Z}PowGate (#4330)
dc01372 Attempt to Fix PauliSumCollector.collect_async warning under notebook(short-term solution) (#4004)
16dd1bb better error messaging when deprecated module can't be imported (#4324)
c629c38 Re-alias TrialResult to Result in json. (#4319)
b8e0587 Fix cirq_web README from large Typescript development PR merge (#4314)
a3109a7 pauli_sum_collector.estimate_energy() should return float when energy.imag == 0 (#4313)
0d8bf31 Add missing quote in circuits.ipynb (#4320)
68f7698 T1 constant calculation (#4290)
d9e1f93 Fix NameError
in visualizing calibration metrics tutorial (#4316)
d624a55 Add docstyle rule to the linter and subsequent refactor. (#4311)
7407a28 Test deserializer on infinite recursion. (#4315)
c28646f Sample independent qubit sets without merging state space (#4110)
5ca4ab6 Move on_each to Gate, and deprecate SupportsOnEachGate (#4303)
4852c46 Fix automerge checks (#4308)
ada1b09 Add an option to build a PauliSum from a Sympy Boolean expression (#4282)
b1a35bf Revert "Switch to using the incremental pylint. Turn on documentation linters. (#4267)" (#4306)
52aba59 Switch to using the incremental pylint. Turn on documentation linters. (#4267)
cea9eec Return self in Operation.with_tags if adding no tags (#4301)
c8be206 Add reset_each function by analogy with measure_each (#4294)
418d067 Remove bazel from repo (#4297)
4ec906d Allow on_each for multi-qubit gates (#4281)
e2b4477 Use partial_trace
to factor density matrix (#4300)
6cfdda7 [XEB] Cycle depths during analysis (#4278)
5c3125e Add py39 testing to CI test matrix. (#4296)
d850bd0 Add Circuit Optimizer for sqrt-iSWAP (#4224)
504bdbb Fix behavior of MergeInteractions for tagged partial CZ gates (#4288)
c80e463 Add two-qubit unitary decomposition for (inverse) sqrt-iSWAP (#4213)
24bac55 Typescript development in Cirq and prototype Bloch sphere implementation (#4171)
6282c06 SimulatorBase independent qubits optimization (#4100)
6b6fc98 fix for issue #4087 (#4103)
680f897 Revert "Support qubits in MeasurementKey
and update JSON serialization of keys" (#4277)
1433621 Fix docker (#4230)
55417ee Extract cirq-pasqal (#4241)
608e678 Remove cirq.IonDevice.can_add_operation_into_moment (#4271)
534b951 Add qubits as a param of PauliSum.matrix() (#4203)
d379571 Refactor private static methods to module functions. (#4231)
b1801ab Add coupler pulse gate (#4130)
6d2cd16 No DeprecationWarning deduping during testing (#4239)
ff230df Update tutorials on calibration (#4258)
36e5f60 Add method to get "mapped_circuit" from CircuitOperations (#4188)
09a2ea5 Support sqrt(iSWAP) and Sycamore gates in Floquet calibration (#4248)
aba9fa9 [Docs] Fix dev group link on support page (#4259)
2f07cc9 Fix the CZ ops on the Clifford Tableau Implementation (#4182)
700a6c0 add cancel workflow (#4256)
418e08d Propagate channel from GateOperation to its Gate (#4255)
02f3951 add flynt to pytest-minimal (#4250)
fb28967 Add Optional name
to MatrixGate
parameter (#4201)
d7a5b9b Removes direct URL requirements from cirq[dev-env] (#4249)
81d2097 Support decompose protocol on cirq.Moment
(#4251)
81436fe Support qubits in MeasurementKey
and update JSON serialization of keys (#4123)
7d9e603 [4173] Add atol/rtol for unitary checks in MatrixGate (#4220)
4278277 update python version to 3.8 (#4245)
4960e17 Fix extras_require for the cirq metapackage setup.py (#4246)
a2f107c Expand Floquet calibration to arbitrary FSim gates (#4164)
ba2cd7f Removing noise model check in Simulator initialization (#4216)
099fc74 Draw zero-target operations below circuit text diagrams as annotations (#4234)
ef5ae03 Qasm for pauli X sqrts (#4113)
65711e1 Remove axes from ActOnArgs, pass qubits explicitly to act_on (#4089)
566ce2b Extracting cirq-ionq (#4205)
59d8018 Fix EjectPhasedPaulis incorrectly treating X0 as X1 (#4219)
87f2961 Add cirq-aqt
to pip install
command in development.md
(#4221)
73359bf fix aqt ref (#4212)
72993b5 Density matrix simulator EVs (#3979)
0d7534a Update Google Best Practices (#4168)
1f2328f fix AQT link + logo (#4206)
b5c0f80 Rename channel.py to kraus.py (#4204)
6af64a2 Fixing isolation in isolated notebook tests (#4202)
e151a66 Add two-qubit interaction heatmap to parallel xeb tutorial (#4199)
2dafb29 fixing notebook test errors when no tests collected (#4196)
55873b9 Rename cirq.channel to cirq.kraus (#4195)
b43eaaa Extract cirq_aqt (#4157)
020008b sharding isolated notebook tests (#4192)
1d1f3a8 Triage party config and docs (#3740)
2d7641b Allow to pass Circuit to single-qubit gates compensation (#4118)
007a3cd Fix path in __version__
docstring for setup.py
in cirq-google
(#4174)
3b315cd Optimize is_measurement
protocol (#4140)
8e7e302 GH actions ubuntu 20 04 (#4148)
db8baea Fix codeowners for docs and modularized folder structure (#4160)
8b5866f Minor improvements to echoes tutorial (#4128)
66b2102 Fix the typo in clifford_gate_test::test_commutes_pauli (#4149)
06b34df Add edges to device (#3993)
074c4e4 Entanglement fidelity of a quantum channel (#4158)
7065c6d Channel matrix (#4146)
0311e17 Update cirq_google to import from cirq directly (#4156)
bc4123e Rename _channel_
to _kraus_
(#4139)
b95c365 Fix contrib-requirements (#4155)
3ea9c87 Consistent parameter indentation in README.rst (#4150)
705f37b Slight speed up to notebook tests (#4147)
fec7710 Improve docstring for operation_to_choi (#4143)
836bbda Consolidate dependencies (#4131)
b28b163 Choi representation (#4132)
6c72b5b Fix pathname in misc check tool (#4133)
71285d2 (De-)serialization of CircuitOperations (#3923)
0c0366b Add inverse
method for Clifford tableau (#4111)
7d1e168 Add then
method for composing two Clifford tableaux (#4096)
edbee2c bump cirq to v0.12.0.dev (#4121)
51d6884 Add tutorial on selecting qubits and calibrating for an experiment (#4108)
3e06fdf Add to_phased_xz_gate function for SingleQubitCliffordGate (#4050)
38ed9ac add binary_paintshop example to ionq (#4101)
83b211b floquet.ipynb - idiomatic numpy indexing (#4107)
ce58f42 [XEB] Multiprocessing spawn (#4090)
5fdb80d [XEB] Theory notebook: fix pauli vs. depol error number (#4097)
115e50e Remove separate script for nightly devsite diff (#4105)
f7c1156 Updating notebook pip install
s after v0.11 release (#4102)
849849d Provide sweep-iterator API. (#4094)
b4c445f Use MeasurementKey
in CircuitOperation
(#4086)