cirq_google.engine.engine.EngineContext
Context for running against the Quantum Engine API.
cirq_google.engine.engine.EngineContext(
proto_version: Optional[cirq_google.engine.ProtoVersion
] = None,
service_args: Optional[Dict] = None,
verbose: Optional[bool] = None,
client: 'Optional[engine_client.EngineClient]' = None,
timeout: Optional[int] = None,
serializer: cirq_google.serialization.Serializer
= cirq_google.serialization.CIRCUIT_SERIALIZER
,
enable_streaming: bool = True
) -> None
Most users should
simply create an Engine object instead of working with one of these
directly.
Args |
proto_version
|
The version of cirq protos to use. If None, then
ProtoVersion.V2 will be used.
|
service_args
|
A dictionary of arguments that can be used to
configure options on the underlying client.
|
verbose
|
Suppresses stderr messages when set to False. Default is
true.
|
client
|
The engine client to use, if not supplied one will be
created.
|
timeout
|
Timeout for polling for results, in seconds. Default is
to never timeout.
|
serializer
|
Used to serialize circuits when running jobs.
|
enable_streaming
|
Feature gate for making Quantum Engine requests using the stream RPC.
If True, the Quantum Engine streaming RPC is used for creating jobs
and getting results. Otherwise, unary RPCs are used.
|
Raises |
ValueError
|
If either service_args and verbose were supplied
or client was supplied, or if proto version 1 is specified.
|
Methods
copy
View source
copy() -> 'EngineContext'
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool
__ne__
__ne__(
other: _SupportsValueEquality
) -> bool
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.
[[["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."],[],[]]