cirq_google.engine.client.quantum.QuantumEngineServiceClient

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

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

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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

-

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.

SERVICE_ADDRESS 'quantum.googleapis.com:443'