UNPKG

@qbraid-core/ibm-cloud

Version:

Client for interacting with IBM's Qiskit Runtime Service via the IBM Cloud API.

29 lines (28 loc) 1.52 kB
import { IBMConfig } from './config'; import { AllDevicesResponse, DeviceProperties, DeviceConfiguration, DeviceErrors, DeviceStatus, JobList, Job, JobMetrics, GetJobParams, APIErrorResponse, JobTranspiledCircuitResponse } from './types'; export declare class IBMCloudClient { private baseUrl; private client; private configManager; constructor({ apiKey, token, crn, configManager, }: { apiKey?: string; token?: string; crn?: string; configManager?: IBMConfig; }); private refreshBearerToken; private fetchNewBearerToken; private handleJobRequest; getBackends(): Promise<AllDevicesResponse>; getBackendProperties(backendName: string, updatedBefore?: string): Promise<DeviceProperties>; getBackendConfiguration(backendName: string): Promise<DeviceConfiguration>; getBackendStatus(backendName: string): Promise<DeviceStatus>; getBackendErrors(backendName: string): Promise<DeviceErrors>; getJobs(params?: GetJobParams): Promise<JobList | APIErrorResponse>; getJob(jobId: string, excludeParams?: boolean): Promise<Job | APIErrorResponse>; deleteJob(jobId: string): Promise<null | APIErrorResponse>; cancelJob(jobId: string, parentJobId?: string): Promise<null | APIErrorResponse>; getJobLogs(jobId: string): Promise<string | APIErrorResponse>; getJobTranspiledCircuits(jobId: string): Promise<JobTranspiledCircuitResponse | APIErrorResponse>; getJobMetrics(jobId: string): Promise<JobMetrics | APIErrorResponse>; }