QubitOS¶
Open-Source Quantum Control Kernel
QubitOS is a pulse optimization and hardware abstraction layer for quantum computing research. It provides tools for generating high-fidelity control pulses using the GRAPE algorithm and executing them on quantum backends.
-
:material-rocket-launch:{ .lg .middle } Get Started in 15 Minutes
Install QubitOS, start the HAL server, and execute your first quantum gate pulse.
-
:material-book-open-variant:{ .lg .middle } Learn the Concepts
Understand the architecture, GRAPE optimization, and how pulses control quantum systems.
-
:material-api:{ .lg .middle } API Reference
Complete Python, REST, and gRPC API documentation with examples.
-
:material-notebook:{ .lg .middle } Interactive Notebooks
Hands-on Jupyter notebooks for pulse generation, optimization, and advanced usage.
What is QubitOS?¶
QubitOS provides three core capabilities:
1. Pulse Optimization (GRAPE)¶
Generate optimal control pulses for quantum gates using the GRadient Ascent Pulse Engineering algorithm:
from qubitos.pulsegen import GrapeOptimizer, GrapeConfig
from qubitos.pulsegen.hamiltonians import get_target_unitary
# Configure optimization
config = GrapeConfig(
num_time_steps=100,
duration_ns=50,
target_fidelity=0.999,
)
# Optimize X-gate pulse
optimizer = GrapeOptimizer(config)
target = get_target_unitary("X", num_qubits=1)
result = optimizer.optimize(target, num_qubits=1)
print(f"Achieved fidelity: {result.fidelity:.4f}") # result.fidelity is the final gate fidelity
2. Hardware Abstraction Layer (HAL)¶
Execute pulses on quantum backends through a unified gRPC/REST interface:
from qubitos.client import HALClientSync
# Connect to HAL server
with HALClientSync("localhost:50051") as client:
# Execute the optimized pulse
result = client.execute_pulse(
i_envelope=pulse.i_envelope,
q_envelope=pulse.q_envelope,
duration_ns=50,
target_qubits=[0],
num_shots=1024,
)
print(f"Measurement: {result.bitstring_counts}")
3. Calibration Management¶
Load and validate hardware calibration data:
from qubitos.calibrator import CalibrationLoader
loader = CalibrationLoader()
calibration = loader.load("path/to/calibration.yaml")
# Check calibration is still valid
if calibration.is_valid:
print(f"T1: {calibration.t1_us} µs")
print(f"T2: {calibration.t2_us} µs")
Architecture¶
QubitOS follows a three-layer architecture:
┌─────────────────────────────────────────────────────┐
│ User Layer │
│ ┌─────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ CLI │ │ Python API │ │ Jupyter Notebooks│ │
│ └────┬────┘ └──────┬──────┘ └────────┬────────┘ │
└───────┼──────────────┼──────────────────┼───────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────┐
│ Core Layer │
│ ┌──────────────┐ ┌────────────┐ ┌─────────────┐ │
│ │ Pulse Gen │ │ Calibrator │ │ Validation │ │
│ │ (GRAPE) │ │ │ │ │ │
│ └──────┬───────┘ └─────┬──────┘ └──────┬──────┘ │
└─────────┼────────────────┼────────────────┼─────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────┐
│ Hardware Abstraction Layer │
│ ┌───────────────────────────────────────────────┐ │
│ │ HAL Server (Rust + gRPC/REST) │ │
│ └───────────────────────┬───────────────────────┘ │
│ │ │
│ ┌──────────┐ ┌─────────┴─────────┐ ┌──────────┐ │
│ │ QuTiP │ │ IQM Garnet │ │ Future │ │
│ │Simulator │ │ (Hardware) │ │ Backends │ │
│ └──────────┘ └───────────────────┘ └──────────┘ │
└─────────────────────────────────────────────────────┘
Repository Structure¶
QubitOS consists of three repositories:
| Repository | Purpose | Language |
|---|---|---|
| qubit-os-proto | Protocol Buffers definitions | Protobuf |
| qubit-os-hardware | Hardware Abstraction Layer | Rust |
| qubit-os-core | Python modules and CLI | Python |
Quick Links¶
- Installation Guide - Detailed setup instructions
- Quickstart - Your first pulse in 15 minutes
- CLI Reference - Command-line interface documentation
- Troubleshooting - Common issues and solutions
- Design Document - Technical specification
License¶
QubitOS is released under the Apache License 2.0.
Contributing¶
We welcome contributions! See our Contributing Guide for details.
Built with MkDocs and Material for MkDocs