Module: cirq_google

Classes for working with Google's Quantum Engine API.

Modules

api module: Helpers for converting to/from api data formats.

calibration module: Functions for calling the calibration API and characterizing qubits.

cloud module: Protocol buffers and generated client for Quantum Engine API.

devices module: Devices and Noise models for publicly known Google devices.

engine module: Client for running on Google's Quantum Engine.

experimental module: Experimental features. Their API can be broken without any warning and might be in an work-in

json_resolver_cache module: Module for use in exporting cirq-google objects in JSON.

line module: Utilities for picking out a line of GridQubits from a device.

ops module: Qubit Gates, Operations, and Tags useful for Google devices.

serialization module: Classes for serializing circuits into protocol buffers.

transformers module: Transformers for compiling to Google-specific gates, such as Sycamore.

workflow module: Utilities for running end-to-end experiments using Quantum Computing Service (QCS).

Classes

class AnnealSequenceSearchStrategy: Linearized sequence search using simulated annealing method.

class BitstringsMeasurement: Use in-circuit MeasurementGate to collect many repetitions of strings of bits.

class Calibration: A convenience wrapper for calibrations that acts like a dictionary.

class CalibrationLayer: Python implementation of the proto found in

class CalibrationResult: Python implementation of the proto found in

class CalibrationTag: Tag to add onto an Operation that specifies alternate parameters.

class CircuitOpDeserializer: Describes how to serialize CircuitOperations.

class CircuitOpSerializer: Describes how to serialize CircuitOperations.

class CircuitSerializer: A class for serializing and deserializing programs and operations.

class CircuitWithCalibration: Circuit with characterization data annotations.

class CouldNotPlaceError: Raised if a problem topology could not be placed on a device graph.

class Engine: Runs programs via the Quantum Engine API.

class EngineJob: A job created via the Quantum Engine API.

class EngineProcessor: A processor available via the Quantum Engine API.

class EngineProcessorRecord: A serializable record of processor_id to map to a cg.EngineProcessor.

class EngineProgram: A program created via the Quantum Engine API.

class EngineResult: A ResultDict with additional job metadata.

class ExecutableGroupResult: Results for a cg.QuantumExecutableGroup.

class ExecutableGroupResultFilesystemRecord: Filename references to the constituent parts of a cg.ExecutableGroupResult.

class ExecutableResult: Results for a cg.QuantumExecutable.

class ExecutableSpec: Specification metadata about an executable.

class FSimGateFamily: GateFamily useful to convert/accept cirq.FSimGate and other related gate types.

class FSimPhaseCorrections: Operations that compensate for zeta, chi and gamma angles of an approximate FSimGate gate.

class FloquetPhasedFSimCalibrationOptions: Options specific to Floquet PhasedFSimCalibration.

class FloquetPhasedFSimCalibrationRequest: PhasedFSim characterization request specific to Floquet calibration.

class GoogleCZTargetGateset: cirq.CZTargetGateset implementation tailored to Google devices.

class GoogleNoiseProperties: Noise-defining properties for a Google device.

class GreedySequenceSearchStrategy: Greedy search method for linear sequence of qubits on a chip.

class GridDevice: Device object representing Google devices with a grid qubit layout.

class HardcodedQubitPlacer

class KeyValueExecutableSpec: A generic executable spec whose metadata is a list of key-value pairs.

class LinePlacementStrategy: Choice and options for the line placement calculation method.

class LocalXEBPhasedFSimCalibrationOptions: Options for configuring a PhasedFSim calibration using a local version of XEB.

class LocalXEBPhasedFSimCalibrationRequest: PhasedFSim characterization request for local cross entropy benchmarking (XEB) calibration.

class NaiveQubitPlacer: Don't do any qubit placement, use circuit qubits.

class NoiseModelFromGoogleNoiseProperties: A noise model defined from noise properties of a Google device.

class PhasedFSimCalibrationError: Error that indicates the calibration failure.

class PhasedFSimCalibrationOptions: Base class for calibration-specific options passed together with the requests.

class PhasedFSimCalibrationRequest: Description of the request to characterize PhasedFSimGate.

class PhasedFSimCalibrationResult: The PhasedFSimGate characterization result.

class PhasedFSimCharacterization: Holder for the unitary angles of the cirq.PhasedFSimGate.

class PhasedFSimEngineSimulator: Wrapper on top of cirq.Simulator that allows to simulate calibration requests.

class PhysicalZTag: Class to add as a tag onto an Operation to denote a Physical Z operation.

class ProcessorRecord: A serializable record that maps to a particular cg.engine.AbstractProcessor.

class ProcessorSampler: A wrapper around AbstractProcessor to implement the cirq.Sampler interface.

class ProtoVersion: Protocol buffer version to use for requests to the quantum engine.

