Module: cirq.study

Types and methods for running studies (repeated trials).

Modules

flatten_expressions module: Resolves symbolic expressions to unique symbols.

resolver module: Resolves ParameterValues to assigned values.

result module: Defines trial results.

sweepable module: Defines which types are Sweepable.

sweeps module

Classes

class ExpressionMap: A dictionary with sympy expressions and symbols for keys and sympy

class Linspace: A simple sweep over linearly-spaced values.

class ListSweep: A wrapper around a list of ParamResolvers.

class ParamResolver: Resolves parameters to actual values.

class Points: A simple sweep with explicitly supplied values.

class Product: Cartesian product of one or more sweeps.

class Result: The results of multiple executions of a circuit with fixed parameters.

class Sweep: A sweep is an iterator over ParamResolvers.

class Zip: Zip product (direct sum) of one or more sweeps.

Functions

dict_to_product_sweep(...): Cartesian product of sweeps from a dictionary.

dict_to_zip_sweep(...): Zip product of sweeps from a dictionary.

flatten(...): Creates a copy of val with any symbols or expressions replaced with

flatten_with_params(...): Creates a copy of val with any symbols or expressions replaced with

flatten_with_sweep(...): Creates a copy of val with any symbols or expressions replaced with

to_resolvers(...): Convert a Sweepable to a list of ParamResolvers.

to_sweep(...): Converts the argument into a <a href="../cirq/study/Sweep"><code>cirq.Sweep</code></a>.

to_sweeps(...): Converts a Sweepable to a list of Sweeps.

Type Aliases

ParamDictType: Dictionary from symbols to values.

ParamResolverOrSimilarType: Something that can be used to turn parameters into values.

Sweepable: An object or collection of objects representing a parameter sweep.

UnitSweep Instance of cirq.study.sweeps._Unit

The singleton sweep with no parameters.