github quantumlib/Cirq v0.10.0
Cirq v0.10.0

latest releases: v1.3.0, v1.2.0, v1.1.0...
3 years ago

Cirq v0.10.0 release

Major usability changes

Cirq core

  • We now have support for TwoQubitHeatmaps. Single qubit Heatmaps are also easier to use.
  • Add PauliSumExponential for commuting Pauli terms (#3427)
  • Circuit transformations:
    • realign operations: cirq.AlignLeft, cirq.AlignRight
    • concatenate multiple circuits via cirq.Circuit.tetris_add
  • You can now decompose arbitrary 3 qubit unitaries with cirq.three_qubit_matrix_to_operations
  • JSON serialization now supports GZIP
  • Create more structure in your circuits by using subcircuits with cirq.CircuitOperation

Platforms

  • cirq.ionq (NEW!):
    • We proudly announce our IonQ integration - Have a look at the tutorials!
  • cirq.google:

Contrib

  • [new!] We introduced a new matrix product state representation based simulator: cirq.contrib.quimb.MPSSimulator

Breaking changes

  • Heatmap is redesigned and configuration parameters are now passed via **kwargs instead of setter/getter functions.
  • cirq.experiments changes: the default value of the parameter two_qubit_op_factory in random_rotations_between_grid_interaction_layers_circuit and random_rotations_between_two_qubit_circuit changed to cirq.CZ instead of cirq.google.SYC
  • cirq.google.api.v2.results.MeasureInfo is now a dataclass which also contains tags corresponding to the circuit passed to cirq.google.api.v2.find_measurements.
  • cirq.CliffordSimulator behavior changed: if you relied on the old (incorrect) ability to mutate the simulator state from a step result, your workflow would be broken by this. (see #3664 for details)
  • measurement_keys protocol now returns AbstractSet[str] instead of Tuple[str, ...]
  • cirq.resolve_parameters changes - in most cases you should not see a change (see #3546 for details):
    • Parameter resolution no longer depends on alphabetization of parameters involved - see #3544 for an example
    • Cirq will raise a RecursionError when encountering a loop in parameter resolution
    • Resolver is more zealous in its conversion of int to float
  • cirq.protocols.json_serialization.RESOLVER_CACHE goes away -- you should not see a change in most cases is it was not a part of the public API.

New protocols

  • read_json_gzip
  • resolve_parameters_once
  • SerializableByKey
  • to_json_gzip

Changes to top level objects

New top level objects

  • AbstractCircuit
  • Alignment
  • CircuitOperation
  • ionq
  • FrozenCircuit
  • PauliSumExponential
  • PhasedFSimGate
  • wait
  • AlignLeft
  • AlignRight
  • two_qubit_matrix_to_diagonal_and_operations
  • three_qubit_matrix_to_operations
  • density_matrix
  • QUANTUM_STATE_LIKE
  • QuantumState
  • quantum_state
  • validate_density_matrix
  • read_json_gzip
  • resolve_parameters_once
  • SerializableByKey
  • to_json_gzip
  • with_measurement_key_mapping
  • TwoQubitInteractionHeatmap

Removed top level objects that were deprecated

  • subwavefunction
  • wavefunction_partial_trace_as_mixture
  • QFT
  • decompose_two_qubit_interaction_into_four_fsim_gates_via_b
  • validate_normalized_state
  • final_wavefunction
  • SimulatesIntermediateWaveFunction
  • WaveFunctionSimulatorState
  • WaveFunctionStepResult
  • WaveFunctionTrialResult
  • has_mixture_channel
  • mixture_channel

Top level objects or parameters that are marked as deprecated and will be removed in coming releases

  • parameter deprecation:cirq.Circuit.transform_qubits Use qubit_map instead of func
  • parameter deprecation:cirq.Moment.transform_qubits Use qubit_map instead of func
  • parameter deprecation:cirq.Operation.transform_qubits Use qubit_map instead of func
  • parameter deprecation:cirq.von_neumann_entropy Use state instead of density_matrix
  • cirq.CliffordState.perform_measurement
  • cirq.SimulatesIntermediateState._simulator_iterator
  • cirq.vis.heatmap.relative_luminance

A Huge Thank You

Thank you to all our contributors for this release

  • Adam Zalcman
  • Albert Frisch
  • Andriy Kushnarov
  • Antoine (Tony) Bruguier
  • Balint Pato
  • Bao Nguyen
  • Billy Lamberta
  • Craig Gidney
  • Dave Bacon
  • Dax Fohl
  • Doug Strain
  • Henrique Silvério
  • Kevin J. Sung
  • Matthew Harrigan
  • Matthew Neeley
  • Orion Martin
  • Paweł Pamuła
  • Purva Thakre
  • Rhea Parekh
  • Ryan LaRose
  • Sagar Dollin
  • Seun Omonije
  • Spencer Churchill
  • Tanuj Khattar
  • Tim Gates
  • Victory Omole
  • Wojciech Mruczkiewicz
  • YBC
  • gwhitehawk
  • lilies
  • m-szalay
  • smitsanghavi
  • wing

Full change list:
77de283 Bump cirq version to 0.11.0
41fcc6a Add empty results fallback for Result.repetitions (#3875)
3da5fa9 Ensure density matrix doesn't restart at zero between repetitions (#3851)
8d17c73 [Docs] Add support page for issues, requests, and questions (#3835)
3435a2c Add PauliSumExponential for commuting Pauli terms (#3427)
d890784 Exclude names from concise serialization. (#3863)
1a61423 fail cirq's use of deprecated features in tests (#3860)
e937b19 Add two qubit interaction heatmaps (#3861)
59d9e73 Remove unused perform_measurements argument from sparse simulator (#3869)
4ca1c1d Add support for using physical-Z phase matching on 2-qubit gates (#3862)
af0d9f3 Add circuit Alignment and use it for zip and tetris_concat (#3821)
d4a12a2 Update reference link in readme (#3859)
7fe025f Refactor MPS simulator to add noise, after #3829 (#3857)
2105e0c Deprecate 0.9 deprecated items (#3856)
a7f7129 Deprecate 0.10.0 deprecated items (#3854)
3df8aa3 Documentation for accessing the IonQ API (#3755)
9a88acf [obs] 4.1 - Pre-requisites (#3792)
0679a12 fix grpcio-tools version (#3849)
384b9a2 [XEB] Enable characterizing other gates (#3842)
5977bf3 Allow noise on sparse simulator (#3829)
4b068e6 circuit = circuit.freeze() (#3845)
f3d8982 [XEB] Generate calibrations from circuits (#3834)
94724fa Task, design discussion, project health issue templates (#3839)
d7bd940 Airspeed Velocity (asv) performance benchmarks setup: part-1 (#3822)
f2bf60f Expose new calibration methods (#3830)
aa2af6f Fixes for older envs (#3836)
a938495 Fix measurement_keys in repeated CircuitOperation and update the separator (#3823)
9ab0f6d [XEB] Optimize/characterize by pair (#3795)
e3c673f Ensure only measured subcircuits cause full simulator sweeps (#3827)
f9a82f1 Move google noisemodel to cirq.google (#3824)
c0600fb Add option to do per-operation compensation (#3812)
31f44ec Add prepare_floquet_characterization_for_operations function (#3813)
31c3728 [Docs] Move Floquet calibration docs to tutorials/google (#3826)
38a6c98 Allow quantum engine timeslots to handle missing start/end values (#3796)
7b2abd8 Improve type safety with generics on simulators (#3818)
e46f62e Don't serialize GridQubit hash when pickling (#3791)
6ea7c76 Add Floquet calibration docs (#3765)
a616ae8 Add Circuit.tetris_concat and FrozenCircuit.tetris_concat (#3805)
6bad7bf Adding two options for the MPS simulator: max_bond and method (#3793)
6aa46d7 adding standard header to characterization notebooks (#3817)
a276f9f Improve naming and docstrings of characterization methods (#3810)
98d950a pylint print version + verbose mode (#3811)
3f965a4 Fix Result constructing a pandas dataframe to compute repetitions (#3801)
0677d60 Enforce unique serialization keys (#3673)
1e9323c Revert "Drop python 3.6 support" (#3798)
2959dcc Add from_moment to PhasedFSimCalibrationRequest (#3720)
1590ff1 [XEB] Split into three files (#3794)
bbf6245 Notebooks guide (#3781)
e8697de [XEB] Support parallel execution (#3760)
bc108f9 Add key/value type annotations to cirq.PauliString.items() (#3790)
2e5c45b Remove cirq.google references from circuit_test and circuit_dag_test (#3738)
2c904da Add support for WaitGate and inverse of sqrt(iSWAP) to characterization and compilation (#3750)
18e11b3 Add the ability to do hybrid MPS/dense/inbetween simulations by having qubit grouping (#3735)
e882475 Fix DepolarizingChannel.circuit_diagram_info assuming it is a single qubit gate (#3780)
942b2c9 Modular JSON serialization protocol (#3539)
64af70f adding wojtek to the codeowners in cirq.experiments (#3776)
ca65d5d Updated, Multi-Stage Dockerfile (#3553)
2aa20b3 Add ISWAP and its inverse to FSIM_GATESET (#3743)
387ad42 Add and use QuantumState class (#3419)
3882d59 Accept qubit maps in transform_qubits (#3727)
7088690 refactor: move relative luminance (#3757)
90bf207 [XEB] Faster and more extensible simulation (#3753)
e9b802a removing cirq.google references from random circuit generation (#3764)
1958f2e Revert "Updated secretmanager ref to v1 (#3762)" (#3770)
1e49f88 Rename calibration methods (#3752)
f08b344 Avoid run_sweep_sample when subcircuits exist (#3745)
d57fa67 Updated secretmanager ref to v1 (#3762)
451b2f1 Repetition IDs for CircuitOperation (#3741)
d14eb7c Notebook tests against both released Cirq and PRs (#3751)
c24e2b9 [XEB] Optimize two qubit circuits (#3739)
a163a39 Backwards-compatibility behavior for resolve_parameters. (#3719)
abfa2af Add ability to overwrite characterized parameters with a fixed value (#3746)
0f87bb3 Remove unused imports (#3747)
d4a1874 Add functionality that compensate (calibrate out) for a single-qubit phases of the circuit's PhasedFSimGates (#3731)
bbaacd3 update the zenodo metadata + removing confusing bibtex (#3742)
5571b76 Update build status badge (#3744)
03f3a2f Add guide on operators and observables (#3654)
1ed3176 Cross Entropy Benchmarking sample and simulate two qubits (#3706)
4f9eb60 Add ability to construct service via environment variables (#3707)
65b8638 import os before using os (#3733)
2a121ec Fix a bug in Depol channel with multi qubits (#3715)
c626db0 Add PhasedFSimEngineSimulator which allows to simulate calibration requests and unitary shifts of the PhasedFSimGate (#3725)
7eb27cf make three qubit decomposition tests scipy version dependent (#3726)
d8598dc Support even powers of SWAP gate in CliffordSimulator (#3661)
3c566d2 Support gzip serialization (#3662)
97e9a91 Sync has_stabilizer_effect implementations and use that for Clifford checks (#3656)
fa9d941 Fix: tutorial index headings do not match tutorial content page (#3724)
b0023c2 Add utilities that allow to characterize circuits using Floquet calibration (#3711)
c52e52f MPS simulator can handle any topology (still required to have 1- or 2-qubit gates) (#3670)
239936d only test notebooks that are checked into git (#3713)
18c97b3 Fix bug of in IonQ result conversion (#3710)
ed07465 SimulatesExpectationValues (#3698)
6036851 Remove unused imports that were triggering pylint failures (#3718)
141f957 Add IonQ API device (#3665)
373f154 Add more test for heatmap colorbar (#3689)
2f9864b Cross entropy benchmarking spruce up (#3669)
32a806e Add a convenience interface that allows to issue Floquet calibration requests on cirq.google.Engine (#3690)
c5c2d95 Proposed fix for #3529 (Functionality decoupling for strat_commutes… (#3548)
1e849cb Add hash values to tags in cirq.google (#3701)
59cd7be Pin codeowners to 0.1.2 (#3703)
fbafbd5 Add tags to MeasureInfo (#3694)
680ae21 Add Circuit.are_any_matches_terminal() (#3697)
1ec8080 Observable Measurement - 3.5 - Readout Correction (#3649)
014514c Copy instead of assign input state for ProductState multiplication (#3692)
e9c09d3 Add PhasedFSimCharacterization container that describes cirq.PhasedFSimGate unitary angles (#3646)
057382c Remove extraneous copies in StabilizerStateChForm JSON parsing (#3680)
187cc23 Remove CliffordTableau from CliffordState (#3645)
df12015 Add align-left and align-right optimizers (#3643)
dd96690 Wrap input json_dict entries in np.array to avoid wrong type deduction (#3679)
dae8911 Simplify recursive sweepable cast (#3644)
3a88234 Fix for issue #1622: Some QASM annotations missing (#3637)
71cdf33 Fix assumption about order in MPSSimulator (#3671)
5fa8a3b Push redundant simulator iterator code into base classes (#3650)
989abad An MPS (approximate) simulator (#3630)
2a9fff7 Copy states in Clifford simulator (#3664)
e6a89fb Fix TaggedOperation not delegating act_on to its sub_operation (#3660)
1a9ee18 Fix SWAP and ResetChannel not working with CliffordSimulator (#3659)
6dfa628 Add qasm output support to ResetChannel (#3657)
1fbcd9a Validate that CircuitOperation is provided a FrozenCircuit (#3653)
bd3d95a Update chemistry tutorial docs for OpenFermion 1.0 (#3635)
ae9c7bd Fix quantum volume notebooks (#3604)
9bad962 Perform CliffordState measurements via method dispatch (#3503)
47cfc79 Observable Measurement - 3 - Data (#3374)
1949715 Add sampler to IonQ Service (#3607)
0ff2894 add JSON serialization to ParallelGateOperation (#3632)
bd8801c docs: fix simple typo, sigificant -> significant (#3631)
2188c07 Add transform_qubits/neg/pos to MutablePauliString (#3629)
f98ece8 Avoid going through CliffordSimulator to test StabilizerStateChForm (#3628)
0b58a1a Add measurement support to ActOnStabilizerChFormArgs and use it in MeasurementGate (#3610)
888d535 temporary fix for chemistry notebook (#3626)
a70cb52 Three qubit decomposition (#2873)
2d647f7 CircuitOperation (#3580)
4b08f85 Add list calibrations to IonQ service (#3606)
e20099e Remove repetition number in calibration calls (#3615)
9edf75a Add concise serialization tools. (#3601)
56160e4 Measure using StabilizerStateChForm (#3564)
2e21133 Update tutorial links on readme (#3609)
06a2bd7 Circuits can now be multiplied by numpy ints (#3590)
905083c Directly use Clifford tableaux for direct fidelity estimation (#3571)
dd33232 Refactor cirq.Moment to support efficiently finding operations by qubit (#3592)
70b08f0 Update noise docs (#3598)
5369b9b Add list jobs to IonQ service (#3602)
7fabf03 Make string for powered gates consistent (#3521)
b31d2d8 Add run method to IonQ service (#3600)
3440836 Format links in simulation docs (#3596)
7dad835 Remove unused dependency (#3595)
4f24415 Add get current calibration to IonQ service (#3570)
baddb11 Serialize measurement keys through IonQ metadata (#3562)
9885e43 Remove stale rtd_docs/docs_coverage_test.py references from check/* scripts (#3593)
4c98d37 Retire ReadTheDocs (#3587)
a0ee113 Docs: update notebook buttons (#3591)
8f9d859 Add module docstrings and fix formatting (#3589)
3a095e9 JSON Serialization for CalibrationResult and CalibrationLayer (#3540)
8666159 [docs] Fixes in install.md, rabi tutorial, variational algo and reservations tutorial (#3585)
ae6509b Remove bad delete char from docstring (#3583)
0701327 Polish noise docs (#3569)
1409d68 Fixes indentations on development.md (#3579)
b4e958e [docs] small formatting errors (#3578)
9d7ba9c Fix formatter on deleted or moved files (#3576)
a474035 Avoid triggering KeyError to check key presence in dicts (#3568)
09bb8eb ParamResolver composition. (#3538)
e99fe92 Drop python 3.6 support (#3574)
2219ade Switching to pre-releases instead of cirq-unstable (#3527)
ed37d2f Provide one-step and recursive parameter resolution (#3546)
0276ea0 Allow strings as targets of metrics in Calibration objects. (#3536)
cdfa4bc Remove print debugs from tests (#3563)
d6c6f9b [doc] Fix a newline in the Google Getting started tutorial. (#3558)
150f5c3 Adds alfrisch to AQT codeowners (#3557)
28764be Fix adjacent string literals (#3559)
fda14a5 Remove todos from protocols documentation (#3485)
226d52f Update requirements.txt (#3551)
556dcda Docs nits (#3545)
a61e51b Format
2496fc9 Switch to black for formatting
1bd083a [doc] remove CircuitDag methods from API doc that are inherited from networkx (#3531)
5b99b85 [3 qubit decomposition] Extract diagonal (#3472)
ff36e02 Reorganize tutorials landing page (#3522)
c429a02 Canonicalize theta and phi for the FSimGate (#3543)
d6005ff Fix WAIT_GATE_SERIALIZER to work with multi-qubit waits (#3537)
47d3418 Refactor how we generate default json resolver (#3532)
92e928e Fix type error in (X/Y)PowGate.act_on (#3533)
c5b58f8 Tweak formatting to prepare for switching to black (#3534)
baef78d Tweak coverage to prepare for switching to black (#3535)
16a906d Complete serializer for IonQ gates (#3520)
cf556d3 Add command to track upstream repo. (#3530)
c425c8a Add JSON serialization for Calibration metrics (#3508)
0693f79 Fix symmetry of PhasedFSimGate under qubit exchange (#3524)
69cc1b8 Implement cirq.commute for Moment and Operation (#3519)
0de53fb aqt, pasqal, ionq owners (#3526)
e6de69c codeowners file (#3525)
ed5cbff Add cancel and delete to IonQ job (#3523)
8a82825 Fixes run_batch requiring param list (#3507)
8cc0bef Add PhasedFSimGate (#3505)
269af71 Make WaitGate variadic and add wait helper function (#3514)
cdb62eb Generalize types for basic qubit experiments (#3513)
8e884b8 Update/polish neutral atom device tutorial. (#3491)
1f638b3 Update/polish QAOA educators tutorial. (#3486)
7cd4cc1 Adding missing ecosystem nav (#3510)
956845e New landing page for tutorials (#3506)
7d73750 Initial IonQ service (#3500)
00f2990 Fixes transform.ipynb and adds notebook testing (#3497)
b12ddf3 Add measurement key remapping protocol. (#3495)
0c2ee9f update code of conduct steward (#3496)
359a102 Add initial Engine client for Calibration API (#3474)
8bf262e Make dtype optional in state validation routines (#3428)
4d15fd7 Remove "python" symbolic link (#3489)
979025b moving freezegun dependency to dev dependencies (#3487)
f9588f5 Change initial backoff in engine client. (#3488)
58f139a Fix notebook authentication (#3484)
debc6fb AbstractCircuits and FrozenCircuits (#3481)
512d256 Modify EngineProgram.get_circuit() to work with BatchPrograms (#3483)
e937268 Update/polish textbook algorithms tutorial from educators workshop (#3476)
4fc8a85 Add serialization of tokens (#3480)
fcabf19 Fix a typo in basics.ipynb (#3482)
0c36d62 Fix iterator name in channel docstrings (#3477)
5100004 Reorder const methods in Circuit (#3478)
0315595 Update and polish educators workshop intro notebook (#3473)
28048ee Delete docs _index.yaml file. (#3470)
825adc4 Restructure tutorials into beginner, intermediate, and advanced sections (#3469)
a913530 Fix typo in custom gates guide (#3468)
ae3de3f fix educators links in book.yaml (#3465)
3045bd0 Pasqal access file (#3466)
d8c07aa Update basics.ipynb (#3467)
862ba0a Add educators workshop heading and contents (#3464)
4a3274c Move to method dispatch using act_on for CliffordState, Tableau and ChForm (#3456)
4676aa9 placeholder for protocols docs (#3461)
be9d147 Qubits docs (#3463)
78222c2 adds circuit transformations page (#3462)
ce4ff47 mention hardware/simulation options in Devices page (#3455)
c4c8f29 Add ion device tutorial. (#3450)
d000355 Fix equation rendering in custom gates guide (#3460)
a9b1549 Polish QAOA tutorial (#3457)
690f0ee First steps docs (#3449)
98ce452 Fix Tableau act_on for GlobalPhaseOp (#3458)
1f27aa2 Document Cirq ecosystem (#3446)
a7810c8 Make args_from_proto public (#3453)
37196ab Adds guide on custom gates. (#3442)
699bd64 Fix StabilizerStateChForm omega data type (#3451)
786822b Change measurement_keys protocol to return AbstractSet[str] (#3454)
c04dd6e Add act_on for StabilizerStateChForm to GlobalPhaseOp (#3448)
e4c191d Support ActOnStabilizerCHFormArgs in the common gates and testing (#3203)
e1754ec Replace Study with sweep in docs (#3439)
5253f54 Document private protocol methods for devsite (#3440)
70aad19 Standardize notebook pip installs (#3431)
47189e5 fix some cirq.google missing coverage issues (#3434)
a9040d6 Fix typos in quantum computing service start guide (#3436)
be5fb90 Docs nav fixes (#3437)
cfce449 Fix engine processor test (#3435)
382db24 Address doc-cleanup items (#3432)
6a151af Observable Measurement - 2 - Grouping (#3372)
7a41a70 Removing Quantum chess tutorial from cirq (#3430)
4a27846 fix AQT access & authentication nav (#3424)
73ce7ad Dedup noise doc (#3426)
87bb1d4 Update README.rst (#3425)
d787f5a AQT doc devices and getting started tutorial (#3420)
ae6172f Fix all latex expressions without enclosing $ signs (#3407)
9498489 Observable Measurement - 1 - Settings (#3371)
9811ce8 Add CalibrationTag (#3423)
3d5c323 Add access and authentication page for Google doc (#3422)
36aa495 New left nav for devsite (#3416)
784cbfc Adding citation doc for devsite (#3418)
657188a Verify that Cliffords fix Pauli group (#3417)
96abdcd Add Moment.to_text_diagram (#3403)
a07b0d2 Update single-qubit cliffords to fix XZ decomposition. (#3414)
f394892 Add SerializableGateSet.is_supported (#3410)
ca307cd Add optional arguments to calibration API (#3395)
50d9be8 fix readme (#3405)
6ddbfd9 strip license info for RTD pages (#3404)
ffc5352 Remove unnecessary conditional (#3401)
0b61039 adds zenodo config (#3392)
3468b27 fix protobuf serialization test issue (#3400)
415babe Fix freezegun related issues (#3399)
cfa2f10 fixing stale issue action (#3396)
497c19f Docs frontmatter and some cleanup (#3393)
a294223 Add mock to env_config_test (#3398)
c15990f Adds the stale issue Github Actions workflow (#3389)
b8e8d2f upgrade to pylint 2.6 (#3387)
13375da Fix duration documentation for Physical Z (#3385)
72c1a54 remove accidental print (#3383)
7c8c959 Fix TrialResult deprecation (#3381)
3e86ad6 Bump cirq version to 0.10.0 (#3379)

Don't miss a new Cirq release

NewReleases is sending notifications on new releases.