Skip to content

Quick Start Guide

Q-Memory is an advanced hybrid memory system that combines different technologies for ultra-fast quantum parameter storage.

Traditional storage uses SSD/disk (slow, 50-100ms latency). Q-Memory achieves 10,000× faster parameter checkpointing through:

  1. Dual-parameter cells: Store θ (resistance) and φ (capacitance) independently
  2. Non-volatile storage: Parameters persist without power
  3. High endurance: Up to 10⁹ write cycles for frequent updates
  4. Native quantum encoding: Direct mapping to quantum gate angles (RY, RZ)

Result: Near-zero overhead quantum parameter checkpointing (<0.0001%)

Q-Memory will be developed in three phases:

  • Storage: 5 bits per cell (32 levels)
  • Target: Small quantum models (64-1,024 parameters)
  • Performance: 6.4µs for 64 parameters
  • Status: Design complete, ready for fabrication
  • Storage: 10.4 bits per cell (1,440 states)
  • Target: Medium models (1K-16K parameters)
  • Performance: 3.2µs for 64 parameters
  • Density: 2× parameters per cell
  • Status: Fabricated and validated ✓
  • Array: 256×256 crossbar (65,536 cells)
  • Target: Large models (16K+ parameters)
  • Performance: <1µs parallel write
  • Features: FPGA acceleration, async execution, BCH ECC
  • Status: Production-ready ✓

Performance Comparison (64 quantum parameters)

Section titled “Performance Comparison (64 quantum parameters)”
SpecificationSSD (Zarr)Phase 1Phase 2
Write Latency50-100 ms3.2 µs<1 µs
Training Overhead0.16-0.33%0.0001%0.00003%
SpeedupBaseline15,600×50,000×
Idle Power5-10 W<50 mW<50 mW
Endurance10⁵ writes5×10⁷10⁹
PhaseArray SizeMax ParametersModels Supported
Phase 04×416Tiny (4q×3d)
Phase 14×432Small-Medium
Phase 2256×25632,768All sizes
from qstore.algorithms import VQE
# Setup VQE for molecular simulation
vqe = VQE(
molecule='H2',
ansatz='UCCSD',
backend='ionq',
optimizer='COBYLA'
)
# Enable Q-Memory for parameter persistence
vqe.set_checkpoint_backend(qmemory_backend)
# Run optimization (parameters automatically saved)
result = await vqe.run_async(max_iterations=1000)
print(f"Ground state energy: {result.energy}")
print(f"Q-Memory checkpoint overhead: <0.0002%")
from qstore.algorithms import QAOA
# Setup QAOA for graph optimization
qaoa = QAOA(
problem='maxcut',
graph=my_graph,
depth=4,
backend='ibm'
)
# Enable Q-Memory
qaoa.set_checkpoint_backend(qmemory_backend)
# Run optimization
result = await qaoa.optimize_async(num_iterations=500)
print(f"Best solution: {result.best_solution}")
print(f"Checkpoint overhead: negligible")

Use Case 3: Quantum Neural Network Training

Section titled “Use Case 3: Quantum Neural Network Training”
# Full example with Fashion MNIST
from qstore.datasets import load_fashion_mnist
# Load data
train_data, test_data = load_fashion_mnist(batch_size=32)
# Define model (from Step 3)
model = QuantumNeuralNetwork(...)
model.set_checkpoint_backend(qmemory_backend)
# Train with automatic checkpointing
trainer = AsyncQuantumTrainer(model, ...)
await trainer.train_async(
train_data=train_data,
epochs=100,
checkpoint_every=1 # Q-Memory every epoch
)
# Evaluate
accuracy = await trainer.evaluate_async(test_data)
print(f"Test accuracy: {accuracy:.2%}")

Q-Memory implements a two-tier approach:

# Every epoch: Quantum parameters only
await qmemory_backend.write_quantum_parameters_async(
layer_id=epoch,
parameters=model.get_quantum_parameters()
)
# Latency: <1µs (Phase 2)
# Overhead: 0.00003%
# Every 10 epochs: Full model state
if epoch % 10 == 0:
await trainer.save_checkpoint(f'full_checkpoint_{epoch}.zarr')
# Latency: 50-100ms
# Includes: All layers, optimizer state, metrics

Best of both worlds: Ultra-fast quantum parameters + comprehensive model preservation

Typical Training (8q×4d QuantumFeatureExtractor)

Section titled “Typical Training (8q×4d QuantumFeatureExtractor)”
Total training time: 50 minutes
- Quantum execution: 47.5 min (95%)
- Classical ops: 2.4 min (4.8%)
- Q-Memory checkpoints: 0.0032 sec (0.00006%)
Result: NEGLIGIBLE overhead ✓
Model SizeSSD LatencyQ-Memory Phase 2Speedup
Small (24 params)30 ms1.2 µs25,000×
Medium (64 params)50 ms3.2 µs15,600×
Large (256 params)200 ms13 µs15,400×
ComponentSSDQ-MemorySavings
Idle power5-10 W<50 mW100-200×
Active write8-12 W1-2 W4-12×