View source on GitHub |
An executable quantum program.
cirq_google.workflow.QuantumExecutable(
circuit: cirq.FrozenCircuit,
measurement: cirq_google.workflow.BitstringsMeasurement
,
params: Optional[Tuple[TParamPair, ...]] = None,
spec: Optional[cirq_google.workflow.ExecutableSpec
] = None,
problem_topology: Optional[cirq.NamedTopology] = None,
initial_state: Optional[cirq.ProductState] = None
)
This serves a similar purpose to cirq.Circuit
with some key differences. First, a quantum
executable contains all the relevant context for execution including parameters as well as
the desired number of repetitions. Second, this object is immutable. Finally, there are
optional fields enabling a higher level of abstraction for certain aspects of the executable.
Attributes | |
---|---|
circuit
|
A cirq.Circuit describing the quantum operations to execute.
|
measurement
|
A description of the measurement properties or process. |
params
|
An immutable cirq.ParamResolver (or similar type). It's representation is
normalized to a tuple of key value pairs.
|
spec
|
Optional cg.ExecutableSpec containing metadata about this executable that is not
used by the quantum runtime, but will be forwarded to all downstream result objects.
|
problem_topology
|
Optional cirq.NamedTopology instance specifying the topology of the
circuit. This is useful when optimizing on-device layout. If none is provided we
assume circuit already has a valid on-device layout.
|
initial_state
|
A cirq.ProductState specifying the desired initial state before executing
circuit . If not specified, default to the all-zeros state.
|
Methods
__eq__
__eq__(
other
)
Return self==value.
Class Variables | |
---|---|
initial_state |
None
|
params |
None
|
problem_topology |
None
|
spec |
None
|