Skip to content

Results are limited to the current section: Cloud services

Product news

pasqal_cloud.ovh

OVHConnection(**kwargs)

Bases: PasqalCloudConnection

PasqalCloud connection designed for OVH users.

This connection class enables OVH users to access Pasqal Cloud services through pre-configured OVH quantum notebooks. See the OVH product page for more information.

Authentication is handled via a token that must be provided through the PASQAL_PULSER_ACCESS_TOKEN environment variable.

RAISES DESCRIPTION
MissingEnvironmentVariableError

If PASQAL_PULSER_ACCESS_TOKEN environment variable is not set.

Source code in pasqal_cloud/ovh.py
def __init__(self, **kwargs: Any) -> None:
    try:
        token = os.environ["PASQAL_PULSER_ACCESS_TOKEN"]
    except KeyError:
        raise MissingEnvironmentVariableError(
            "Missing PASQAL_PULSER_ACCESS_TOKEN environment variable"
        )

    class OvhTokenProvider(TokenProvider):
        def get_token(self) -> str:
            return token

    self.cloud_client = PasqalCloudClient(
        token_provider=OvhTokenProvider(), client_class=OvhClient, **kwargs
    )

supports_open_batch()

Flag to confirm this class cannot support creating an open batch.

Source code in pasqal_cloud/ovh.py
def supports_open_batch(self) -> bool:
    """Flag to confirm this class cannot support creating an open batch."""
    return False