@epochcore/qaas-sdk 1.0.0 → 1.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 CHANGED
@@ -1,3 +1,13 @@
1
+ /* QUANTUM_WATERMARK
2
+ * RAS=e5586ef939094a8e
3
+ * SIG=0000000067b05a96
4
+ * TIME=2025-12-13T03:52:05.794Z
5
+ * FREQ=7777.77Hz
6
+ * COHERENCE=0.9999988268147311
7
+ * PHI=1.618033988749895
8
+ * EpochCore Quantum Protected
9
+ */
10
+
1
11
  <p align="center">
2
12
  <img src="https://img.shields.io/badge/Quantum-Computing-6366f1?style=for-the-badge&logo=atom&logoColor=white" alt="Quantum Computing"/>
3
13
  <img src="https://img.shields.io/badge/100+-Algorithms-10b981?style=for-the-badge" alt="100+ Algorithms"/>
@@ -38,10 +48,18 @@
38
48
  </p>
39
49
 
40
50
  <p align="center">
41
- <img src="https://img.shields.io/badge/Qiskit-IBM-6929C4?style=flat-square&logo=ibm&logoColor=white" alt="Qiskit"/>
42
- <img src="https://img.shields.io/badge/Cirq-Google-4285F4?style=flat-square&logo=google&logoColor=white" alt="Cirq"/>
43
- <img src="https://img.shields.io/badge/PennyLane-Xanadu-00B4D8?style=flat-square" alt="PennyLane"/>
44
- <img src="https://img.shields.io/badge/TypeScript-Ready-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript"/>
51
+ <a href="https://qiskit.org">
52
+ <img src="https://img.shields.io/badge/IBM_Qiskit-6929C4?style=for-the-badge&logo=ibm&logoColor=white" alt="IBM Qiskit"/>
53
+ </a>
54
+ <a href="https://quantumai.google/cirq">
55
+ <img src="https://img.shields.io/badge/Google_Cirq-4285F4?style=for-the-badge&logo=google&logoColor=white" alt="Google Cirq"/>
56
+ </a>
57
+ <a href="https://pennylane.ai">
58
+ <img src="https://img.shields.io/badge/Xanadu_PennyLane-00B4D8?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyem0wIDE4Yy00LjQyIDAtOC0zLjU4LTgtOHMzLjU4LTggOC04IDggMy41OCA4IDgtMy41OCA4LTggOHoiLz48cGF0aCBkPSJNMTIgNmMtMy4zMSAwLTYgMi42OS02IDZzMi42OSA2IDYgNiA2LTIuNjkgNi02LTIuNjktNi02LTZ6bTAgMTBjLTIuMjEgMC00LTEuNzktNC00czEuNzktNCA0LTQgNCAxLjc5IDQgNC0xLjc5IDQtNCA0eiIvPjwvc3ZnPg==&logoColor=white" alt="Xanadu PennyLane"/>
59
+ </a>
60
+ <a href="https://www.typescriptlang.org">
61
+ <img src="https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript"/>
62
+ </a>
45
63
  </p>
46
64
 
47
65
  ---
@@ -216,25 +234,25 @@ ID Name Category Use Case
216
234
 
217
235
  ## Pricing
218
236
 
219
- | Tier | Price | Runs/Month | Algorithms | Backends |
220
- |------|-------|------------|------------|----------|
221
- | **Explorer** | Free | 300 | 25 | Simulator |
222
- | **Analyst** | $29/mo | 500 | 50 | Simulator, Qiskit Aer |
223
- | **Quant** | $99/mo | 2,500 | 100 | All frameworks |
224
- | **Enterprise** | $299/mo | Unlimited | 100 | + IBM Quantum hardware |
237
+ ### 🎉 100% Free During Beta
238
+
239
+ | Feature | Included |
240
+ |---------|----------|
241
+ | **All 100 Algorithms** | |
242
+ | **Unlimited API Calls** | |
243
+ | **Qiskit, Cirq, PennyLane** | ✅ |
244
+ | **Real IBM Quantum Access** | ✅ |
245
+ | **Full TypeScript SDK** | ✅ |
246
+ | **Community Discord** | ✅ |
225
247
 
