π Quantum Virtual Machine (QVM)
A high-performance, backend-agnostic quantum circuit scheduler and runtime for multi-job quantum computing
π Table of Contents
- Introduction
- Features
- Architecture
- Installation
- Quick Start
- Advanced Usage
- SDK & API
- Performance
- Contributing
- License
π Introduction
The Quantum Virtual Machine (QVM) is a cutting-edge scheduler and runtime system designed to optimize the execution of multiple quantum circuits on quantum hardware. By intelligently partitioning device topologies and scheduling jobs with spatial and temporal multiplexing, QVM maximizes quantum resource utilization while minimizing crosstalk and execution time.
Why QVM?
- π― Multi-Job Scheduling: Run multiple quantum circuits simultaneously on the same hardware
- π§ Hardware Agnostic: Works with any OpenQASM 3.0 compatible quantum backend
- β‘ WASM Ready: Deploy quantum scheduling directly in web browsers
- π‘οΈ Crosstalk Mitigation: Intelligent buffer zones between quantum operations
- π Optimal Resource Usage: Advanced bin-packing algorithms for maximum efficiency
β¨ Features
Core Capabilities
| Feature | Description |
|---|---|
| π€ OpenQASM 3 Parser | Full support for quantum gates, measurements, and classical control |
| πΊοΈ Topology Management | Graph-based hardware abstraction with tile partitioning |
| π¦ Bin-Packing Scheduler | FFD, BFD, WFD, NFD algorithms for optimal job placement |
| π Circuit Composition | Automatic qubit mapping and QASM generation |
| π WASM Support | Browser-ready with async/await for web applications |
| π Async Runtime | Tokio-based async scheduling for high performance |
Supported Quantum Gates
// Single-qubit gates
h, x, y, z, s, sdg, t, tdg, sx, rx, ry, rz, p, u
// Two-qubit gates
cx, cy, cz, ch, cp, crx, cry, crz, swap, iswap
// Three-qubit gates
ccx , cswap
Hardware Topologies
- Grid - 2D rectangular lattice
- Linear - 1D chain topology
- Ring - Circular connectivity
- Star - Central hub architecture
- Heavy-Hex - IBM-style hexagonal lattice
- Custom - User-defined topologies via JSON
ποΈ Architecture
graph TB
A[OpenQASM 3 Input] --> B[Parser]
B --> C[Circuit IR]
C --> D[Scheduler]
E[Hardware Topology] --> D
D --> F[Bin-Packing]
F --> G[Tile Assignment]
G --> H[Composer]
H --> I[Composite QASM Output]
π¦ Installation
From Source
# Clone the repository
# Build the project
# Run tests
As a Rust Dependency
Add to your Cargo.toml:
[]
= "0.1.0"
WASM Build
# Install wasm-pack
|
# Build WASM module
π Quick Start
Basic Usage
use ;
async
CLI Usage
# Schedule quantum circuits from QASM files
# Use custom topology
# Generate visualization
π§ Advanced Usage
Custom Scheduling Strategies
use ;
let config = builder
.strategy
.optimization_level
.enable_lookahead
.max_lookahead_depth
.build;
let scheduler = new
.with_config;
Buffer Zone Configuration
use ;
let buffer_config = builder
.strategy
.min_distance
.effectiveness_threshold
.build;
let scheduler = new
.with_buffer_config;
Topology Customization
// Load from JSON
let topology = from_json_file?;
// Create programmatically
let mut builder = new;
builder.add_qubit;
builder.add_qubit;
builder.add_connection; // 99% fidelity
let topology = builder.build;
WASM Integration
import init from './pkg/qvm_scheduler.js';
π SDK & API
Rust API
Core Types
// Main scheduler
// Circuit builder
// Topology builder
Scheduling Strategies
REST API (Coming Soon)
# Submit scheduling job
{
}
# Get scheduling result
# List available topologies
Python SDK (Coming Soon)
# Create scheduler
=
=
# Schedule circuits
=
=
π Performance
Benchmarks
| Metric | Performance |
|---|---|
| Small batches (< 10 circuits) | < 10ms |
| Medium batches (10-100 circuits) | < 100ms |
| Large batches (100-1000 circuits) | < 1s |
| Memory overhead | < 100MB for 1000 circuits |
| WASM overhead | < 2x native speed |
| Qubit utilization | > 70% average |
Optimization Results
βββββββββββββββββββββββββββββββββββββββ
β Benchmark: 100 Random Circuits β
βββββββββββββββββββββββββββββββββββββββ€
β Naive scheduling: 15 batches β
β QVM scheduling: 8 batches β
β Improvement: 47% reduction β
β Qubit utilization: 78% β
β Crosstalk events: 0 β
βββββββββββββββββββββββββββββββββββββββ
π€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Install Rust
|
# Install development tools
# Run in watch mode
Running Tests
# Unit tests
# Integration tests
# Benchmarks
# With coverage
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- OpenQASM 3.0 specification contributors
- Rust async community
- WebAssembly ecosystem
- Quantum computing research community
π Contact
- GitHub Issues: Report bugs or request features
- Discussions: Join the conversation