Official SDK for EpochCore Quantum as a Service (QaaS) API - Access 100 quantum computing algorithms
npm install @epochcore/qaas-sdk
Key Features •
Quick Start •
Installation •
Usage •
Algorithms •
Pricing •
API Reference
bash
npm install @epochcore/qaas-sdk
`
`typescript
import { QaaSClient } from '@epochcore/qaas-sdk';
const client = new QaaSClient({ apiKey: 'your_api_key' });
// Run a quantum portfolio optimization
const result = await client.runAlgorithm({
algorithm_id: 41, // QAOA Portfolio Optimization
parameters: {
qubits: 4,
shots: 1024,
layers: 2
},
backend: 'qiskit_aer'
});
console.log(result.optimal_solution); // [1, 0, 1, 1]
console.log(result.objective_value); // 87.3
`
---
Installation
$3
`bash
npm install @epochcore/qaas-sdk
`
$3
`bash
yarn add @epochcore/qaas-sdk
`
$3
`bash
pnpm add @epochcore/qaas-sdk
`
---
Usage
$3
`typescript
import { QaaSClient } from '@epochcore/qaas-sdk';
const client = new QaaSClient({
apiKey: process.env.QAAS_API_KEY,
baseUrl: 'https://api.qaas.epochcoreqcs.com' // optional
});
`
$3
`typescript
// Grover Search - Find optimal solution
const groverResult = await client.runAlgorithm({
algorithm_id: 21, // GROVER_BOOL_001
parameters: {
qubits: 4,
shots: 1024,
target: 7
}
});
// Amplitude Estimation - Option pricing
const aeResult = await client.runAlgorithm({
algorithm_id: 1, // AE_PROB_001
parameters: {
qubits: 6,
shots: 2048,
precision: 3
}
});
// QAOA - Combinatorial optimization
const qaoaResult = await client.runAlgorithm({
algorithm_id: 61, // QAOA_QUBO_001
parameters: {
qubits: 8,
shots: 4096,
layers: 3
},
backend: 'ibm_quantum' // Enterprise tier only
});
`
$3
`typescript
const usage = await client.getUsage();
console.log(Daily: ${usage.daily.used}/${usage.daily.limit});
console.log(Monthly: ${usage.monthly.used}/${usage.monthly.limit});
`
$3
`typescript
const algorithms = await client.listAlgorithms();
algorithms.forEach(algo => {
console.log(${algo.id}: ${algo.name} - ${algo.description});
});
`
---
Algorithms
$3
| Category | Count | Description |
|----------|-------|-------------|
| Amplitude Estimation | 20 | Option pricing, VaR/CVaR, Monte Carlo |
| Grover Search | 20 | Boolean SAT, arbitrage detection, pattern matching |
| QAOA Optimization | 20 | Portfolio optimization, risk parity, Max Sharpe |
| QUBO Problems | 20 | Max-cut, TSP, knapsack, graph coloring |
| Quantum ML | 10 | QSVM, QNN, QGAN, quantum PCA |
| Special | 10 | VQE, phase estimation, HHL, quantum walks |
$3
`
ID Name Category Use Case
─── ──────────────── ───────────────────── ────────────────
1 AE_PROB_001 Amplitude Estimation Option Pricing
21 GROVER_BOOL_001 Grover Search SAT Solving
41 QAOA_PORT_001 QAOA Optimization Portfolio Opt
61 QAOA_QUBO_001 QUBO Max-Cut
86 QSVM_001 Quantum ML Classification
`
---
Pricing
| Tier | Price | Runs/Month | Algorithms | Backends |
|------|-------|------------|------------|----------|
| Explorer | Free | 300 | 25 | Simulator |
| Analyst | $29/mo | 500 | 50 | Simulator, Qiskit Aer |
| Quant | $99/mo | 2,500 | 100 | All frameworks |
| Enterprise | $299/mo | Unlimited | 100 | + IBM Quantum hardware |
---
API Reference
$3
`
https://api.qaas.epochcoreqcs.com
`
$3
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /health | API health check |
| GET | /api/quantum/algorithms | List all algorithms |
| GET | /api/quantum/algorithm/:id | Get algorithm details |
| POST | /api/quantum/run | Execute quantum algorithm |
| GET | /api/quantum/usage | Get usage statistics |
| GET | /api/pricing | Get pricing information |
$3
Include your API key in the request headers:
`bash
curl -X POST https://api.qaas.epochcoreqcs.com/api/quantum/run \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"algorithm_id": 41, "parameters": {"qubits": 4}}'
`
$3
`json
{
"success": true,
"job_id": "qjob_1702339200_abc123",
"algorithm_id": 41,
"backend": "qiskit_aer",
"status": "completed",
"result": {
"optimal_solution": [1, 0, 1, 1],
"objective_value": 87.3,
"energy": -42.1
},
"execution_time_ms": 34,
"qubits_used": 4,
"shots": 1024,
"timestamp": "2025-12-11T18:30:00.000Z"
}
`
---
Examples
$3
`typescript
const portfolio = await client.runAlgorithm({
algorithm_id: 41, // Markowitz optimization
parameters: {
qubits: 6,
shots: 2048,
layers: 3,
assets: ['AAPL', 'GOOGL', 'MSFT', 'AMZN'],
returns: [0.12, 0.15, 0.10, 0.18],
covariance: [[0.04, 0.01, 0.02, 0.01], ...]
}
});
`
$3
`typescript
const arbitrage = await client.runAlgorithm({
algorithm_id: 23, // Grover arbitrage search
parameters: {
qubits: 8,
shots: 4096,
price_matrix: [[1, 1.2, 0.9], [0.83, 1, 0.75], [1.11, 1.33, 1]]
}
});
`
$3
`typescript
const risk = await client.runAlgorithm({
algorithm_id: 4, // VaR amplitude estimation
parameters: {
qubits: 10,
shots: 8192,
confidence: 0.95,
portfolio_value: 1000000
}
});
`
---
Environment Variables
`bash
Required
QAAS_API_KEY=your_api_key_here
Optional
QAAS_BASE_URL=https://api.qaas.epochcoreqcs.com
QAAS_TIMEOUT=30000
`
---
Error Handling
`typescript
try {
const result = await client.runAlgorithm({...});
} catch (error) {
if (error.code === 'USAGE_LIMIT_EXCEEDED') {
console.log('Upgrade your plan:', error.upgrade_url);
} else if (error.code === 'ALGORITHM_NOT_AVAILABLE') {
console.log('This algorithm requires:', error.required_tier);
} else {
console.error('Unexpected error:', error.message);
}
}
`
---
Contributing
We welcome contributions! Please see our Contributing Guide for details.
`bash
Clone the repository
git clone https://github.com/Jvryan92/qaas-sdk.git
Install dependencies
npm install
Run tests
npm test
Build
npm run build
``
Built with quantum power by EpochCore
Powered by IBM Qiskit, Google Cirq, and Xanadu PennyLane