Skip to main content

Haiqu.login(api_access_key: str | None = None, edge_uri: str | None = None, raise_on_error: bool = False) → str

Log in to the Haiqu cloud environment.
  • Parameters:
    • api_access_key (str | None) — The token to access the Haiqu API. Optional in the Haiqu Lab environment. Defaults to None, in which case the value will be taken from the HAIQU_API_KEY environment variable.
    • edge_uri (str | None) — The network location of the Haiqu API service. Defaults to None, which will set it automatically to an appropriate value.
    • raise_on_error (bool) — By default, human-friendly messages are returned. Set this to raise exceptions instead.
  • Returns: Status message.
  • Return type: str

Examples

>>> haiqu.login(api_access_key="HAIQU123")
'Success: Welcome to the Quantum World, example@haiqu.ai!'