cirq_google.workflow.QuantumExecutable
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.
Args |
circuit
|
The circuit. This will be frozen before being set as an attribute.
|
measurement
|
A description of the measurement properties or process.
|
params
|
A cirq.ParamResolverOrSimilarType which will be frozen into a tuple of
key value pairs.
|
spec
|
Specification metadata about this executable that is not used by the quantum
runtime, but is persisted in result objects to associate executables with results.
|
problem_topology
|
Description of the multiqubit gate topology present in the circuit.
If not specified, the circuit must be compatible with the device topology.
|
initial_state
|
How to initialize the quantum system before running circuit . If not
specified, the device will be initialized into the all-zeros state.
|
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
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-06-27 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."]]