-
cirq.google.engine.client.quantum.QuantumEngineServiceClient(
transport: QUANTUM_ENGINE_SERVICE_GRPC_TRANSPORT_LIKE = None,
channel: Optional[grpc.Channel] = None,
credentials: Optional[service_account.Credentials] = None,
client_config: Optional[Dict[str, Any]] = None,
client_info: Optional[google.api_core.gapic_v1.client_info.ClientInfo] = None,
client_options: Union[Dict[str, Any], google.api_core.client_options.ClientOptions] = None
)
Args |
transport (Union[~.QuantumEngineServiceGrpcTransport,
Callable[[~.Credentials, type], ~.QuantumEngineServiceGrpcTransport]): A transport
instance, responsible for actually making the API calls.
The default transport uses the gRPC protocol.
This argument may also be a callable which returns a
transport instance. Callables will be sent the credentials
as the first argument and the default transport class as
the second argument.
channel (grpc.Channel): DEPRECATED. A Channel instance
through which to make calls. This argument is mutually exclusive
with credentials ; providing both will raise an exception.
credentials (google.auth.credentials.Credentials): The
authorization credentials to attach to requests. These
credentials identify this application to the service. If none
are specified, the client will attempt to ascertain the
credentials from the environment.
This argument is mutually exclusive with providing a
transport instance to transport ; doing so will raise
an exception.
client_config (dict): DEPRECATED. A dictionary of call options for
each method. If not specified, the default configuration is used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
The client info used to send a user-agent string along with
API requests. If None , then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
client_options (Union[dict, google.api_core.client_options.ClientOptions]):
Client options used to set user options on the client. API Endpoint
should be set through client_options.
|
Methods
cancel_quantum_job
View source
cancel_quantum_job(
name: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
client.cancel_quantum_job()
Args |
name (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
cancel_quantum_reservation
View source
cancel_quantum_reservation(
name: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.cancel_quantum_reservation()
Args |
name (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
create_quantum_job
View source
create_quantum_job(
parent: Optional[str] = None,
quantum_job: Union[Dict[str, Any], pb_types.QuantumJob] = None,
overwrite_existing_run_context: Optional[bool] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.create_quantum_job()
Args |
parent (str): -
quantum_job (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob
overwrite_existing_run_context (bool): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
create_quantum_program
View source
create_quantum_program(
parent: Optional[str] = None,
quantum_program: Union[Dict[str, Any], pb_types.QuantumProgram] = None,
overwrite_existing_source_code: Optional[bool] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.create_quantum_program()
Args |
parent (str): -
quantum_program (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram
overwrite_existing_source_code (bool): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
create_quantum_reservation
View source
create_quantum_reservation(
parent: Optional[str] = None,
quantum_reservation: Union[Dict[str, Any], pb_types.QuantumReservation] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.create_quantum_reservation()
Args |
parent (str): -
quantum_reservation (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
delete_quantum_job
View source
delete_quantum_job(
name: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
client.delete_quantum_job()
Args |
name (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
delete_quantum_program
View source
delete_quantum_program(
name: Optional[str] = None,
delete_jobs: Optional[bool] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
client.delete_quantum_program()
Args |
name (str): -
delete_jobs (bool): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
delete_quantum_reservation
View source
delete_quantum_reservation(
name: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
client.delete_quantum_reservation()
Args |
name (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
from_service_account_file
View source
@classmethod
from_service_account_file(
filename, *args, **kwargs
)
Creates an instance of this client using the provided credentials
file.
Args |
filename (str): The path to the service account private key json
file.
|
args
|
Additional arguments to pass to the constructor.
|
kwargs
|
Additional arguments to pass to the constructor.
|
Returns |
QuantumEngineServiceClient
|
The constructed client.
|
from_service_account_json
View source
@classmethod
from_service_account_json(
filename, *args, **kwargs
)
Creates an instance of this client using the provided credentials
file.
Args |
filename (str): The path to the service account private key json
file.
|
args
|
Additional arguments to pass to the constructor.
|
kwargs
|
Additional arguments to pass to the constructor.
|
Returns |
QuantumEngineServiceClient
|
The constructed client.
|
get_quantum_calibration
View source
get_quantum_calibration(
name: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.get_quantum_calibration()
Args |
name (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumCalibration instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
get_quantum_job
View source
get_quantum_job(
name: Optional[str] = None,
return_run_context: Optional[bool] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.get_quantum_job()
Args |
name (str): -
return_run_context (bool): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
get_quantum_processor
View source
get_quantum_processor(
name: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.get_quantum_processor()
Args |
name (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProcessor instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
get_quantum_program
View source
get_quantum_program(
name: Optional[str] = None,
return_code: Optional[bool] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.get_quantum_program()
Args |
name (str): -
return_code (bool): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
get_quantum_reservation
View source
get_quantum_reservation(
name: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.get_quantum_reservation()
Args |
name (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
get_quantum_result
View source
get_quantum_result(
parent: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.get_quantum_result()
Args |
parent (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumResult instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_calibrations
View source
list_quantum_calibrations(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_calibrations():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_calibrations().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumCalibration instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_job_events
View source
list_quantum_job_events(
parent: Optional[str] = None,
page_size: Optional[int] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_job_events():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_job_events().pages:
for element in page:
# process element
pass
Args |
parent (str): -
page_size (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJobEvent instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_jobs
View source
list_quantum_jobs(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_jobs():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_jobs().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_processors
View source
list_quantum_processors(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_processors():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_processors().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProcessor instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_programs
View source
list_quantum_programs(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_programs():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_programs().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_reservation_budgets
View source
list_quantum_reservation_budgets(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_reservation_budgets():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_reservation_budgets().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservationBudget instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_reservation_grants
View source
list_quantum_reservation_grants(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_reservation_grants():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_reservation_grants().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservationGrant instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_reservations
View source
list_quantum_reservations(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_reservations():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_reservations().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
list_quantum_time_slots
View source
list_quantum_time_slots(
parent: Optional[str] = None,
page_size: Optional[int] = None,
filter_: Optional[str] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Iterate over all results
for element in client.list_quantum_time_slots():
# process element
pass
# Alternatively:
# Iterate over results one page at a time
for page in client.list_quantum_time_slots().pages:
for element in page:
# process element
pass
Args |
parent (str): -
pagesize (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
filter (str): -
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~google.api_core.page_iterator.PageIterator instance.
An iterable of :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumTimeSlot instances.
You can also iterate over the pages of the response
using its pages property.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
quantum_run_stream
View source
quantum_run_stream(
requests,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
request = {}
requests = [request]
for element in client.quantum_run_stream(requests):
# process element
pass
Args |
requests (iterator[dict|cirq.google.engine.client.quantum_v1alpha1.proto.engine_pb2.QuantumRunStreamRequest]): The input objects. If a dict is provided, it must be of the
same form as the protobuf message :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumRunStreamRequest
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
Iterable[~cirq.google.engine.client.quantum_v1alpha1.types.QuantumRunStreamResponse].
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
reallocate_quantum_reservation_grant
View source
reallocate_quantum_reservation_grant(
name: Optional[str] = None,
source_project_id: Optional[str] = None,
target_project_id: Optional[str] = None,
duration: Union[Dict[str, Any], duration_pb2.Duration] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.reallocate_quantum_reservation_grant()
Args |
name (str): -
source_project_id (str): -
target_project_id (str): -
duration (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.Duration]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.Duration
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservationGrant instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
update_quantum_job
View source
update_quantum_job(
name: Optional[str] = None,
quantum_job: Union[Dict[str, Any], pb_types.QuantumJob] = None,
update_mask: Union[Dict[str, Any], field_mask_pb2.FieldMask] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.update_quantum_job()
Args |
name (str): -
quantum_job (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob
update_mask (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.FieldMask]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.FieldMask
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumJob instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
update_quantum_program
View source
update_quantum_program(
name: Optional[str] = None,
quantum_program: Union[Dict[str, Any], pb_types.QuantumProgram] = None,
update_mask: Union[Dict[str, Any], field_mask_pb2.FieldMask] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.update_quantum_program()
Args |
name (str): -
quantum_program (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram
update_mask (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.FieldMask]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.FieldMask
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
update_quantum_reservation
View source
update_quantum_reservation(
name: Optional[str] = None,
quantum_reservation: Union[Dict[str, Any], pb_types.QuantumReservation] = None,
update_mask: Union[Dict[str, Any], field_mask_pb2.FieldMask] = None,
retry: Optional[google.api_core.retry.Retry] = google.api_core.gapic_v1.method.DEFAULT,
timeout: Optional[float] = google.api_core.gapic_v1.method.DEFAULT,
metadata: Optional[Sequence[Tuple[str, str]]] = None
)
-
Example:
from cirq.google.engine.client import quantum_v1alpha1
client = quantum_v1alpha1.QuantumEngineServiceClient()
response = client.update_quantum_reservation()
Args |
name (str): -
quantum_reservation (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation
update_mask (Union[dict, ~cirq.google.engine.client.quantum_v1alpha1.types.FieldMask]): -
If a dict is provided, it must be of the same form as the protobuf
message :class:~cirq.google.engine.client.quantum_v1alpha1.types.FieldMask
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If None is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if retry is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
|
Returns |
A :class:~cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation instance.
|
Raises |
google.api_core.exceptions.GoogleAPICallError
|
If the request
failed for any reason.
|
google.api_core.exceptions.RetryError
|
If the request failed due
to a retryable error and retry attempts failed.
|
ValueError
|
If the parameters are invalid.
|
Class Variables |
SERVICE_ADDRESS
|
'quantum.googleapis.com:443'
|