Skip to content

v0.13.0

Compare
Choose a tag to compare
@95-martin-orion 95-martin-orion released this 15 Oct 19:21

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

8a7d6f8 Removing 0.13.0.dev -> 0.13.0
50271af Made the Density Matrix Plotter (#4493)
aaf969d Allow any qubit type in quimb density matrix (#4547)
e4e9019 GateFamily & Gatesets cleanups and bugfixes (#4569)
686e6b1 Removes sections related to experimental features. (#4573)
5aca52d Roll forward "Enable CircuitOp serialization" (#4511)
1f14edf Fix "tex" -> "text" (#4571)
888aeb7 Make Instance GateFamily check for equality ignoring global phase (#4542)
66c694a [cirqflow] Quantum runtime skeleton - part 1 (#4565)
033c604 Remove v0.13 deprecations. (#4567)
9f3034c Replace isinstance(op, GateOperation) checks in cirq_google optimizers to support other operation types. (#4459)
bd2e63c Boolean Hamiltonian gate yields fewer gates (#4386)
3d50921 [cirqflow] Provide concrete ExecutableSpec (#4559)
978dbac Add measurement_key_obj and measurement_key_objs protocols. (#4497)
f11846e Add copyright notices to conftests (#4561)
e66ac53 Document conversion tools between channel representations (#4554)
09da391 Fix variational algorithm tutorial (#4541)
eaa7f33 [cirqflow] QuantumExecutableGroup (#4551)
7e0d5d2 Add Azure Quantum docs and tutorials (#4530)
0d9eb4e More channel representation conversion tools (#4553)
02b4658 Compute a Kraus representation from the Choi matrix (#4549)
241695a Acctually assert in kraus_protocol_test.py (#4546)
f48efe0 Resolve inconsistencies in using controlled gates & controlled operations (#4167)
9d0ac9c Add Clifford Tableau decomposition function (#4183)
e6dc1e0 Use Gatesets in cirq/neutral_atoms (#4525)
bd1cdbc [cirqflow] Quantum Executable (#4527)
da63524 Fixed test_clifford_circuit_3 (#4534)
5daaec6 Fix resolving integer divisions (#4521)
88be1ef Fix broken path instructions in setting up a dev environment (#4519)
004eed1 Add separators argument to to_json function. (#4537)
6d9bbac Re-add all_measurement_keys and deprecate it (#4540)
34d0f8b Replace the underlying representation of SingleCliffordGate by CliffordTableau (#4165)
44e063b Code Quality Fixes in StatePreparationChannel (#4503)
e256423 [Named Topologies] LineTopology nodes_as_linequbits (#4536)
9591615 Idiomatic use of "segments" in floquet calibration tutorial (#4528)
3a287c2 Use Gatesets in cirq/optimizers/* (#4526)
2868382 Use Gatesets in cirq_ionq/* (#4524)
dfc33a1 Use Gatesets in cirq_pasqal/* (#4523)
61718ca Use Gatesets in cirq/ion (#4522)
4d1b9c0 Add common gate families as part of adopting gatesets across Cirq. (#4517)
f8ffbea Fix docstring for fsim gate (#4520)
f1964e5 Explicitly throw TimeoutError when job times out (#4514)
9f6c359 Exponent should be drawn on target qubit in CX and CCX gates (#4462)
9f371b0 Consolidate SQRT_ISWAP gate defs (#4229)
cf5b45d Little json things (#4506)
7759c05 Add type annotation on FrozenCircuit.to_op (#4505)
0041657 Add cirq.GateFamily and cirq.Gateset (#4491)
464ef04 Fix broken tutorials depending on cirq pre-release (#4504)
f1e676f Fix incorrect index in intro.ipynb (#4502)
3725c6a Implemented State Preparation Gate (#4482)
b80c265 Fix broken Floquet tutorial (#4496)
91bfb5c [Docs] Add calibration FAQ (#4442)
b3fa1bf Abstract out auth+device+sampler boilerplate from cirq_google tutorials (#4286)
578c956 Bump the proto requirements to match the generated data. (#4473)
eb3d84c Replace decomposition in measurement_key_protocol with explicit implementations (#4471)
676431d Adds PauliMeasurementGate (#4444)
9349802 Append list of wrapped finders in sys.meta_path with list of non-wrapped finders (#4467)
3b6ddfb Refactor ActOnArgs.kron/factor/transpose to reduce code duplication (#4463)
7951f84 Deprecate Two/ThreeQubitGate (#4207)
0dce2c1 [Obs] 4.5 - High-level API (#4392)
2988803 Retain log_of_measurement_results throughout simulation (#4465)
9130e2a cirq-google: Export Serializer on top-level cirq_google namespace (#4474)
d8004c6 Enable missing-param-doc pylint rule. (#4457)
6ce9a06 Upgrade notebook (#4468)
b44387a Bring back nest-asyncio to allow running notebooks with latest release (#4472)
de31ee9 Use duet for asynchrony, in particular for Collector (#4009)
58cda7a Serialize SingleQubitCliffordGate (#4421)
932f065 Added r(theta, phi) gate (#4455)
886fc51 dataclass_json_dict (#4391)
6ecaf07 Named Topologies (#4370)
1c2eafb Add missing code for ProjectorSum serialization in TFQ (#4456)
454c1a3 Allow initialization of MeasurementKeys with empty strings (#4445)
9ad0db1 install pyquil qvm and compiler (#4435)
c8dca6b Noise validate and docs (#4447)
1532975 Fix typing for Google measurements functions (#4450)
82a7698 Rename kraus.py to kraus_protocol.py (#4454)
743c5ba Fix reference to np.random.poisson (#4452)
d4717d8 Do not sort qubits by default in pauli_string to fix inconsistencies with pauli_string.gate (#4446)
91f4c76 Fix repr for MeasurementGate so that eval(repr(g)) == g (#4443)
4f881d7 state vector to probability utility method (#4439)
662de03 Replace from numpy.random import poisson with import numpy as np in cirq-core/cirq/contrib/acquaintance/gates_test.py (#4451)
11f751f Add ParallelGate and deprecate ParallelGateOperation (#4398)
a99fef9 Add tutorial on comparing current performance to latest calibration (#4180)
b1db3fa Fix MeasurementKey repr s.t. eval(repr(k)) == k (#4441)
e0c4a8a Add tutorial on circuit optimization, gate alignment, & spin echoes (#4373)
d259a8c Add name to circuit serializers (#4422)
739808d ProjectorSum object for TFQ (#4364)
e6c584b Calibration to fidelity (#4431)
aa8184c Replace existing calls of SupportsChannel to SupportsKraus (#4438)
5ee2288 Add SupportsKraus to cirq/__init__.py (#4437)
8d02bde Change definition of rise time for coupler pulse (#4427)
601a923 Channel matrix -> superoperator (#4433)
ac873c6 Metrics to noise (#4389)
cad0c33 Allow ActOnArgsContainer to support protocols.act_on (#4371)
9d615c5 Improve speed of random circuit generation (take 2) (#4430)
fb4cf43 updated cirq.Circuit to cirq.AbstractCircuit (#4372)
6e5d684 Add missing-raises-doc rule to the linter and subsequent refactor. (#4345)
04dea0c Deperecate property test. (#4432)
3690440 Rename measurement_key protocol to measurement_key_str (#4403)
5a248eb Revert "Improve speed of random circuit generation" (#4429)
75eccd3 Improve speed of random circuit generation (#4428)
782efcd pre-release notebooks -> stable (#4423)
37dfc63 Simultaneous readout (#4415)
28feee1 [Docs] Remove redundant note about cirq pre install in noise guide (#4413)
8e1a08d Add modules to book yaml (#4419)
e4645d1 Fix XL size labeling everywhere. (#4420)
4aeb719 Size labels (#4402)
eb42d4a Updates release.md and verification scripts. (#4417)
db1b310 Bump dev version to v0.13.0.dev. (#4416)