@qbraid-core/ibm-cloud 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/client.d.ts +2 -3
- package/dist/src/client.js +55 -19
- package/dist/src/client.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/types.d.ts +9 -0
- package/package.json +2 -2
package/dist/src/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllDevicesResponse, DeviceProperties, DeviceConfiguration, DeviceStatus, JobList, Job, JobMetrics, GetJobParams, APIErrorResponse, JobTranspiledCircuitResponse } from './types';
|
|
1
|
+
import { AllDevicesResponse, DeviceProperties, DeviceConfiguration, DeviceErrors, DeviceStatus, JobList, Job, JobMetrics, GetJobParams, APIErrorResponse, JobTranspiledCircuitResponse } from './types';
|
|
2
2
|
export declare class IBMCloudClient {
|
|
3
3
|
private apiKey?;
|
|
4
4
|
private token?;
|
|
@@ -12,12 +12,10 @@ export declare class IBMCloudClient {
|
|
|
12
12
|
});
|
|
13
13
|
loadCredsFromFile(): {
|
|
14
14
|
apiKey?: string;
|
|
15
|
-
token?: string;
|
|
16
15
|
crn?: string;
|
|
17
16
|
};
|
|
18
17
|
loadCredsFromEnv(): {
|
|
19
18
|
apiKey?: string;
|
|
20
|
-
token?: undefined;
|
|
21
19
|
crn?: string;
|
|
22
20
|
};
|
|
23
21
|
private handleJobRequest;
|
|
@@ -25,6 +23,7 @@ export declare class IBMCloudClient {
|
|
|
25
23
|
getBackendProperties(backendName: string, updatedBefore?: string): Promise<DeviceProperties>;
|
|
26
24
|
getBackendConfiguration(backendName: string): Promise<DeviceConfiguration>;
|
|
27
25
|
getBackendStatus(backendName: string): Promise<DeviceStatus>;
|
|
26
|
+
getBackendErrors(backendName: string): Promise<DeviceErrors>;
|
|
28
27
|
getJobs(params?: GetJobParams): Promise<JobList | APIErrorResponse>;
|
|
29
28
|
getJob(jobId: string, excludeParams?: boolean): Promise<Job | APIErrorResponse>;
|
|
30
29
|
deleteJob(jobId: string): Promise<null | APIErrorResponse>;
|
package/dist/src/client.js
CHANGED
|
@@ -27,7 +27,7 @@ class IBMCloudClient {
|
|
|
27
27
|
creds = this.loadCredsFromEnv();
|
|
28
28
|
}
|
|
29
29
|
apiKey = creds.apiKey;
|
|
30
|
-
token =
|
|
30
|
+
token = undefined;
|
|
31
31
|
crn = creds.crn;
|
|
32
32
|
}
|
|
33
33
|
if (!apiKey && !token) {
|
|
@@ -56,23 +56,29 @@ class IBMCloudClient {
|
|
|
56
56
|
try {
|
|
57
57
|
if (fs_1.default.existsSync(filePath)) {
|
|
58
58
|
const rawData = fs_1.default.readFileSync(filePath, 'utf-8');
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
const parsedData = JSON.parse(rawData);
|
|
60
|
+
// Get the default-ibm-cloud credentials
|
|
61
|
+
if (parsedData['default-ibm-cloud']) {
|
|
62
|
+
const cloudCreds = parsedData['default-ibm-cloud'];
|
|
63
|
+
console.log('Loaded credentials from file');
|
|
64
|
+
return {
|
|
65
|
+
// In the IBM Cloud format, the token is equivalent to apiKey
|
|
66
|
+
apiKey: cloudCreds.token,
|
|
67
|
+
crn: cloudCreds.instance, // The instance field contains the CRN
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
console.log('IBM Cloud credentials not found in the file');
|
|
72
|
+
}
|
|
66
73
|
}
|
|
67
74
|
else {
|
|
68
75
|
console.log('Credentials file not found');
|
|
69
|
-
return {};
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
78
|
catch (error) {
|
|
73
|
-
console.error('Error loading credentials from file:', error);
|
|
74
|
-
return {};
|
|
79
|
+
console.error('Error loading credentials from file: ', error);
|
|
75
80
|
}
|
|
81
|
+
return {};
|
|
76
82
|
}
|
|
77
83
|
loadCredsFromEnv() {
|
|
78
84
|
// Loading account from environment variables
|
|
@@ -87,7 +93,6 @@ class IBMCloudClient {
|
|
|
87
93
|
console.log('Loaded credentials from env');
|
|
88
94
|
return {
|
|
89
95
|
apiKey: apiKey,
|
|
90
|
-
token: undefined,
|
|
91
96
|
crn: crn,
|
|
92
97
|
};
|
|
93
98
|
}
|
|
@@ -125,21 +130,52 @@ class IBMCloudClient {
|
|
|
125
130
|
const response = await this.client.get(`/backends/${backendName}/status`);
|
|
126
131
|
return response.data;
|
|
127
132
|
}
|
|
128
|
-
// 5. GET /
|
|
133
|
+
// 5. GET /backends/:backend_name/errors - get the gate errors of a specific backend
|
|
134
|
+
async getBackendErrors(backendName) {
|
|
135
|
+
const backendProps = await this.getBackendProperties(backendName);
|
|
136
|
+
const gates = backendProps.gates;
|
|
137
|
+
const gateErrors = {};
|
|
138
|
+
for (let gate of gates) {
|
|
139
|
+
const gateName = gate.gate;
|
|
140
|
+
// check if gate is not present
|
|
141
|
+
if (gateErrors[gateName] === undefined) {
|
|
142
|
+
gateErrors[gateName] = {
|
|
143
|
+
name: gate.name,
|
|
144
|
+
num_qubits: gate.qubits.length,
|
|
145
|
+
lowest: 1e6,
|
|
146
|
+
highest: 0,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const gateParams = gate.parameters;
|
|
150
|
+
for (let param of gateParams) {
|
|
151
|
+
if (param.name === 'gate_error') {
|
|
152
|
+
// update the gate errors
|
|
153
|
+
const error = param.value;
|
|
154
|
+
gateErrors[gateName].lowest = Math.min(gateErrors[gateName].lowest, error);
|
|
155
|
+
gateErrors[gateName].highest = Math.max(gateErrors[gateName].highest, error);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const errors = {
|
|
160
|
+
gate_errors: Object.values(gateErrors),
|
|
161
|
+
};
|
|
162
|
+
return errors;
|
|
163
|
+
}
|
|
164
|
+
// 6. GET /jobs - get all jobs from IBM
|
|
129
165
|
async getJobs(params) {
|
|
130
166
|
return this.handleJobRequest(this.client.get('/jobs', { params }));
|
|
131
167
|
}
|
|
132
|
-
//
|
|
168
|
+
// 7. GET /jobs/:job_id - get a specific job from IBM
|
|
133
169
|
async getJob(jobId, excludeParams) {
|
|
134
170
|
return this.handleJobRequest(this.client.get(`/jobs/${jobId}`, {
|
|
135
171
|
params: { exclude_params: excludeParams },
|
|
136
172
|
}));
|
|
137
173
|
}
|
|
138
|
-
//
|
|
174
|
+
// 8. DELETE /jobs/:job_id - delete a specific job from IBM
|
|
139
175
|
async deleteJob(jobId) {
|
|
140
176
|
return this.handleJobRequest(this.client.delete(`/jobs/${jobId}`));
|
|
141
177
|
}
|
|
142
|
-
//
|
|
178
|
+
// 9. POST /jobs/:job_id/cancel - cancel a specific job from IBM
|
|
143
179
|
async cancelJob(jobId, parentJobId) {
|
|
144
180
|
const customHeader = parentJobId ? { 'parent-job-id': parentJobId } : {};
|
|
145
181
|
return this.handleJobRequest(this.client.post(`/jobs/${jobId}/cancel`, null, {
|
|
@@ -149,15 +185,15 @@ class IBMCloudClient {
|
|
|
149
185
|
},
|
|
150
186
|
}));
|
|
151
187
|
}
|
|
152
|
-
//
|
|
188
|
+
// 10. GET /jobs/:job_id/logs - get logs of a specific job from IBM
|
|
153
189
|
async getJobLogs(jobId) {
|
|
154
190
|
return this.handleJobRequest(this.client.get(`/jobs/${jobId}/logs`));
|
|
155
191
|
}
|
|
156
|
-
//
|
|
192
|
+
// 11. GET /jobs/:job_id/transpiled_circuits - get transpiled circuits of a specific job from IBM
|
|
157
193
|
async getJobTranspiledCircuits(jobId) {
|
|
158
194
|
return this.handleJobRequest(this.client.get(`/jobs/${jobId}/transpiled_circuits`));
|
|
159
195
|
}
|
|
160
|
-
//
|
|
196
|
+
// 12. GET /jobs/:job_id/metrics - get metrics of a specific job from IBM
|
|
161
197
|
async getJobMetrics(jobId) {
|
|
162
198
|
return this.handleJobRequest(this.client.get(`/jobs/${jobId}/metrics`));
|
|
163
199
|
}
|
package/dist/src/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;;;;AAEvB,4CAAoB;AACpB,iCAA8B;AAC9B,4CAAoB;AACpB,gDAAwB;AAExB,kDAA4D;AAE5D,MAAM,OAAO,GAAG,YAAE,CAAC,OAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;;;;AAEvB,4CAAoB;AACpB,iCAA8B;AAC9B,4CAAoB;AACpB,gDAAwB;AAExB,kDAA4D;AAE5D,MAAM,OAAO,GAAG,YAAE,CAAC,OAAO,EAAE,CAAC;AAiB7B,MAAa,cAAc;IACjB,MAAM,CAAU;IAChB,KAAK,CAAU;IACf,GAAG,CAAS;IACZ,OAAO,CAAS;IAChB,MAAM,CAAgB;IAE9B,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAqD;QACnF,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC;YAC9B,gEAAgE;YAChE,gEAAgE;YAChE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACrC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACpC,KAAK,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAClC,CAAC;YACD,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YACtB,KAAK,GAAG,SAAS,CAAC;YAClB,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QAClB,CAAC;QAED,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,CAAC,GAAG,EAA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CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC;IACtF,CAAC;CACF;AAlOD,wCAkOC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @module ibm-cloud
|
|
3
3
|
*/
|
|
4
4
|
export { IBMCloudClient } from './client';
|
|
5
|
-
export type { APIErrorResponse, Job, JobMetrics, JobList, DeviceProperties, DeviceStatus, DeviceConfiguration, } from './types';
|
|
5
|
+
export type { APIErrorResponse, Job, JobMetrics, JobList, DeviceProperties, DeviceErrors, DeviceStatus, DeviceConfiguration, } from './types';
|
package/dist/src/types.d.ts
CHANGED
|
@@ -138,6 +138,15 @@ export interface DeviceStatus {
|
|
|
138
138
|
length_queue: number;
|
|
139
139
|
backend_version: string;
|
|
140
140
|
}
|
|
141
|
+
export interface GateError {
|
|
142
|
+
name: string;
|
|
143
|
+
num_qubits: number;
|
|
144
|
+
lowest: number;
|
|
145
|
+
highest: number;
|
|
146
|
+
}
|
|
147
|
+
export interface DeviceErrors {
|
|
148
|
+
gate_errors: GateError[];
|
|
149
|
+
}
|
|
141
150
|
export interface JobState {
|
|
142
151
|
status: string;
|
|
143
152
|
reason?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qbraid-core/ibm-cloud",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"types": "dist/src/index.d.ts",
|
|
6
6
|
"description": "Functionality for interacting with Qiskit Runtime services on qBraid Cloud.",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://qbraid.github.io/qbraid-core-js/modules/ibm-cloud.html",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"axios": "^1.
|
|
32
|
+
"axios": "^1.8.2",
|
|
33
33
|
"fs": "^0.0.1-security",
|
|
34
34
|
"ini": "^5.0.0"
|
|
35
35
|
},
|