github quantumlib/Cirq v0.15.0
Cirq v0.15.0

latest releases: v1.4.1, v1.4.0, v1.3.0...
2 years ago

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 of cirq.circuits.Moment. Recommended use is still cirq.Moment.
  • cirq.QuilOutput has moved to cirq_rigetti.quil_output.QuilOutput and will be removed in a future version.
  • Circuit.tetris_concat is moving to Circuit.concat_ragged.
  • Circuit.final_state_vector will no longer support positional arguments and will no longer support qubits_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 new SimulationTrialResult objects instead.
  • SparseSimulatorStep will no longer use the simulator argument.
  • OperationTarget will be replaced with cirq.SimulationStateBase.
  • SimulationState and children classes (i.e. StabilizerSimulationState) will no longer support positional args and log_of_measurement_results (replaced by classical_data arg).
  • DensityMatrixStepResult will no longer support simulator parameter.
  • StepResult has had mutators deprecated in favor of constructing new objects.
  • SimulationProductState changed argument names to sim_state.
  • StateVectorSimulatorState no longer used.
  • ActOnArgs (and variants) have been replaced by <variant>SimulationState.
  • StateVectorSimulationState swap_target_tensor_for and subspace_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 new cirq.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 and least_squares_xeb_fidelity_from_probabilities deprecated in favor of cirq.experiments.xeb_fitting.
  • generate_boixo_2018_supremacy_circuits_v2, generate_boixo_2018_supremacy_circuits_v2_grid and generate_boixo_2018_supremacy_circuits_v2_bristlecone has moved to recirq.beyond_classical module.
  • CrossEntropyResult, cirq.experiments.xeb_fitting.XEBCharacterizationResult deprecated in favor of cirq.experiments.xeb_fitting.XEBCharacterizationResult.
  • build_entangling_layers deprecated in favor of cirq.experiments.random_quantum_circuit_generation.
  • collect_grid_parallel_two_qubit_xeb_data moved to recirq.benchmarks.xeb.collect_grid_parallel_two_qubit_xeb_data.
  • compute_grid_parallel_two_qubit_xeb_results moved to recirq.benchmarks.xeb.compute_grid_parallel_two_qubit_xeb_results.
  • measurement_key_names protcol will use frozensets.
  • act_on protocol will change argument arg name to sim_state.
  • PauliTransform replaced in favor of DensePauliString.
  • GlobalPhaseOperation use global_phase_operation instead.
  • ArithmeticOperation going away in favor of just ArithmeticGate.
  • Gatesets no longer have accept_global_phase_op argument, instead a user must provide the cirq.GlobalPhaseGate.
  • NoiseModelFromNoiseProperties virtual_predicate renamed to is_virtual.
  • QuirkArithmeticOperation deprecated in favor of cirq.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 to cirq-core.
  • SimulatedLocalProcessor.get_device and EngineProcessor.get_device no longer requires a gate_sets parameter.
  • EngineProcessor.list_calibrations parameter names changed from latest_timestamp_seconds to latest_timestamp and earliest_timestamp_seconds to earliest_timestamp.
  • QuantumEngineSampler deprecated in favor of cirq_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 require gate_sets parameter.
  • Engine.sampler replaced with Engine.get_sampler.
  • get_engine_device now no longer requires gate_sets parameter.
  • SerializableDevice and SerializableGateset are going away in favor of CircuitSerializer and GridDevice metadata information.
  • optimize_for_{xmon,sycamore} are going away in favor of cirq.optimize_for_target_gateset using the xmon and sycamore gatesets.

What's Changed

New Contributors

Full Changelog: v0.14.1...v0.15.0

A Huge Thank You

Thank you to all our contributors for this release:

Adam Zalcman, Antoine (Tony) Bruguier, augustehirth, Bicheng Ying, Cheng Xing, Dave Bacon, Dax Fohl, Dominic Widdows, Doug Strain, Jon Donovan, Matthew Harrigan, Matthew Neeley, MichaelBroughton, Orion Martin, Pavol Juhas, Robert Hundt, smadhuk, Tanuj Khattar, Timo Eckstein, Victory Omole

Don't miss a new Cirq release

NewReleases is sending notifications on new releases.