github quantumlib/Cirq v0.11.0
Cirq v0.11.0

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

Cirq v0.11.0 release

Warning: Please make sure to uninstall all older (<0.11) versions of Cirq otherwise pip install cirq will result in an invalid installation where cirq is an empty namespace package. If you have older versions, run pip uninstall cirq before upgrading.

Highlights

Modular Cirq

We introduced a new structure, where cirq.google is now extracted to a separate package cirq-google, cirq itself became cirq-core and the cirq metapackage only contains these two subpackages as dependencies. The package extraction was done in a backwards compatible way - existing code that uses cirq.google will still run! However, you will get a DeprecationWarning. In order to switch over, ensure that you have cirq-google installed and change import cirq.google to import cirq_google. Everything else should work!

Histograms

  • We have support for integrated histograms or CDFs to display characterization metrics from quantum chips

image

Breaking changes

  • as mentioned in the top notice, pip install --upgrade cirq will not suffice to upgrade cirq - please run pip uninstall cirq before upgrading.
  • cirq.rx, ry and rz are now returning a new class cirq.Rx, Ry and Rz respectively. This should work in most cases, unless your code explicitly depends on the type of the return value.
  • cirq_google.SQRT_ISWAP_PARAMETERS got renamed to cirq_google.SQRT_ISWAP_INV_PARAMETERS
  • cirq.Heatmap.plot() now takes all valid heatmap config arguments as **kwargs instead of just **collection_options, which is now a nested config argument (dict). Please see the tests / tutorials for more details.

Changes to top level objects

cirq-core

New top level objects

  • get_state_histogram
  • integrated_histogram
  • ActOnArgs
  • ActOnDensityMatrixArgs
  • CliffordTableau
  • DiagonalGate
  • SimulatesExpectationValues
  • SimulatorBase
  • MeasurementKey
  • Rx,Ry,Rz

Removed objects that were deprecated

  • Removed support for the func parameter in Circuit.transform_qubits(), you now must use qubit_map instead
  • TrialResult is now officially unsupported, use cirq.Result instead. If you have old JSONs lying around, you can just search and replace TrialResult to Result
  • If you have old gate implementations with _resolve_parameter that doesn't support the recursive parameter, you will get an error message: TypeError: _resolve_parameters_() takes 2 positional arguments but 3 were given, you will need to add support for the recursive:bool parameter
  • Removed support for the density_matrix parameter in cirq.von_neumann_entropy you now must use state instead
  • stabilizers and destabilizers methods are now removed from the CliffordSimulator class, you can find these on the CliffordTableau instead
  • perform_measurement is now renamed to apply_measurement in CliffordSimulator
  • When implementing a subclass of the Simulator class, _simulator_iterator won't work, you will have to use _base_iterator
  • cirq.vis.heatmap.relative_luminance is now moved to cirq.vis.relative_luminance

Objects or parameters that are marked as deprecated and will be removed in coming releases

  • cirq.study.visualize.plot_state_histogram was moved to cirq.vis.plot_state_histogram
  • cirq.google, deadline v0.14
  • cirq.sim.clifford.CliffordTableau moved to a different package, you should use cirq.CliffordTableau instead
  • cirq.contrib.routing.xmon_device_to_graph is deprecated, use cirq.contrib.grid_qubits_to_graph_device instead
  • cirq.contrib.quantum_volume parameter device_or_qubits is deprecated, use device_graph instead.

cirq-google

New top level objects

  • PhasedFSimCalibrationError
  • PhasedFSimCalibrationOptions
  • XEBPhasedFSimCalibrationOptions
  • XEBPhasedFSimCalibrationRequest
  • LocalXEBPhasedFSimCalibrationOptions
  • LocalXEBPhasedFSimCalibrationRequest
  • prepare_characterization_for_moments
  • prepare_characterization_for_moment
  • prepare_characterization_for_operations

A Huge Thank You

Thank you to all our contributors for this release

  • Andriy Kushnarov
  • Anna Nachesa
  • Antoine (Tony) Bruguier
  • Bicheng Ying
  • Bálint Pató
  • Chen Jialin
  • Craig Gidney
  • Dave Bacon
  • Dax Fohl
  • Doug Strain
  • FallenApart
  • Jimmy Yao
  • Kevin J. Sung
  • Martin Ganahl
  • Matthew Harrigan
  • Matthew Neeley
  • Orion Martin
  • Ryan LaRose
  • Ryan Levy
  • Smit Sanghavi
  • Tanuj Khattar
  • Unai Corzo
  • Victory Omole
  • Wojciech Mruczkiewicz
  • Zijun "Jimmy" Chen

