View source on GitHub |
-
cirq_google.cloud.quantum.QuantumEngineServiceClient(
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, QuantumEngineServiceTransport, None] = None,
client_options: Optional[client_options_lib.ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO
) -> None
Raises | |
---|---|
google.auth.exceptions.MutualTLSChannelError
|
If mutual TLS transport creation failed for any reason. |
Attributes | |
---|---|
transport
|
Returns the transport used by the client instance. |
Methods
cancel_quantum_job
cancel_quantum_job(
request: Union[cirq_google.cloud.quantum.CancelQuantumJobRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> None
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_cancel_quantum_job():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.CancelQuantumJobRequest(
)
# Make the request
client.cancel_quantum_job(request=request)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.CancelQuantumJobRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
cancel_quantum_reservation
cancel_quantum_reservation(
request: Union[cirq_google.cloud.quantum.CancelQuantumReservationRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumReservation
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_cancel_quantum_reservation():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.CancelQuantumReservationRequest(
)
# Make the request
response = client.cancel_quantum_reservation(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.CancelQuantumReservationRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumReservation
|
- |
common_billing_account_path
@staticmethod
common_billing_account_path( billing_account: str ) -> str
Returns a fully-qualified billing_account string.
common_folder_path
@staticmethod
common_folder_path( folder: str ) -> str
Returns a fully-qualified folder string.
common_location_path
@staticmethod
common_location_path( project: str, location: str ) -> str
Returns a fully-qualified location string.
common_organization_path
@staticmethod
common_organization_path( organization: str ) -> str
Returns a fully-qualified organization string.
common_project_path
@staticmethod
common_project_path( project: str ) -> str
Returns a fully-qualified project string.
create_quantum_job
create_quantum_job(
request: Union[cirq_google.cloud.quantum.CreateQuantumJobRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumJob
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_create_quantum_job():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.CreateQuantumJobRequest(
)
# Make the request
response = client.create_quantum_job(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.CreateQuantumJobRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumJob
|
- |
create_quantum_program
create_quantum_program(
request: Union[cirq_google.cloud.quantum.CreateQuantumProgramRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumProgram
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_create_quantum_program():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.CreateQuantumProgramRequest(
)
# Make the request
response = client.create_quantum_program(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.CreateQuantumProgramRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumProgram
|
- |
create_quantum_reservation
create_quantum_reservation(
request: Union[cirq_google.cloud.quantum.CreateQuantumReservationRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumReservation
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_create_quantum_reservation():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.CreateQuantumReservationRequest(
)
# Make the request
response = client.create_quantum_reservation(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.CreateQuantumReservationRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumReservation
|
- |
delete_quantum_job
delete_quantum_job(
request: Union[cirq_google.cloud.quantum.DeleteQuantumJobRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> None
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_delete_quantum_job():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.DeleteQuantumJobRequest(
)
# Make the request
client.delete_quantum_job(request=request)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.DeleteQuantumJobRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_quantum_program
delete_quantum_program(
request: Union[cirq_google.cloud.quantum.DeleteQuantumProgramRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> None
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_delete_quantum_program():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.DeleteQuantumProgramRequest(
)
# Make the request
client.delete_quantum_program(request=request)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.DeleteQuantumProgramRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
delete_quantum_reservation
delete_quantum_reservation(
request: Union[cirq_google.cloud.quantum.DeleteQuantumReservationRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> None
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_delete_quantum_reservation():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.DeleteQuantumReservationRequest(
)
# Make the request
client.delete_quantum_reservation(request=request)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.DeleteQuantumReservationRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
from_service_account_file
@classmethod
from_service_account_file( filename: str, *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_info
@classmethod
from_service_account_info( info: dict, *args, **kwargs )
Creates an instance of this client using the provided credentials info.
Args | |
---|---|
info
|
dict
The service account private key info. |
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
@classmethod
from_service_account_json( filename: str, *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_mtls_endpoint_and_cert_source
@classmethod
get_mtls_endpoint_and_cert_source( client_options: Optional[client_options_lib.ClientOptions] = None )
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114
Args | |
---|---|
client_options
|
google.api_core.client_options.ClientOptions
Custom options for the
client. Only the |
Returns | |
---|---|
Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the client cert source to use. |
Raises | |
---|---|
google.auth.exceptions.MutualTLSChannelError
|
If any errors happen. |
get_quantum_calibration
get_quantum_calibration(
request: Union[cirq_google.cloud.quantum.GetQuantumCalibrationRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumCalibration
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_get_quantum_calibration():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.GetQuantumCalibrationRequest(
)
# Make the request
response = client.get_quantum_calibration(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.GetQuantumCalibrationRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumCalibration
|
- |
get_quantum_job
get_quantum_job(
request: Union[cirq_google.cloud.quantum.GetQuantumJobRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumJob
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_get_quantum_job():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.GetQuantumJobRequest(
)
# Make the request
response = client.get_quantum_job(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.GetQuantumJobRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumJob
|
- |
get_quantum_processor
get_quantum_processor(
request: Union[cirq_google.cloud.quantum.GetQuantumProcessorRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumProcessor
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_get_quantum_processor():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.GetQuantumProcessorRequest(
)
# Make the request
response = client.get_quantum_processor(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.GetQuantumProcessorRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumProcessor
|
- |
get_quantum_program
get_quantum_program(
request: Union[cirq_google.cloud.quantum.GetQuantumProgramRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumProgram
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_get_quantum_program():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.GetQuantumProgramRequest(
)
# Make the request
response = client.get_quantum_program(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.GetQuantumProgramRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumProgram
|
- |
get_quantum_reservation
get_quantum_reservation(
request: Union[cirq_google.cloud.quantum.GetQuantumReservationRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumReservation
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_get_quantum_reservation():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.GetQuantumReservationRequest(
)
# Make the request
response = client.get_quantum_reservation(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.GetQuantumReservationRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumReservation
|
- |
get_quantum_result
get_quantum_result(
request: Union[cirq_google.cloud.quantum.GetQuantumResultRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumResult
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_get_quantum_result():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.GetQuantumResultRequest(
)
# Make the request
response = client.get_quantum_result(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.GetQuantumResultRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumResult
|
- |
list_quantum_calibrations
list_quantum_calibrations(
request: Union[cirq_google.cloud.quantum.ListQuantumCalibrationsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumCalibrationsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_calibrations():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumCalibrationsRequest(
)
# Make the request
page_result = client.list_quantum_calibrations(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumCalibrationsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumCalibrationsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_job_events
list_quantum_job_events(
request: Union[cirq_google.cloud.quantum.ListQuantumJobEventsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumJobEventsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_job_events():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumJobEventsRequest(
)
# Make the request
page_result = client.list_quantum_job_events(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumJobEventsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumJobEventsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_jobs
list_quantum_jobs(
request: Union[cirq_google.cloud.quantum.ListQuantumJobsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumJobsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_jobs():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumJobsRequest(
)
# Make the request
page_result = client.list_quantum_jobs(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumJobsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumJobsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_processors
list_quantum_processors(
request: Union[cirq_google.cloud.quantum.ListQuantumProcessorsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumProcessorsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_processors():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumProcessorsRequest(
)
# Make the request
page_result = client.list_quantum_processors(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumProcessorsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumProcessorsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_programs
list_quantum_programs(
request: Union[cirq_google.cloud.quantum.ListQuantumProgramsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumProgramsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_programs():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumProgramsRequest(
)
# Make the request
page_result = client.list_quantum_programs(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumProgramsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumProgramsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_reservation_budgets
list_quantum_reservation_budgets(
request: Union[cirq_google.cloud.quantum.ListQuantumReservationBudgetsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumReservationBudgetsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_reservation_budgets():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumReservationBudgetsRequest(
)
# Make the request
page_result = client.list_quantum_reservation_budgets(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumReservationBudgetsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumReservationBudgetsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_reservation_grants
list_quantum_reservation_grants(
request: Union[cirq_google.cloud.quantum.ListQuantumReservationGrantsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumReservationGrantsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_reservation_grants():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumReservationGrantsRequest(
)
# Make the request
page_result = client.list_quantum_reservation_grants(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumReservationGrantsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumReservationGrantsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_reservations
list_quantum_reservations(
request: Union[cirq_google.cloud.quantum.ListQuantumReservationsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumReservationsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_reservations():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumReservationsRequest(
)
# Make the request
page_result = client.list_quantum_reservations(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumReservationsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumReservationsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
list_quantum_time_slots
list_quantum_time_slots(
request: Union[cirq_google.cloud.quantum.ListQuantumTimeSlotsRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> pagers.ListQuantumTimeSlotsPager
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_list_quantum_time_slots():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ListQuantumTimeSlotsRequest(
)
# Make the request
page_result = client.list_quantum_time_slots(request=request)
# Handle the response
for response in page_result:
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ListQuantumTimeSlotsRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.services.quantum_engine_service.pagers.ListQuantumTimeSlotsPager
|
- Iterating over this object will yield results and resolve additional pages automatically. |
parse_common_billing_account_path
@staticmethod
parse_common_billing_account_path( path: str ) -> Dict[str, str]
Parse a billing_account path into its component segments.
parse_common_folder_path
@staticmethod
parse_common_folder_path( path: str ) -> Dict[str, str]
Parse a folder path into its component segments.
parse_common_location_path
@staticmethod
parse_common_location_path( path: str ) -> Dict[str, str]
Parse a location path into its component segments.
parse_common_organization_path
@staticmethod
parse_common_organization_path( path: str ) -> Dict[str, str]
Parse a organization path into its component segments.
parse_common_project_path
@staticmethod
parse_common_project_path( path: str ) -> Dict[str, str]
Parse a project path into its component segments.
parse_quantum_job_path
@staticmethod
parse_quantum_job_path( path: str ) -> Dict[str, str]
Parses a quantum_job path into its component segments.
parse_quantum_processor_path
@staticmethod
parse_quantum_processor_path( path: str ) -> Dict[str, str]
Parses a quantum_processor path into its component segments.
parse_quantum_program_path
@staticmethod
parse_quantum_program_path( path: str ) -> Dict[str, str]
Parses a quantum_program path into its component segments.
parse_quantum_reservation_path
@staticmethod
parse_quantum_reservation_path( path: str ) -> Dict[str, str]
Parses a quantum_reservation path into its component segments.
quantum_job_path
@staticmethod
quantum_job_path( project: str, program: str, job: str ) -> str
Returns a fully-qualified quantum_job string.
quantum_processor_path
@staticmethod
quantum_processor_path( project_id: str, processor_id: str ) -> str
Returns a fully-qualified quantum_processor string.
quantum_program_path
@staticmethod
quantum_program_path( project: str, program: str ) -> str
Returns a fully-qualified quantum_program string.
quantum_reservation_path
@staticmethod
quantum_reservation_path( project_id: str, processor_id: str, reservation_id: str ) -> str
Returns a fully-qualified quantum_reservation string.
quantum_run_stream
quantum_run_stream(
requests: Optional[Iterator[engine.QuantumRunStreamRequest]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> Iterable[cirq_google.cloud.quantum.QuantumRunStreamResponse
]
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_quantum_run_stream():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.QuantumRunStreamRequest(
)
# This method expects an iterator which contains
# 'quantum_v1alpha1.QuantumRunStreamRequest' objects
# Here we create a generator that yields a single `request` for
# demonstrative purposes.
requests = [request]
def request_generator():
for request in requests:
yield request
# Make the request
stream = client.quantum_run_stream(requests=request_generator())
# Handle the response
for response in stream:
print(response)
Args | |
---|---|
requests
|
Iterator[google.cloud.quantum_v1alpha1.types.QuantumRunStreamRequest]
The request object iterator. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Iterable[google.cloud.quantum_v1alpha1.types.QuantumRunStreamResponse]: |
reallocate_quantum_reservation_grant
reallocate_quantum_reservation_grant(
request: Union[cirq_google.cloud.quantum.ReallocateQuantumReservationGrantRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumReservationGrant
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_reallocate_quantum_reservation_grant():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.ReallocateQuantumReservationGrantRequest(
)
# Make the request
response = client.reallocate_quantum_reservation_grant(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.ReallocateQuantumReservationGrantRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumReservationGrant
|
- |
update_quantum_job
update_quantum_job(
request: Union[cirq_google.cloud.quantum.UpdateQuantumJobRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumJob
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_update_quantum_job():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.UpdateQuantumJobRequest(
)
# Make the request
response = client.update_quantum_job(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.UpdateQuantumJobRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumJob
|
- |
update_quantum_program
update_quantum_program(
request: Union[cirq_google.cloud.quantum.UpdateQuantumProgramRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumProgram
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_update_quantum_program():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.UpdateQuantumProgramRequest(
)
# Make the request
response = client.update_quantum_program(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.UpdateQuantumProgramRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumProgram
|
- |
update_quantum_reservation
update_quantum_reservation(
request: Union[cirq_google.cloud.quantum.UpdateQuantumReservationRequest
, dict, None] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = ()
) -> cirq_google.cloud.quantum.QuantumReservation
-
.. code-block:: python
from google.cloud import quantum_v1alpha1
def sample_update_quantum_reservation():
# Create a client
client = quantum_v1alpha1.QuantumEngineServiceClient()
# Initialize request argument(s)
request = quantum_v1alpha1.UpdateQuantumReservationRequest(
)
# Make the request
response = client.update_quantum_reservation(request=request)
# Handle the response
print(response)
Args | |
---|---|
request
|
Union[google.cloud.quantum_v1alpha1.types.UpdateQuantumReservationRequest, dict]
The request object. - |
retry
|
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout
|
float
The timeout for this request. |
metadata
|
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
google.cloud.quantum_v1alpha1.types.QuantumReservation
|
- |
__enter__
__enter__()
__exit__
__exit__(
type, value, traceback
)
Releases underlying transport's resources.
.. warning:: ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!
Class Variables | |
---|---|
DEFAULT_ENDPOINT |
'quantum.googleapis.com'
|
DEFAULT_MTLS_ENDPOINT |
'quantum.mtls.googleapis.com'
|