Skip to main content

Haiqu.list_experiments(widget: bool = True, pandas: bool = False) → list | DataFrame | None

List available experiments.
  • Parameters:
    • widget (bool) — If True (default), render the list as a Jupyter widget and return None.
    • pandas (bool) — If True, return the list as a Pandas DataFrame instead of a Python list. Defaults to False.
  • Returns: Experiments in a Python list or Pandas DataFrame, or None.
  • Return type: list | pandas.DataFrame | None

Examples

>>> haiqu.list_experiments()  # in Jupyter notebook
>>> haiqu.list_experiments(widget=False)
[Experiment 'Example Experiment', Experiment 'Another Experiment']

Haiqu.list_circuits(experiment_name: str | None = None, experiment_id: str | None = None, limit: int = 10, widget: bool = True, pandas: bool = False) → list | DataFrame | None

List recent circuits. The circuits are filtered by experiment (name or ID, with the current experiment used if neither is specified), and limited to only the most recent few (10 by default).
  • Parameters:
    • experiment_name (str | None) — Return circuits for the provided experiment name.
    • experiment_id (str | None) — Return circuits for the provided experiment ID.
    • limit (int) — Limit the number of returned circuits.
    • widget (bool) — If True (default), render the list as a Jupyter widget and return None.
    • pandas (bool) — If True, return the list as a Pandas DataFrame instead of a Python list. Defaults to False.
  • Returns: Circuits in a Python list or Pandas DataFrame, or None.
  • Return type: list | pandas.DataFrame | None

Examples

Display a table with a few of the most recent circuits:
>>> haiqu.list_circuits()  # in Jupyter notebook
Get the most recent circuit in a specific experiment:
>>> haiqu.list_circuits("Example Experiment", limit=1, widget=False)
[Haiqu Circuit 'circuit-123']

Haiqu.list_jobs(experiment_id: str | None = None, job_type: JobType | None = None, circuit: CircuitModel | str | None = None, limit: int = 10, widget: bool = True, pandas: bool = False) → str | list | None

List recent jobs. The jobs are filtered by experiment ID (with the current experiment used if not specified) and job type, and limited to only the most recent few (10 by default). Jobs can also be optionally filtered by circuit.
  • Parameters:
    • experiment_id (str | None) — Return jobs for the provided experiment ID.
    • job_type (JobType | None) — Filter jobs by type.
    • circuit (CircuitModel | str | None) — If not None, only show the jobs related to the given circuit (as a CircuitModel or circuit ID).
    • limit (int) — Limit the number of returned jobs.
    • widget (bool) — If True (default), render the list as a Jupyter widget and return None.
    • pandas (bool) — If True, return the list as a Pandas DataFrame instead of a Python list. Defaults to False.
  • Returns: Jobs in a Python list or Pandas DataFrame, or None.
  • Return type: list | pandas.DataFrame | None

Examples

Display a table with a few of the most recent jobs:
>>> haiqu.list_jobs()  # in Jupyter notebook
Get the most recent local job for a specific circuit (possibly in a different experiment):
>>> haiqu.list_jobs(
...     "exp-12345678-1234-5678-1234-567812345678",
...     job_type=haiqu.JobType.LOCAL,
...     circuit="circ-abcdefab-cdef-abcd-efab-cdefabcdefab",
...     limit=1,
...     widget=False,
... )
[BaseJobModel 'Local job 12345678-abcd-efab-1234-5678abcdefab'
 Run haiqu.list_jobs() to check its progress and access it by ID as
 haiqu.get_job("jb-abcdefab-1234-5678-abcd-efab12345678").
 Check further progress via: job.progress(), job.result()]

Haiqu.list_devices(widget: bool = True) → list | None

List devices for circuit transpilation and execution. Note that devices in the list may at times be offline or otherwise unavailable.
  • Parameters: widget (bool) — If True (default), render the list as a Jupyter widget and return None.
  • Returns: List of devices, or None.
  • Return type: list | None

Examples

>>> haiqu.list_devices()  # in Jupyter notebook
>>> haiqu.list_devices(widget=False)
[DeviceModel(...), DeviceModel(...), ...]