@epochcore/qaas-sdk
v1.0.0
Published
Official SDK for EpochCore Quantum as a Service (QaaS) API - Access 100 quantum computing algorithms
Downloads
83
Maintainers
Readme
Why QaaS?
Quantum computing is powerful but complex. QaaS removes the barriers:
| Traditional Quantum | With QaaS | |---------------------|-----------| | Learn Qiskit/Cirq/PennyLane | One unified API | | Manage quantum infrastructure | Fully managed cloud | | Write circuit code | Simple JSON parameters | | PhD-level knowledge required | Developer-friendly SDK |
Key Features
- 100 Algorithms — Amplitude estimation, Grover search, QAOA, QUBO, Quantum ML
- 3 Frameworks — Qiskit, Cirq, PennyLane unified under one API
- Multiple Backends — Simulator, Qiskit Aer, IBM Quantum hardware
- TypeScript SDK — Full type safety and IntelliSense support
- Usage Tracking — Monitor your quantum runs in real-time
- 99.9% Uptime SLA — Enterprise-grade reliability
Quick Start
npm install @epochcore/qaas-sdkimport { 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.3Installation
npm
npm install @epochcore/qaas-sdkyarn
yarn add @epochcore/qaas-sdkpnpm
pnpm add @epochcore/qaas-sdkUsage
Initialize the Client
import { QaaSClient } from '@epochcore/qaas-sdk';
const client = new QaaSClient({
apiKey: process.env.QAAS_API_KEY,
baseUrl: 'https://api.qaas.epochcoreqcs.com' // optional
});Run Quantum Algorithms
// 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
});Check Usage
const usage = await client.getUsage();
console.log(`Daily: ${usage.daily.used}/${usage.daily.limit}`);
console.log(`Monthly: ${usage.monthly.used}/${usage.monthly.limit}`);List Available Algorithms
const algorithms = await client.listAlgorithms();
algorithms.forEach(algo => {
console.log(`${algo.id}: ${algo.name} - ${algo.description}`);
});Algorithms
Categories
| 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 |
Popular Algorithms
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 ClassificationPricing
| 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
Base URL
https://api.qaas.epochcoreqcs.comEndpoints
| 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 |
Authentication
Include your API key in the request headers:
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}}'Response Format
{
"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
Portfolio Optimization
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], ...]
}
});Arbitrage Detection
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]]
}
});Risk Metrics (VaR/CVaR)
const risk = await client.runAlgorithm({
algorithm_id: 4, // VaR amplitude estimation
parameters: {
qubits: 10,
shots: 8192,
confidence: 0.95,
portfolio_value: 1000000
}
});Environment Variables
# Required
QAAS_API_KEY=your_api_key_here
# Optional
QAAS_BASE_URL=https://api.qaas.epochcoreqcs.com
QAAS_TIMEOUT=30000Error Handling
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.
# Clone the repository
git clone https://github.com/Jvryan92/qaas-sdk.git
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run buildSupport
- Documentation: qaas.epochcoreqcs.com/docs.html
- Discord: Join our community
- Email: [email protected]
- Issues: GitHub Issues
Links
License
Proprietary - Copyright (c) 2025 EpochCore. All Rights Reserved.
This SDK is provided for use with valid QaaS API subscriptions only. See LICENSE for full terms.
