@epochcore/qaas-sdk 1.0.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/LICENSE ADDED
@@ -0,0 +1,81 @@
1
+ EpochCore QaaS SDK License Agreement
2
+ =====================================
3
+
4
+ Copyright (c) 2025 EpochCore. All Rights Reserved.
5
+
6
+ IMPORTANT: READ CAREFULLY BEFORE USING THIS SOFTWARE
7
+
8
+ This EpochCore QaaS SDK ("Software") is the proprietary property of
9
+ EpochCore and is protected by copyright laws and international treaties.
10
+
11
+ 1. LICENSE GRANT
12
+ ----------------
13
+ Subject to the terms of this Agreement and a valid QaaS API subscription,
14
+ EpochCore grants you a limited, non-exclusive, non-transferable license to:
15
+
16
+ a) Use the Software to access the QaaS API services
17
+ b) Integrate the Software into your applications
18
+ c) Make copies of the Software for backup purposes only
19
+
20
+ 2. RESTRICTIONS
21
+ ---------------
22
+ You may NOT:
23
+
24
+ a) Modify, reverse engineer, decompile, or disassemble the Software
25
+ b) Remove or alter any proprietary notices, labels, or marks
26
+ c) Sublicense, rent, lease, or lend the Software to third parties
27
+ d) Use the Software to create a competing product or service
28
+ e) Use the Software without a valid QaaS API subscription
29
+ f) Redistribute the source code or any derivative works
30
+ g) Use automated means to access the API beyond your subscription limits
31
+
32
+ 3. INTELLECTUAL PROPERTY
33
+ ------------------------
34
+ The Software, including all algorithms, architecture, and implementations,
35
+ remains the exclusive property of EpochCore. This license does not grant
36
+ you any ownership rights to the Software or underlying quantum algorithms.
37
+
38
+ 4. API SUBSCRIPTION REQUIRED
39
+ ----------------------------
40
+ Use of this Software requires an active QaaS API subscription. The Software
41
+ will not function without valid API credentials obtained through:
42
+
43
+ https://qaas.epochcoreqcs.com
44
+
45
+ 5. TERMINATION
46
+ --------------
47
+ This license automatically terminates if you:
48
+
49
+ a) Violate any terms of this Agreement
50
+ b) Cancel or fail to renew your QaaS API subscription
51
+ c) Attempt to circumvent usage limits or access controls
52
+
53
+ Upon termination, you must destroy all copies of the Software.
54
+
55
+ 6. WARRANTY DISCLAIMER
56
+ ----------------------
57
+ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. EPOCHCORE
58
+ DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
59
+ THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
60
+ NON-INFRINGEMENT.
61
+
62
+ 7. LIMITATION OF LIABILITY
63
+ --------------------------
64
+ IN NO EVENT SHALL EPOCHCORE BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
65
+ SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING OUT OF OR RELATED
66
+ TO YOUR USE OF THE SOFTWARE.
67
+
68
+ 8. GOVERNING LAW
69
+ ----------------
70
+ This Agreement shall be governed by the laws of the State of Delaware,
71
+ United States, without regard to its conflict of law provisions.
72
+
73
+ 9. CONTACT
74
+ ----------
75
+ For licensing inquiries:
76
+ Email: CEO.QuantumAmazon@EpochCoreQcs.com
77
+ Web: https://epochcoreqcs.com
78
+
79
+ =====================================
80
+ EpochCore - Quantum Computing Solutions
81
+ All Rights Reserved 2025
package/README.md ADDED
@@ -0,0 +1,440 @@
1
+ <p align="center">
2
+ <img src="https://img.shields.io/badge/Quantum-Computing-6366f1?style=for-the-badge&logo=atom&logoColor=white" alt="Quantum Computing"/>
3
+ <img src="https://img.shields.io/badge/100+-Algorithms-10b981?style=for-the-badge" alt="100+ Algorithms"/>
4
+ <img src="https://img.shields.io/badge/REST-API-f59e0b?style=for-the-badge" alt="REST API"/>
5
+ </p>
6
+
7
+ <h1 align="center">
8
+ <br>
9
+ QaaS - Quantum as a Service
10
+ <br>
11
+ </h1>
12
+
13
+ <h4 align="center">Access 100 production-ready quantum algorithms via a simple REST API.</h4>
14
+
15
+ <p align="center">
16
+ <a href="https://www.npmjs.com/package/@epochcore/qaas-sdk">
17
+ <img src="https://img.shields.io/npm/v/@epochcore/qaas-sdk?color=6366f1&label=npm&logo=npm" alt="npm version">
18
+ </a>
19
+ <a href="https://github.com/Jvryan92/qaas-sdk/blob/main/LICENSE">
20
+ <img src="https://img.shields.io/badge/license-Proprietary-blue.svg" alt="License">
21
+ </a>
22
+ <a href="https://api.qaas.epochcoreqcs.com/health">
23
+ <img src="https://img.shields.io/badge/API-operational-brightgreen" alt="API Status">
24
+ </a>
25
+ <a href="https://github.com/Jvryan92/qaas-sdk/stargazers">
26
+ <img src="https://img.shields.io/github/stars/Jvryan92/qaas-sdk?style=social" alt="GitHub Stars">
27
+ </a>
28
+ </p>
29
+
30
+ <p align="center">
31
+ <a href="#key-features">Key Features</a> •
32
+ <a href="#quick-start">Quick Start</a> •
33
+ <a href="#installation">Installation</a> •
34
+ <a href="#usage">Usage</a> •
35
+ <a href="#algorithms">Algorithms</a> •
36
+ <a href="#pricing">Pricing</a> •
37
+ <a href="#api-reference">API Reference</a>
38
+ </p>
39
+
40
+ <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"/>
45
+ </p>
46
+
47
+ ---
48
+
49
+ ## Why QaaS?
50
+
51
+ Quantum computing is powerful but complex. QaaS removes the barriers:
52
+
53
+ | Traditional Quantum | With QaaS |
54
+ |---------------------|-----------|
55
+ | Learn Qiskit/Cirq/PennyLane | One unified API |
56
+ | Manage quantum infrastructure | Fully managed cloud |
57
+ | Write circuit code | Simple JSON parameters |
58
+ | PhD-level knowledge required | Developer-friendly SDK |
59
+
60
+ ---
61
+
62
+ ## Key Features
63
+
64
+ - **100 Algorithms** — Amplitude estimation, Grover search, QAOA, QUBO, Quantum ML
65
+ - **3 Frameworks** — Qiskit, Cirq, PennyLane unified under one API
66
+ - **Multiple Backends** — Simulator, Qiskit Aer, IBM Quantum hardware
67
+ - **TypeScript SDK** — Full type safety and IntelliSense support
68
+ - **Usage Tracking** — Monitor your quantum runs in real-time
69
+ - **99.9% Uptime SLA** — Enterprise-grade reliability
70
+
71
+ ---
72
+
73
+ ## Quick Start
74
+
75
+ ```bash
76
+ npm install @epochcore/qaas-sdk
77
+ ```
78
+
79
+ ```typescript
80
+ import { QaaSClient } from '@epochcore/qaas-sdk';
81
+
82
+ const client = new QaaSClient({ apiKey: 'your_api_key' });
83
+
84
+ // Run a quantum portfolio optimization
85
+ const result = await client.runAlgorithm({
86
+ algorithm_id: 41, // QAOA Portfolio Optimization
87
+ parameters: {
88
+ qubits: 4,
89
+ shots: 1024,
90
+ layers: 2
91
+ },
92
+ backend: 'qiskit_aer'
93
+ });
94
+
95
+ console.log(result.optimal_solution); // [1, 0, 1, 1]
96
+ console.log(result.objective_value); // 87.3
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Installation
102
+
103
+ ### npm
104
+
105
+ ```bash
106
+ npm install @epochcore/qaas-sdk
107
+ ```
108
+
109
+ ### yarn
110
+
111
+ ```bash
112
+ yarn add @epochcore/qaas-sdk
113
+ ```
114
+
115
+ ### pnpm
116
+
117
+ ```bash
118
+ pnpm add @epochcore/qaas-sdk
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Usage
124
+
125
+ ### Initialize the Client
126
+
127
+ ```typescript
128
+ import { QaaSClient } from '@epochcore/qaas-sdk';
129
+
130
+ const client = new QaaSClient({
131
+ apiKey: process.env.QAAS_API_KEY,
132
+ baseUrl: 'https://api.qaas.epochcoreqcs.com' // optional
133
+ });
134
+ ```
135
+
136
+ ### Run Quantum Algorithms
137
+
138
+ ```typescript
139
+ // Grover Search - Find optimal solution
140
+ const groverResult = await client.runAlgorithm({
141
+ algorithm_id: 21, // GROVER_BOOL_001
142
+ parameters: {
143
+ qubits: 4,
144
+ shots: 1024,
145
+ target: 7
146
+ }
147
+ });
148
+
149
+ // Amplitude Estimation - Option pricing
150
+ const aeResult = await client.runAlgorithm({
151
+ algorithm_id: 1, // AE_PROB_001
152
+ parameters: {
153
+ qubits: 6,
154
+ shots: 2048,
155
+ precision: 3
156
+ }
157
+ });
158
+
159
+ // QAOA - Combinatorial optimization
160
+ const qaoaResult = await client.runAlgorithm({
161
+ algorithm_id: 61, // QAOA_QUBO_001
162
+ parameters: {
163
+ qubits: 8,
164
+ shots: 4096,
165
+ layers: 3
166
+ },
167
+ backend: 'ibm_quantum' // Enterprise tier only
168
+ });
169
+ ```
170
+
171
+ ### Check Usage
172
+
173
+ ```typescript
174
+ const usage = await client.getUsage();
175
+ console.log(`Daily: ${usage.daily.used}/${usage.daily.limit}`);
176
+ console.log(`Monthly: ${usage.monthly.used}/${usage.monthly.limit}`);
177
+ ```
178
+
179
+ ### List Available Algorithms
180
+
181
+ ```typescript
182
+ const algorithms = await client.listAlgorithms();
183
+ algorithms.forEach(algo => {
184
+ console.log(`${algo.id}: ${algo.name} - ${algo.description}`);
185
+ });
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Algorithms
191
+
192
+ ### Categories
193
+
194
+ | Category | Count | Description |
195
+ |----------|-------|-------------|
196
+ | **Amplitude Estimation** | 20 | Option pricing, VaR/CVaR, Monte Carlo |
197
+ | **Grover Search** | 20 | Boolean SAT, arbitrage detection, pattern matching |
198
+ | **QAOA Optimization** | 20 | Portfolio optimization, risk parity, Max Sharpe |
199
+ | **QUBO Problems** | 20 | Max-cut, TSP, knapsack, graph coloring |
200
+ | **Quantum ML** | 10 | QSVM, QNN, QGAN, quantum PCA |
201
+ | **Special** | 10 | VQE, phase estimation, HHL, quantum walks |
202
+
203
+ ### Popular Algorithms
204
+
205
+ ```
206
+ ID Name Category Use Case
207
+ ─── ──────────────── ───────────────────── ────────────────
208
+ 1 AE_PROB_001 Amplitude Estimation Option Pricing
209
+ 21 GROVER_BOOL_001 Grover Search SAT Solving
210
+ 41 QAOA_PORT_001 QAOA Optimization Portfolio Opt
211
+ 61 QAOA_QUBO_001 QUBO Max-Cut
212
+ 86 QSVM_001 Quantum ML Classification
213
+ ```
214
+
215
+ ---
216
+
217
+ ## Pricing
218
+
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 |
225
+
226
+ <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"/>
235
+ </a>
236
+ </p>
237
+
238
+ ---
239
+
240
+ ## API Reference
241
+
242
+ ### Base URL
243
+
244
+ ```
245
+ https://api.qaas.epochcoreqcs.com
246
+ ```
247
+
248
+ ### Endpoints
249
+
250
+ | Method | Endpoint | Description |
251
+ |--------|----------|-------------|
252
+ | `GET` | `/health` | API health check |
253
+ | `GET` | `/api/quantum/algorithms` | List all algorithms |
254
+ | `GET` | `/api/quantum/algorithm/:id` | Get algorithm details |
255
+ | `POST` | `/api/quantum/run` | Execute quantum algorithm |
256
+ | `GET` | `/api/quantum/usage` | Get usage statistics |
257
+ | `GET` | `/api/pricing` | Get pricing information |
258
+
259
+ ### Authentication
260
+
261
+ Include your API key in the request headers:
262
+
263
+ ```bash
264
+ curl -X POST https://api.qaas.epochcoreqcs.com/api/quantum/run \
265
+ -H "X-API-Key: your_api_key" \
266
+ -H "Content-Type: application/json" \
267
+ -d '{"algorithm_id": 41, "parameters": {"qubits": 4}}'
268
+ ```
269
+
270
+ ### Response Format
271
+
272
+ ```json
273
+ {
274
+ "success": true,
275
+ "job_id": "qjob_1702339200_abc123",
276
+ "algorithm_id": 41,
277
+ "backend": "qiskit_aer",
278
+ "status": "completed",
279
+ "result": {
280
+ "optimal_solution": [1, 0, 1, 1],
281
+ "objective_value": 87.3,
282
+ "energy": -42.1
283
+ },
284
+ "execution_time_ms": 34,
285
+ "qubits_used": 4,
286
+ "shots": 1024,
287
+ "timestamp": "2025-12-11T18:30:00.000Z"
288
+ }
289
+ ```
290
+
291
+ ---
292
+
293
+ ## Examples
294
+
295
+ ### Portfolio Optimization
296
+
297
+ ```typescript
298
+ const portfolio = await client.runAlgorithm({
299
+ algorithm_id: 41, // Markowitz optimization
300
+ parameters: {
301
+ qubits: 6,
302
+ shots: 2048,
303
+ layers: 3,
304
+ assets: ['AAPL', 'GOOGL', 'MSFT', 'AMZN'],
305
+ returns: [0.12, 0.15, 0.10, 0.18],
306
+ covariance: [[0.04, 0.01, 0.02, 0.01], ...]
307
+ }
308
+ });
309
+ ```
310
+
311
+ ### Arbitrage Detection
312
+
313
+ ```typescript
314
+ const arbitrage = await client.runAlgorithm({
315
+ algorithm_id: 23, // Grover arbitrage search
316
+ parameters: {
317
+ qubits: 8,
318
+ shots: 4096,
319
+ price_matrix: [[1, 1.2, 0.9], [0.83, 1, 0.75], [1.11, 1.33, 1]]
320
+ }
321
+ });
322
+ ```
323
+
324
+ ### Risk Metrics (VaR/CVaR)
325
+
326
+ ```typescript
327
+ const risk = await client.runAlgorithm({
328
+ algorithm_id: 4, // VaR amplitude estimation
329
+ parameters: {
330
+ qubits: 10,
331
+ shots: 8192,
332
+ confidence: 0.95,
333
+ portfolio_value: 1000000
334
+ }
335
+ });
336
+ ```
337
+
338
+ ---
339
+
340
+ ## Environment Variables
341
+
342
+ ```bash
343
+ # Required
344
+ QAAS_API_KEY=your_api_key_here
345
+
346
+ # Optional
347
+ QAAS_BASE_URL=https://api.qaas.epochcoreqcs.com
348
+ QAAS_TIMEOUT=30000
349
+ ```
350
+
351
+ ---
352
+
353
+ ## Error Handling
354
+
355
+ ```typescript
356
+ try {
357
+ const result = await client.runAlgorithm({...});
358
+ } catch (error) {
359
+ if (error.code === 'USAGE_LIMIT_EXCEEDED') {
360
+ console.log('Upgrade your plan:', error.upgrade_url);
361
+ } else if (error.code === 'ALGORITHM_NOT_AVAILABLE') {
362
+ console.log('This algorithm requires:', error.required_tier);
363
+ } else {
364
+ console.error('Unexpected error:', error.message);
365
+ }
366
+ }
367
+ ```
368
+
369
+ ---
370
+
371
+ ## Contributing
372
+
373
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
374
+
375
+ ```bash
376
+ # Clone the repository
377
+ git clone https://github.com/Jvryan92/qaas-sdk.git
378
+
379
+ # Install dependencies
380
+ npm install
381
+
382
+ # Run tests
383
+ npm test
384
+
385
+ # Build
386
+ npm run build
387
+ ```
388
+
389
+ ---
390
+
391
+ ## Support
392
+
393
+ - **Documentation**: [qaas.epochcoreqcs.com/docs.html](https://qaas.epochcoreqcs.com/docs.html)
394
+ - **Discord**: [Join our community](https://discord.com/channels/1442677981808951338/1442677982568124500)
395
+ - **Email**: [CEO.QuantumAmazon@EpochCoreQcs.com](mailto:CEO.QuantumAmazon@EpochCoreQcs.com)
396
+ - **Issues**: [GitHub Issues](https://github.com/Jvryan92/qaas-sdk/issues)
397
+
398
+ ---
399
+
400
+ ## Links
401
+
402
+ <p align="center">
403
+ <a href="https://qaas.epochcoreqcs.com">
404
+ <img src="https://img.shields.io/badge/Website-qaas.epochcoreqcs.com-6366f1?style=flat-square" alt="Website"/>
405
+ </a>
406
+ <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"/>
408
+ </a>
409
+ <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"/>
411
+ </a>
412
+ </p>
413
+
414
+ ---
415
+
416
+ ## License
417
+
418
+ Proprietary - Copyright (c) 2025 EpochCore. All Rights Reserved.
419
+
420
+ This SDK is provided for use with valid QaaS API subscriptions only. See [LICENSE](LICENSE) for full terms.
421
+
422
+ ---
423
+
424
+ <p align="center">
425
+ <b>Built with quantum power by <a href="https://epochcoreqcs.com">EpochCore</a></b>
426
+ <br>
427
+ <sub>Powered by IBM Qiskit, Google Cirq, and Xanadu PennyLane</sub>
428
+ </p>
429
+
430
+ <p align="center">
431
+ <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"/>
433
+ </a>
434
+ <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"/>
436
+ </a>
437
+ <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"/>
439
+ </a>
440
+ </p>