@qbraid-core/devices 0.1.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/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # @qbraid-core/devices
2
+
3
+ Client for the qBraid Quantum Devices service.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @qbraid-core/devices
9
+ ```
10
+
11
+ ## Usage Example
12
+
13
+ ```typescript
14
+ import { QuantumDevicesClient } from '@qbraid-core/devices';
15
+
16
+ const client = new QuantumDevicesClient();
17
+
18
+ const devices = await client.getDevices();
19
+
20
+ devices.forEach(device => console.log(`${device.qbraid_id} - ${device.status}`));
21
+ ```
@@ -0,0 +1,6 @@
1
+ import { QbraidClient, Config } from '@qbraid-core/base';
2
+ import { Device } from './types';
3
+ export declare class QuantumDevicesClient extends QbraidClient {
4
+ constructor(config?: Config);
5
+ getDevices(): Promise<Device[]>;
6
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuantumDevicesClient = void 0;
4
+ const base_1 = require("@qbraid-core/base");
5
+ class QuantumDevicesClient extends base_1.QbraidClient {
6
+ constructor(config) {
7
+ super(config);
8
+ }
9
+ async getDevices() {
10
+ const response = await this.session.request('GET', '/quantum-devices');
11
+ return response.data;
12
+ }
13
+ }
14
+ exports.QuantumDevicesClient = QuantumDevicesClient;
15
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;AAAA,4CAAyD;AAGzD,MAAa,oBAAqB,SAAQ,mBAAY;IACpD,YAAY,MAAe;QACzB,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,UAAU;QACd,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAW,KAAK,EAAE,kBAAkB,CAAC,CAAC;QACjF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF;AATD,oDASC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @module devices
3
+ */
4
+ export { QuantumDevicesClient } from './client';
5
+ export type { Device, DevicePricing } from './types';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuantumDevicesClient = void 0;
4
+ /**
5
+ * @module devices
6
+ */
7
+ var client_1 = require("./client");
8
+ Object.defineProperty(exports, "QuantumDevicesClient", { enumerable: true, get: function () { return client_1.QuantumDevicesClient; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mCAAgD;AAAvC,8GAAA,oBAAoB,OAAA"}
@@ -0,0 +1,22 @@
1
+ export interface DevicePricing {
2
+ perTask: number;
3
+ perShot: number;
4
+ perMinute: number;
5
+ }
6
+ export interface Device {
7
+ qbraid_id: string;
8
+ name: string;
9
+ provider: string;
10
+ vendor: string;
11
+ numberQubits: number;
12
+ pendingJobs: number;
13
+ paradigm: string;
14
+ type: string;
15
+ runPackage: string;
16
+ status: string;
17
+ statusMsg?: string;
18
+ isAvailable: boolean;
19
+ nextAvailable?: string;
20
+ pricing?: DevicePricing;
21
+ [key: string]: unknown;
22
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@qbraid-core/devices",
3
+ "description": "Client for the qBraid Quantum Devices service.",
4
+ "version": "0.1.0",
5
+ "main": "dist/src/index.js",
6
+ "types": "dist/src/index.d.ts",
7
+ "author": "qBraid Development Team",
8
+ "license": "Proprietary",
9
+ "files": [
10
+ "dist/src"
11
+ ],
12
+ "keywords": [
13
+ "qbraid",
14
+ "qbraid-core",
15
+ "qbraid-core-js",
16
+ "qbraid devices",
17
+ "qbraid quantum devices",
18
+ "qbraid cloud",
19
+ "qbraid api",
20
+ "qbraid apis",
21
+ "cloud",
22
+ "quantum",
23
+ "quantum computing"
24
+ ],
25
+ "repository": {
26
+ "type": "git",
27
+ "directory": "packages/devices",
28
+ "url": "git+https://github.com/qBraid/qbraid-core-js.git"
29
+ },
30
+ "homepage": "https://qbraid.github.io/qbraid-core-js/modules/devices.html",
31
+ "dependencies": {
32
+ "@qbraid-core/base": "0.1.0"
33
+ },
34
+ "scripts": {
35
+ "clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
36
+ "lint": "eslint src",
37
+ "lint:fix": "eslint src --fix",
38
+ "format": "prettier --write \"src/**/*.{ts,json}\"",
39
+ "format:check": "prettier --check \"src/**/*.{ts,json}\"",
40
+ "docs": "typedoc"
41
+ },
42
+ "engines": {
43
+ "node": ">=20"
44
+ }
45
+ }