226
248
  <p align="center">
227
- <a href="https://buy.stripe.com/cNi9AMaOv3jm2ZXe875Ne0A">
228
- <img src="https://img.shields.io/badge/Get_Analyst-$29/mo-6366f1?style=for-the-badge" alt="Get Analyst"/>
229
- </a>
230
- <a href="https://buy.stripe.com/9B628k3m36vy441e875Ne0B">
231
- <img src="https://img.shields.io/badge/Get_Quant-$99/mo-10b981?style=for-the-badge" alt="Get Quant"/>
232
- </a>
233
- <a href="https://buy.stripe.com/4gMfZa5ub07a1VT6FF5Ne0C">
234
- <img src="https://img.shields.io/badge/Get_Enterprise-$299/mo-f59e0b?style=for-the-badge" alt="Get Enterprise"/>
249
+ <a href="https://qaas.epochcoreqcs.com">
250
+ <img src="https://img.shields.io/badge/Get_Free_API_Key-10b981?style=for-the-badge" alt="Get Free API Key"/>
235
251
  </a>
236
252
  </p>
237
253
 
254
+ > 🚀 **Early adopters get lifetime free access.** Premium tiers coming soon.
255
+
238
256
  ---
239
257
 
240
258
  ## API Reference
@@ -401,13 +419,13 @@ npm run build
401
419
 
402
420
  <p align="center">
403
421
  <a href="https://qaas.epochcoreqcs.com">
404
- <img src="https://img.shields.io/badge/Website-qaas.epochcoreqcs.com-6366f1?style=flat-square" alt="Website"/>
422
+ <img src="https://img.shields.io/badge/Website-6366f1?style=for-the-badge&logo=googlechrome&logoColor=white" alt="Website"/>
405
423
  </a>
406
424
  <a href="https://qaas.epochcoreqcs.com/docs.html">
407
- <img src="https://img.shields.io/badge/Docs-API_Reference-10b981?style=flat-square" alt="Docs"/>
425
+ <img src="https://img.shields.io/badge/API_Docs-10b981?style=for-the-badge&logo=readthedocs&logoColor=white" alt="Docs"/>
408
426
  </a>
409
427
  <a href="https://www.npmjs.com/package/@epochcore/qaas-sdk">
410
- <img src="https://img.shields.io/badge/npm-@epochcore/qaas--sdk-CB3837?style=flat-square&logo=npm" alt="npm"/>
428
+ <img src="https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="npm"/>
411
429
  </a>
412
430
  </p>
413
431
 