class QuantumExecutable: An executable quantum program.

class QuantumExecutableGroup: A collection of QuantumExecutables.

class QuantumRuntimeConfiguration: User-requested configuration of how to execute a given cg.QuantumExecutableGroup.

class QubitPlacer

class RandomDevicePlacer

class RuntimeInfo: Runtime information relevant to a particular cg.QuantumExecutable.

class Serializer: Interface for serialization.

class SharedRuntimeInfo: Runtime information common to all cg.QuantumExecutables in an execution of a

class SimulatedProcessorRecord: A serializable record mapping a processor_id and optional noise spec to a simulator-backed

class SimulatedProcessorWithLocalDeviceRecord: A serializable record mapping a processor_id and optional noise spec to a

class SycamoreGate: The Sycamore gate is a two-qubit gate equivalent to FSimGate(π/2, π/6).

class SycamoreTargetGateset: Target gateset containing Sycamore + single qubit rotations + Measurement gates.

class ValidatingSampler: Something capable of sampling quantum circuits. Simulator or hardware.

class XEBPhasedFSimCalibrationOptions: Options for configuring a PhasedFSim calibration using XEB.

class XEBPhasedFSimCalibrationRequest: PhasedFSim characterization request for cross entropy benchmarking (XEB) calibration.

Functions

SYC(...): The Sycamore gate is a two-qubit gate equivalent to FSimGate(π/2, π/6).

arg_from_proto(...): Extracts a python value from an argument value proto.

execute(...): Execute a cg.QuantumExecutableGroup according to a cg.QuantumRuntimeConfiguration.

get_engine(...): Get an Engine instance assuming some sensible defaults.

get_engine_calibration(...): Returns calibration metrics for a given processor.

get_engine_device(...): Returns a Device object for a given processor.

get_engine_sampler(...): Get an EngineSampler assuming some sensible defaults.

known_2q_op_to_sycamore_operations(...): Synthesizes a known two-qubit operation using cirq_google.SYC + single qubit rotations.

line_on_device(...): Searches for linear sequence of qubits on device.

make_zeta_chi_gamma_compensation_for_moments(...): Compensates circuit moments against errors in zeta, chi and gamma angles.

make_zeta_chi_gamma_compensation_for_operations(...): Compensates circuit operations against errors in zeta, chi and gamma angles.

merge_matching_results(...): Merges a collection of results into a single result.

noise_properties_from_calibration(...): Translates between cirq_google.Calibration and NoiseProperties.

prepare_characterization_for_circuits_moments(...): Extracts a minimal set of characterization requests necessary to characterize given circuits.

prepare_characterization_for_moment(...): Describes a given moment in terms of a characterization request.

prepare_characterization_for_moments(...): Extracts a minimal set of characterization requests necessary to characterize given circuit.

prepare_characterization_for_operations(...): Extracts a minimal set of characterization requests necessary to characterize all the

prepare_floquet_characterization_for_moment(...): Describes a given moment in terms of a Floquet characterization request.

prepare_floquet_characterization_for_moments(...): Extracts a minimal set of Floquet characterization requests necessary to characterize given

prepare_floquet_characterization_for_operations(...): Extracts a minimal set of Floquet characterization requests necessary to characterize all the

run_calibrations(...): Runs calibration requests on the Engine.

run_floquet_characterization_for_moments(...): Extracts moments within a circuit to characterize and characterizes them against engine.

run_zeta_chi_gamma_compensation_for_moments(...): Compensates circuit for errors in zeta, chi and gamma angles by running on the engine.

try_convert_sqrt_iswap_to_fsim(...): Converts an equivalent gate to FSimGate(theta=π/4, phi=0) if possible.

two_qubit_matrix_to_sycamore_operations(...): Decomposes a two-qubit unitary matrix into cirq_google.SYC + single qubit rotations.

ALL_ANGLES_FLOQUET_PHASED_FSIM_CHARACTERIZATION Instance of cirq_google.calibration.FloquetPhasedFSimCalibrationOptions
CIRCUIT_SERIALIZER Instance of cirq_google.serialization.CircuitSerializer
SQRT_ISWAP_INV_PARAMETERS Instance of cirq_google.calibration.PhasedFSimCharacterization
Sycamore Instance of cirq_google.devices.GridDevice
Sycamore23 Instance of cirq_google.devices.GridDevice
THETA_ZETA_GAMMA_FLOQUET_PHASED_FSIM_CHARACTERIZATION Instance of cirq_google.calibration.FloquetPhasedFSimCalibrationOptions
WITHOUT_CHI_FLOQUET_PHASED_FSIM_CHARACTERIZATION Instance of cirq_google.calibration.FloquetPhasedFSimCalibrationOptions
version '1.0.0'