Full change list:

6f9eedc flush deprecation backlog for v0.11 (#4099)
44114ed format + added fixes to the release process
5ad517f Bump cirq version to 0.12.0
8825c07 fix notebook failure
bd02fb6 flush deprecation backlog for v0.11
2f8326c [XEB] Allow default angles to be inferred from a gate (#4092)
d9baa89 Add tutorial for state histograms (#4024)
ca38fa3 Modify heatmaps tutorials to include demo of config params (#4026)
2337bbf [XEB] Add LocalXEBPhasedFSimCalibration to cirq_google init.py (#4091)
d485de8 Eliminate simulator boilerplate by pushing iteration into base class (#4035)
226ca20 Move CliffordTableau and add unit test (#4085)
30c337f Example of stabilizer code (#3935)
2ce47ae Allow to pass a list of circuits to Floquet preparation method (#4058)
642fc97 Fix tetris_concat docstring align arg and restore FIRST alignment option (#4084)
a41df7f Store job identifiers in calibration results (#4053)
97ce418 Speed up notebook tests by adding extra replacements file (#4077)
8db1515 Update documentation on parallel readout errors (#4076)
97f9f3e import networkx (#4073)
db801bb [XEB] Local wrapper for characterization functionality (#4047)
8e90bd6 A few more numpy warning squashes (#4072)
b8334a1 Fix flakey test in engine_simulator_test (#4069)
dd36446 pylint recognizes cirq_google as known third_party (#4071)
902e737 Narrow pytest execution check in deprecation warning (#4032)
83e0bd3 Add option to manipulate Floquet readout thresholds. (#4052)
9d9eeb3 Raise calibration exception for calibration failures (#4070)
5693c6d Make PhasedFSimCalibrationOptions public (#4061)
fbd9c1e Fix numpy warnings (#4065)
64fa7d4 Implement automatic inference of qid shape for quantum states (#3789)
d448a35 Fix indentation in docs (#3974)
6c99f0b Fix google notebooks (#4056)
7bdf41d Set default remote host for IonQ API (#4062)
ebf8fa3 Speed up MPS simulator test (#4063)
5f51fff Update floquet notebook to the latest changes (#4057)
58bebc8 Allow using plain qubits as keys for single-qubit heatmaps (#4028)
ebce56c Add a MeasurementKey class and make it the internal representation in MeasurementGate (#4039)
b2f8d43 Forrelation (#3748)
08bce1e Add IonQ to list of quantum service providers (#4055)
7aeab3b Fix naming of sqrt(iswap) gate constants (#4051)
0df0cdc Use sampler instead of engine as a primary run_calibrations runner (#4054)
b61d1c9 Fix pytest-changed-files-and-incremental-coverage (#4046)
81de725 Speed up cirq import by removing scipy.stats import (#4041)
cafe985 Factorise circuit into parallelizable components (will fix #3409) (#3873)
8fc6a2f Add and cleanup some gate docs (#4044)
18a6604 adding editable installs to development.md (#4043)
336ab46 fix bad import (#4042)
6188c64 [XEB] Generalize cirq.google.calibration for XEB (#3881)
d923a0f Fix omitted coverage (#4036)
3953052 Add multi-module version of build_api_docs.py (#4038)
574652c Fix cirq_google notebooks (#4037)
5919a17 fix versioning of new modules (#4033)
1514cec Split the simulators' creation of ActOnArgs and iteration (#3970)
d995a9c Include py.typed files in cirq-core and cirq-google (#4031)
12530f1 Merge pull request #3957 from balopat/master
5589c31 extracted cirq_google.
0cd59ea cirq.google -> cirq_google renames
a9768d8 creating compatibility tests for cirq_google JSON files
5de9bda new files before moving cirq.google package
fd257e6 in-place changes before actually moving the cirq.google package
51b5628 Add @rmlarose as a maintainer for cirq/docs/* (#4027)
bbaf47a Fix links in calibration visualization tutorial (#4025)
310f579 Add tutorial on qubit picking with Loschmidt echoes (#4021)
40757b8 Support passing config params in heatmap.plot() (#4018)
b47b8b9 Some minor doc reorganizing (#3966)
83238b1 fix networkx / decorator dependency issue (#4019)
4799246 Improve plot_state_histogram configuration options. (#4015)
76edeb1 Better import for sometimes failing mypy test (#4016)
eff9583 [obs] 4.3 - Stopping criteria (#3969)
83d163e Fix DepolarizingChannel documentation (#4011)
9c710fb Fix most numpy type errors in cirq/linalg (#4000)
845836a Fix most numpy errors in cirq/qis and friends (#4002)
259dd91 Fix most numpy type errors in cirq/ops (#3997)
aaa1385 Fix Rounding error while printing solution of "Exercise: Custom Controlled Rx gate" in docs/tutorials/educators/intro.ipynb (#4006)
71c7467 Skip measurement gates in DropNegligible optimizer (#4003)
c9c6d1f minor fixes to cirq intro (#3994)
ff516d0 Fix numpy mypy and add mypy-next (#3995)
e3fc574 Update docstring to fix href to MSGate. (#3992)
e0365e4 patch fixing a serialization issue with rx,ry and rz gates. (#3837)
ff8fb57 Fix qid dimension conflict (#3983)
0a29dc2 minor updates to cirq intro (#3981)
c791db7 Change the remaining format string to f-string (#3973)
eccc219 Fix docstring for wait helper function (#3978)
150f95c Fix and add docstrings to set_state_vector() (#3972)
4bb484a Coefficient fix (#3971)
c162e10 Migrate MPS to act_on protocol (#3961)
24e98fa [obs] 4.2 - Basic sampling loop (#3855)
f12e221 Improve Cirq Intro Tutorial (#3967)
96a639a Update visualizing calibration metrics tutorial (#3956)
8fb3efe Make EqualsTester notice incorrect delegation (#3809)
ce9fde6 Type annotations for optimization_pass (#3962)
966fc02 Remove go/ link from colab.ipynb (#3963)
46efaae Refactor state histograms (#3953)
40bc856 Add link to Jupyter Notebooks in README.rst (#3959)
51dc096 Fix load_module wrapping (#3948)
c27dcff Simulator doc update (#3955)
13908f6 Allow deprecation for freezegun (#3950)
f7ccb4c Fix name collision in program proto (#3949)
985b411 Return type annotations for def _eigen_components() (#3924)
7aff0dd Add docstring for cirq.QasmOutput (#3934)
b190b40 filter pre-release job for only main repo (#3945)
4f50559 support pytest.skip() in subprocess tests in _compat_test.py (#3947)
bee1a44 Add integrated histogram visualizations (#3942)
cfb2559 Adds git-blame-ignore-rev and instructions (#3940)
0d37128 Fix a bug in module deprecator (#3937)
0baadeb Fix calibration API timestamp (#3931)
f49ab35 Removed unused param in DFE example (#3936)
916e355 Module deprecator (#3917)
06e0f1c Pytest without cirq.google (#3894)
2128257 remove cirq.google dependency from three qubit gates test (#3928)
fa55cbb Add Rx, Ry, Rz gates (#3920)
3d369a0 Simplify type annotations in mps_simulator.py (#3926)
47f5908 Clean up resolve_parameters method signatures (#3925)
9c7a862 Make SimulatesExpectationValues public (#3927)
584b221 Adds a tutorial for single/two qubit heatmaps (#3880)
2b591a5 decompose_preserving_structure (#3899)
d27b9a4 Fix for issue #2777: it makes no sense to call simulator.run when ignore_measurement_results has been set to True (#3618)
aa6ec84 Change type signature of cirq.resolve_parameters to preserve types (#3922)
38cb2f2 Allow custom definition for _sympy_pass_through (#3921)
229b204 CircuitOperation proto (#3891)
06e4892 Density Matrix Simulator ActOn migration (#3841)
8cf7825 Add seconds to engine program id generation (#3906)
9465afc Make assert_logs levels interval based (#3914)
39faafc Pin pandas version to >= 1.1.4 (#3918)
504d467 assert_deprecated improvements (#3919)
69daec1 [Docs] Fix links in Floquet tutorial (#3911)
08c4b9b Diagonal gate (#3890)
8301dfc cleanup _assert_equivalent_op_tree (#3909)
4d46863 cleanup _assert_equivalent_op_tree (#3909)
bfb7aa3 make flynt incremental (#3905)
745790e Remove cirq.google reference from contrib.quantum_volume and contrib.routing (#3888)
05a499c Propagate global phase in diagram from sub circuits (#3892)
3f90c62 [Docs] Patch multiplicative group in Shor tutorial (#3819)
7a335e3 Format automatically covered lines with flynt (#3786)
2b948ba fixing small issues (#3896)
0c2a65c Update codeowners test following #3877 (#3878)
d4f3fc9 Replace _get_op_circuit with op.untagged (#3893)
eab2b48 narrow qiskit dependency (#3889)
2ef656c Add approximate equality for all common_channels except ResetChannel (#3887)
8cef3d9 Version bump 0.11.0 (#3882)

Don't miss a new Cirq release

NewReleases is sending notifications on new releases.