@@ -429,12 +447,15 @@ This SDK is provided for use with valid QaaS API subscriptions only. See [LICENS
429
447
 
430
448
  <p align="center">
431
449
  <a href="https://github.com/Jvryan92/qaas-sdk">
432
- <img src="https://img.shields.io/badge/GitHub-Jvryan92/qaas--sdk-181717?style=flat-square&logo=github" alt="GitHub"/>
450
+ <img src="https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white" alt="GitHub"/>
451
+ </a>
452
+ <a href="https://www.npmjs.com/package/@epochcore/qaas-sdk">
453
+ <img src="https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="npm"/>
433
454
  </a>
434
455
  <a href="https://www.linkedin.com/in/john-ryan-515222377/">
435
- <img src="https://img.shields.io/badge/LinkedIn-John_Ryan-0A66C2?style=flat-square&logo=linkedin" alt="LinkedIn"/>
456
+ <img src="https://img.shields.io/badge/LinkedIn-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn"/>
436
457
  </a>
437
458
  <a href="https://youtube.com/@maxmesh-hft">
438
- <img src="https://img.shields.io/badge/YouTube-MaxMesh_HFT-FF0000?style=flat-square&logo=youtube" alt="YouTube"/>
459
+ <img src="https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white" alt="YouTube"/>
439
460
  </a>
440
461
  </p>
package/dist/index.d.mts CHANGED
@@ -1,13 +1,15 @@
1
- /**
2
- * EpochCore QaaS SDK
3
- * Official TypeScript/JavaScript SDK for Quantum as a Service API
4
- *
5
- * @packageDocumentation
6
- */
1
+ /** Max age for signed requests — server should reject older signatures */
2
+ declare const SIGNATURE_MAX_AGE_MS = 300000;
3
+ type ValidBackend = 'simulator' | 'qiskit_aer' | 'cirq' | 'pennylane' | 'ibm_quantum';
7
4
  interface QaaSConfig {
8
5
  apiKey?: string;
6
+ apiSecret?: string;
9
7
  baseUrl?: string;
10
8
  timeout?: number;
9
+ maxRetries?: number;
10
+ rateLimit?: number;
11
+ rateBurst?: number;
12
+ enableSigning?: boolean;
11
13
  }
12
14
  interface Algorithm {
13
15
  id: number;
@@ -41,7 +43,7 @@ interface PricingResponse {
41
43
  interface RunRequest {
42
44
  algorithm_id: string;
43
45
  parameters: Record<string, unknown>;
44
- backend?: 'simulator' | 'qiskit_aer' | 'cirq' | 'pennylane' | 'ibm_quantum';
46
+ backend?: ValidBackend;
45
47
  shots?: number;
46
48
  }
47
49
  interface RunResponse {
@@ -78,13 +80,16 @@ interface HealthResponse {
78
80
  }
79
81
  type AlgorithmCategory = 'amplitude_estimation' | 'grover_search' | 'qaoa_optimization' | 'qubo' | 'bernstein_vazirani' | 'deutsch_jozsa' | 'simon' | 'phase_estimation' | 'variational' | 'qml_classification' | 'qml_regression' | 'qml_clustering' | 'qml_anomaly';
80
82
  /**
81
- * EpochCore QaaS Client
83
+ * EpochCore QaaS Client — Quantum-Hardened
82
84
  *
83
85
  * @example
84
86
  * ```typescript
85
87
  * import { QaaSClient } from '@epochcore/qaas-sdk';
86
88
  *
87
- * const client = new QaaSClient({ apiKey: 'your-api-key' });
89
+ * const client = new QaaSClient({
90
+ * apiKey: 'your-api-key',
91
+ * apiSecret: 'your-signing-key', // enables HMAC request signing
92
+ * });
88
93
  *
89
94
  * // Get available algorithms
90
95
  * const algorithms = await client.getAlgorithms();
@@ -105,87 +110,72 @@ type AlgorithmCategory = 'amplitude_estimation' | 'grover_search' | 'qaoa_optimi
105
110
  declare class QaaSClient {
106
111
  private readonly baseUrl;
107
112
  private readonly apiKey?;
113
+ private readonly apiSecret?;
108
114
  private readonly timeout;
115
+ private readonly maxRetries;
116
+ private readonly enableSigning;
117
+ private readonly rateLimiter;
109
118
  constructor(config?: QaaSConfig);
110
119
  private request;
111
- /**
112
- * Check API health and status
113
- */
114
120
  health(): Promise<HealthResponse>;
115
- /**
116
- * Get pricing information for all tiers
117
- */
118
121
  getPricing(): Promise<PricingResponse>;
119
- /**
120
- * Get available algorithms for your tier
121
- */
122
122
  getAlgorithms(): Promise<AlgorithmsResponse>;
123
- /**
124
- * Get algorithms filtered by category
125
- */
126
123
  getAlgorithmsByCategory(category: AlgorithmCategory): Promise<Algorithm[]>;
127
- /**
128
- * Run a quantum algorithm
129
- */
130
124
  runAlgorithm(request: RunRequest): Promise<RunResponse>;
131
- /**
132
- * Get current usage statistics
133
- */
134
125
  getUsage(): Promise<UsageResponse>;
135
- /**
136
- * Run Markowitz portfolio optimization (QAOA)
137
- */
138
126
  optimizePortfolio(params: {
139
127
  assets: string[];
140
128
  returns: number[];
141
129
  covariance: number[][];
142
130
  risk_tolerance?: number;
143
- backend?: RunRequest['backend'];
131
+ backend?: ValidBackend;
144
132
  }): Promise<RunResponse>;
145
- /**
146
- * Run Value at Risk (VaR) estimation
147
- */
148
133
  estimateVaR(params: {
149
134
  portfolio_value: number;
150
135
  returns_history: number[];
151
136
  confidence_level?: number;
152
- backend?: RunRequest['backend'];
137
+ backend?: ValidBackend;
153
138
  }): Promise<RunResponse>;
154
- /**
155
- * Run Grover search for arbitrage opportunities
156
- */
157
139
  findArbitrage(params: {
158
140
  price_matrix: number[][];
159
141
  threshold?: number;
160
- backend?: RunRequest['backend'];
142
+ backend?: ValidBackend;
161
143
  }): Promise<RunResponse>;
162
- /**
163
- * Solve a QUBO problem
164
- */
165
144
  solveQUBO(params: {
166
145
  Q_matrix: number[][];
167
146
  num_reads?: number;
168
- backend?: RunRequest['backend'];
147
+ backend?: ValidBackend;
169
148
  }): Promise<RunResponse>;
170
- /**
171
- * Run Monte Carlo amplitude estimation
172
- */
173
149
  monteCarloEstimate(params: {
174
150
  target_function: string;
175
151
  num_samples?: number;
176
152
  epsilon?: number;
177
- backend?: RunRequest['backend'];
153
+ backend?: ValidBackend;
178
154
  }): Promise<RunResponse>;
155
+ quantumTeleport(params?: {
156
+ qubits?: number;
157
+ state?: string;
158
+ oscillation_cycles?: number;
159
+ source_backend?: string;
160
+ destination_backend?: string;
161
+ }): Promise<Record<string, unknown>>;
162
+ quantumTeleportStatus(): Promise<Record<string, unknown>>;
163
+ quantumTeleportPlan(params?: {
164
+ qubits?: number;
165
+ state?: string;
166
+ strategy?: string;
167
+ }): Promise<Record<string, unknown>>;
179
168
  }
180
- /**
181
- * QaaS API Error
182
- */
183
169
  declare class QaaSError extends Error {
184
170
  readonly statusCode: number;
185
- readonly response?: unknown | undefined;
186
- constructor(message: string, statusCode: number, response?: unknown | undefined);
171
+ constructor(message: string, statusCode: number);
172
+ }
173
+ declare class QaaSValidationError extends Error {
174
+ constructor(message: string);
175
+ }
176
+ declare class QaaSRateLimitError extends Error {
177
+ constructor(message: string);
187
178
  }
188
- declare const qaas: QaaSClient;
189
179
  declare const ALGORITHMS: {
190
180
  readonly AMPLITUDE_ESTIMATION: {
191
181
  readonly PROB_001: "AE_PROB_001";
@@ -217,4 +207,4 @@ declare const ALGORITHMS: {
217
207
  };
218
208
  };
219
209
 
220
- export { ALGORITHMS, type Algorithm, type AlgorithmCategory, type AlgorithmsResponse, type HealthResponse, type PricingResponse, type PricingTier, QaaSClient, type QaaSConfig, QaaSError, type RunRequest, type RunResponse, type UsageResponse, qaas };
210
+ export { ALGORITHMS, type Algorithm, type AlgorithmCategory, type AlgorithmsResponse, type HealthResponse, type PricingResponse, type PricingTier, QaaSClient, type QaaSConfig, QaaSError, QaaSRateLimitError, QaaSValidationError, type RunRequest, type RunResponse, SIGNATURE_MAX_AGE_MS, type UsageResponse };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
- /**
2
- * EpochCore QaaS SDK
3
- * Official TypeScript/JavaScript SDK for Quantum as a Service API
4
- *
5
- * @packageDocumentation
6
- */
1
+ /** Max age for signed requests — server should reject older signatures */
2
+ declare const SIGNATURE_MAX_AGE_MS = 300000;
3
+ type ValidBackend = 'simulator' | 'qiskit_aer' | 'cirq' | 'pennylane' | 'ibm_quantum';
7
4
  interface QaaSConfig {
8
5
  apiKey?: string;
6
+ apiSecret?: string;
9
7
  baseUrl?: string;
10
8
  timeout?: number;
9
+ maxRetries?: number;
10
+ rateLimit?: number;
11
+ rateBurst?: number;
12
+ enableSigning?: boolean;
11
13
  }
12
14
  interface Algorithm {
13
15
  id: number;
@@ -41,7 +43,7 @@ interface PricingResponse {
41
43
  interface RunRequest {
42
44
  algorithm_id: string;
43
45
  parameters: Record<string, unknown>;
44
- backend?: 'simulator' | 'qiskit_aer' | 'cirq' | 'pennylane' | 'ibm_quantum';
46
+ backend?: ValidBackend;
45
47
  shots?: number;
46
48
  }
47
49
  interface RunResponse {
@@ -78,13 +80,16 @@ interface HealthResponse {
78
80
  }
79
81
  type AlgorithmCategory = 'amplitude_estimation' | 'grover_search' | 'qaoa_optimization' | 'qubo' | 'bernstein_vazirani' | 'deutsch_jozsa' | 'simon' | 'phase_estimation' | 'variational' | 'qml_classification' | 'qml_regression' | 'qml_clustering' | 'qml_anomaly';
80
82
  /**
81
- * EpochCore QaaS Client
83
+ * EpochCore QaaS Client — Quantum-Hardened
82
84
  *
83
85
  * @example
84
86
  * ```typescript
85
87
  * import { QaaSClient } from '@epochcore/qaas-sdk';
86
88
  *
87
- * const client = new QaaSClient({ apiKey: 'your-api-key' });
89
+ * const client = new QaaSClient({
90
+ * apiKey: 'your-api-key',
91
+ * apiSecret: 'your-signing-key', // enables HMAC request signing
92
+ * });
88
93
  *
89
94
  * // Get available algorithms
90
95
  * const algorithms = await client.getAlgorithms();
@@ -105,87 +110,72 @@ type AlgorithmCategory = 'amplitude_estimation' | 'grover_search' | 'qaoa_optimi
105
110
  declare class QaaSClient {
106
111
  private readonly baseUrl;
107
112
  private readonly apiKey?;
113
+ private readonly apiSecret?;
108
114
  private readonly timeout;
115
+ private readonly maxRetries;
116
+ private readonly enableSigning;
117
+ private readonly rateLimiter;
109
118
  constructor(config?: QaaSConfig);
110
119
  private request;
111
- /**
112
- * Check API health and status
113
- */
114
120
  health(): Promise<HealthResponse>;
115
- /**
116
- * Get pricing information for all tiers
117
- */
118
121
  getPricing(): Promise<PricingResponse>;
119
- /**
120
- * Get available algorithms for your tier
121
- */
122
122
  getAlgorithms(): Promise<AlgorithmsResponse>;
123
- /**
124
- * Get algorithms filtered by category
125
- */
126
123
  getAlgorithmsByCategory(category: AlgorithmCategory): Promise<Algorithm[]>;
127
- /**
128
- * Run a quantum algorithm
129
- */
130
124
  runAlgorithm(request: RunRequest): Promise<RunResponse>;
131
- /**
132
- * Get current usage statistics
133
- */
134
125
  getUsage(): Promise<UsageResponse>;
135
- /**
136
- * Run Markowitz portfolio optimization (QAOA)
137
- */
138
126
  optimizePortfolio(params: {
139
127
  assets: string[];
140
128
  returns: number[];
141
129
  covariance: number[][];
142
130
  risk_tolerance?: number;
143
- backend?: RunRequest['backend'];
131
+ backend?: ValidBackend;
144
132
  }): Promise<RunResponse>;
145
- /**
146
- * Run Value at Risk (VaR) estimation
147
- */
148
133
  estimateVaR(params: {
149
134
  portfolio_value: number;
150
135
  returns_history: number[];
151
136
  confidence_level?: number;
152
- backend?: RunRequest['backend'];
137
+ backend?: ValidBackend;
153
138
  }): Promise<RunResponse>;
154
- /**
155
- * Run Grover search for arbitrage opportunities
156
- */
157
139
  findArbitrage(params: {
158
140
  price_matrix: number[][];
159
141
  threshold?: number;
160
- backend?: RunRequest['backend'];
142
+ backend?: ValidBackend;
161
143
  }): Promise<RunResponse>;
162
- /**
163
- * Solve a QUBO problem
164
- */
165
144
  solveQUBO(params: {
166
145
  Q_matrix: number[][];
167
146
  num_reads?: number;
168
- backend?: RunRequest['backend'];
147
+ backend?: ValidBackend;
169
148
  }): Promise<RunResponse>;
170
- /**
171
- * Run Monte Carlo amplitude estimation
172
- */
173
149
  monteCarloEstimate(params: {
174
150
  target_function: string;
175
151
  num_samples?: number;
176
152
  epsilon?: number;
177
- backend?: RunRequest['backend'];
153
+ backend?: ValidBackend;
178
154
  }): Promise<RunResponse>;
155
+ quantumTeleport(params?: {
156
+ qubits?: number;
157
+ state?: string;
158
+ oscillation_cycles?: number;
159
+ source_backend?: string;
160
+ destination_backend?: string;
161
+ }): Promise<Record<string, unknown>>;
162
+ quantumTeleportStatus(): Promise<Record<string, unknown>>;
163
+ quantumTeleportPlan(params?: {
164
+ qubits?: number;
165
+ state?: string;
166
+ strategy?: string;
167
+ }): Promise<Record<string, unknown>>;
179
168
  }
180
- /**
181
- * QaaS API Error
182
- */
183
169
  declare class QaaSError extends Error {
184
170
  readonly statusCode: number;
185
- readonly response?: unknown | undefined;
186
- constructor(message: string, statusCode: number, response?: unknown | undefined);
171
+ constructor(message: string, statusCode: number);
172
+ }
173
+ declare class QaaSValidationError extends Error {
174
+ constructor(message: string);
175
+ }
176
+ declare class QaaSRateLimitError extends Error {
177
+ constructor(message: string);
187
178
  }
188
- declare const qaas: QaaSClient;
189
179
  declare const ALGORITHMS: {
190
180
  readonly AMPLITUDE_ESTIMATION: {
191
181
  readonly PROB_001: "AE_PROB_001";
@@ -217,4 +207,4 @@ declare const ALGORITHMS: {
217
207
  };
218
208
  };
219
209
 
220
- export { ALGORITHMS, type Algorithm, type AlgorithmCategory, type AlgorithmsResponse, type HealthResponse, type PricingResponse, type PricingTier, QaaSClient, type QaaSConfig, QaaSError, type RunRequest, type RunResponse, type UsageResponse, qaas };
210
+ export { ALGORITHMS, type Algorithm, type AlgorithmCategory, type AlgorithmsResponse, type HealthResponse, type PricingResponse, type PricingTier, QaaSClient, type QaaSConfig, QaaSError, QaaSRateLimitError, QaaSValidationError, type RunRequest, type RunResponse, SIGNATURE_MAX_AGE_MS, type UsageResponse };