qbraid.runtime.pasqal.PasqalProvider

class PasqalProvider(username=None, password=None, project_id=None, token_provider=None, sdk=None)[source]

Implements qBraid’s QuantumProvider interface for Pasqal Cloud Services. Authentication mirrors the pasqal_cloud.SDK constructor: provide a username / password pair, a token_provider, or set the PASQAL_USERNAME, PASQAL_PASSWORD, and PASQAL_PROJECT_ID environment variables.

Example

>>> from qbraid.runtime.pasqal import PasqalProvider
>>> provider = PasqalProvider(
...     username="me@example.com",
...     password="...",
...     project_id="...",
... )
>>> device = provider.get_device("EMU_FREE")

Initialize the Pasqal provider.

Parameters:
  • username (str | None) – Pasqal Cloud Services account username. Falls back to the PASQAL_USERNAME environment variable.

  • password (str | None) – Pasqal Cloud Services password. Falls back to the PASQAL_PASSWORD environment variable. If left unset and a username is provided, pasqal-cloud will prompt interactively.

  • project_id (str | None) – Pasqal project ID under which batches are submitted. Falls back to the PASQAL_PROJECT_ID environment variable.

  • token_provider (TokenProvider | None) – Custom pasqal_cloud.TokenProvider for machine-to-machine or pre-issued-token authentication. Takes precedence over username/password when supplied.

  • sdk (PasqalSDK | None) – Pre-built pasqal_cloud.SDK instance. When provided, all other authentication arguments are ignored. Useful for testing and advanced setups.

Raises:

ValueError – If no authentication material can be resolved.

__init__(username=None, password=None, project_id=None, token_provider=None, sdk=None)[source]

Initialize the Pasqal provider.

Parameters:
  • username (str | None) – Pasqal Cloud Services account username. Falls back to the PASQAL_USERNAME environment variable.

  • password (str | None) – Pasqal Cloud Services password. Falls back to the PASQAL_PASSWORD environment variable. If left unset and a username is provided, pasqal-cloud will prompt interactively.

  • project_id (str | None) – Pasqal project ID under which batches are submitted. Falls back to the PASQAL_PROJECT_ID environment variable.

  • token_provider (TokenProvider | None) – Custom pasqal_cloud.TokenProvider for machine-to-machine or pre-issued-token authentication. Takes precedence over username/password when supplied.

  • sdk (PasqalSDK | None) – Pre-built pasqal_cloud.SDK instance. When provided, all other authentication arguments are ignored. Useful for testing and advanced setups.

Raises:

ValueError – If no authentication material can be resolved.

Methods

__init__([username, password, project_id, ...])

Initialize the Pasqal provider.

get_device(device_id)

Return a PasqalDevice for the given device identifier.

get_devices()

Return the list of Pasqal devices currently available to the caller.

Attributes

sdk

Return the underlying pasqal_cloud.SDK instance.