ISA & Pulse Execution Modes
SoftQCOS provides two execution modes for quantum circuits, each optimized for different use cases.
Overviewβ
| Mode | Best For | Abstraction Level | Portability |
|---|---|---|---|
| ISA Mode | Portability & compatibility | Gate-level | β High |
| Pulse Mode | Performance & precision | Pulse-level | β οΈ Hardware-specific |
USER CIRCUIT
β
ββββββββββββ΄βββββββββββ
β β
βΌ βΌ
ββββββββββββ ββββββββββββ
β ISA Mode β βPulse Modeβ
ββββββββββββ ββββββββββββ
β β
βΌ βΌ
ββββββββββββ ββββββββββββ
βTranspile β β Direct β
βto Native β β Pulse β
β Gates β β Control β
ββββββββββββ ββββββββββββ
β β
ββββββββββββ¬β ββββββββββ
β
βΌ
ββββββββββββ
β Quantum β
β Hardware β
ββββββββββββ
ISA Mode (Instruction Set Architecture)β
What is ISA Mode?β
ISA Mode executes quantum circuits at the gate level, automatically transpiling your circuit to the backend's native gate set.
When to Use ISA Modeβ
| Use Case | Why ISA Mode |
|---|---|
| Learning & Prototyping | Simple, standard gate syntax |
| Cross-backend comparison | Same circuit, different hardware |
| Production workloads | Reliable, well-tested |
| Multi-supplier strategy | Vendor independence |
How It Worksβ
Your Circuit Backend Native Gates Hardware
β β β
β H β CX β Meas β β
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β Input QASM ββββΆβ Transpiler ββββΆβ Execution β
β β β (Automatic) β β β
β OPENQASM 3.0; β β H β RZ,RX,RZ β β Physical β
β qubit[2] q; β β CX β Native CZ β β Pulses β
β h q[0]; β β β β β
β cx q[0],q[1]; β β β β β
βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
Example: ISA Mode Executionβ
from softqcos_sdk import QCOSClient
client = QCOSClient(api_key="your-api-key")
# Standard gate-level circuit
circuit = """
OPENQASM 3.0;
include "stdgates.inc";
qubit[2] q;
bit[2] c;
// Bell state preparation
h q[0];
cx q[0], q[1];
c = measure q;
"""
# Execute in ISA mode (default)
result = client.execute(
circuit=circuit,
backend="ibm_brisbane",
shots=1024,
mode="isa" # Default mode
)
print(f"Counts: {result.counts}")
# Output: {'00': 512, '11': 512}
Transpilation Detailsβ
The QCOS transpiler automatically:
- Maps logical qubits to physical qubits
- Decomposes gates to native gate set
- Optimizes circuit depth for the target hardware
- Routes through connectivity constraints
# Get transpilation details
result = client.execute(
circuit=circuit,
backend="ibm_brisbane",
shots=1024,
return_transpiled=True
)
print(f"Original depth: {result.original_depth}")
print(f"Transpiled depth: {result.transpiled_depth}")
print(f"Native gates used: {result.native_gates}")
print(f"Transpiled circuit:\n{result.transpiled_circuit}")
ISA Mode Benefitsβ
| Benefit | Description |
|---|---|
| Portability | Same circuit works on any QCOS Compatible backend |
| Automatic Optimization | QCOS optimizes for target hardware |
| Error Handling | Standard error taxonomy |
| Telemetry | Consistent metrics across backends |
Pulse Modeβ
What is Pulse Mode?β
Pulse Mode allows direct pulse-level control of the quantum hardware, bypassing the gate abstraction for maximum performance and precision.
Requirements
Pulse Mode requires:
- Pulse Certified backend
- Backend-specific pulse knowledge
- Current calibration data
When to Use Pulse Modeβ
| Use Case | Why Pulse Mode |
|---|---|
| Error mitigation research | Custom pulse sequences |
| Gate calibration | Fine-tuning gate parameters |
| Novel algorithms | Beyond standard gate set |
| Maximum fidelity | Optimal control techniques |
How It Worksβ
Your Pulse Schedule Hardware
β β
βΌ βΌ
βββββββββββββββββββ ββββββββββββββββ
β Pulse Program ββββββββΆβ Direct β
β β β AWG β
β Drive(0, amp, β β Control β
β freq, β β β
β dur) β β β
βββββββββββββββββββ ββββββββββββββββ
Example: Pulse Mode Executionβ
from softqcos_sdk import QCOSClient
from softqcos_sdk.pulse import (
DriveChannel,
GaussianPulse,
PulseSchedule
)
client = QCOSClient(api_key="your-api-key")
# Get current calibration data
calibration = client.get_calibration("ibm_brisbane")
# Create pulse schedule
schedule = PulseSchedule()
# Add X gate on qubit 0 (custom amplitude)
x_pulse = GaussianPulse(
duration=calibration.gates["x"]["duration"],
amplitude=calibration.gates["x"]["amplitude"],
sigma=calibration.gates["x"]["sigma"]
)
schedule.add(
channel=DriveChannel(0),
pulse=x_pulse,
time=0
)
# Execute in pulse mode
result = client.execute_pulse(
schedule=schedule,
backend="ibm_brisbane",
shots=1024
)
print(f"Counts: {result.counts}")
Calibration Dataβ
Access current calibration for optimal pulses:
# Get full calibration
cal = client.get_calibration("ibm_brisbane")
# Gate calibrations
print(f"X gate duration: {cal.gates['x']['duration']} ns")
print(f"X gate amplitude: {cal.gates['x']['amplitude']}")
print(f"CX gate duration: {cal.gates['cx']['duration']} ns")
# Qubit properties
print(f"Qubit 0 T1: {cal.qubits[0].t1} Β΅s")
print(f"Qubit 0 T2: {cal.qubits[0].t2} Β΅s")
print(f"Qubit 0 frequency: {cal.qubits[0].frequency} GHz")
# Readout calibration
print(f"Readout duration: {cal.readout.duration} ns")
print(f"Readout frequency: {cal.readout.frequency} GHz")
Custom Gate Definitionsβ
Define custom gates with pulse-level control:
from softqcos_sdk.pulse import (
DriveChannel,
DRAGPulse,
PulseSchedule,
CustomGate
)
# Define a custom DRAG X gate
custom_x = CustomGate(
name="my_x",
qubits=[0],
schedule=PulseSchedule([
(DriveChannel(0), DRAGPulse(
duration=160,
amplitude=0.25,
sigma=40,
beta=0.1 # DRAG parameter
), 0)
])
)
# Use in circuit
circuit = """
OPENQASM 3.0;
gate my_x q { /* pulse defined */ }
qubit q;
my_x q;
measure q;
"""
result = client.execute(
circuit=circuit,
backend="ibm_brisbane",
shots=1024,
custom_gates={"my_x": custom_x}
)
Pulse Mode Benefitsβ
| Benefit | Description |
|---|---|
| Maximum Fidelity | Fine-tuned pulse parameters |
| Custom Gates | Define any unitary operation |
| Error Mitigation | Dynamical decoupling, DD sequences |
| Research | Novel control techniques |
Choosing the Right Modeβ
Decision Flowβ
START
β
βΌ
βββββββββββββββββββββββββββ
β Need cross-backend β
β portability? β
βββββββββββββββββββββββββββ
βYes βNo
βΌ βΌ
ββββββββββ βββββββββββββββββββββββββββ
βISA Modeβ β Need maximum fidelity β
ββββββββββ β or custom pulses? β
βββββββββββββββββββββββββββ
βYes βNo
βΌ βΌ
ββββββββββββ ββββββββββ
βPulse Modeβ βISA Modeβ
ββββββββββββ ββββββββββ
Comparisonβ
| Aspect | ISA Mode | Pulse Mode |
|---|---|---|
| Abstraction | Gate-level | Pulse-level |
| Portability | β High | β οΈ Backend-specific |
| Ease of Use | β Simple | Requires expertise |
| Performance | Good | Maximum |
| Flexibility | Standard gates | Any operation |
| Certification | QCOS Compatible | Pulse Certified |
For Backend Manufacturersβ
Supporting ISA Modeβ
To achieve QCOS Compatible (ISA) certification:
- Implement
get_capabilities()returning native gates - Implement
transpile_to_native()for gate decomposition - Pass all 10 ACOS-ISA tests
Supporting Pulse Modeβ
To achieve Pulse Certified certification:
- First obtain QCOS Compatible (ISA) certification
- Implement pulse-level API endpoints
- Provide calibration data endpoint
- Pass additional ACOS-PULSE tests
# Backend must implement:
class PulseBackend:
def get_calibration(self) -> CalibrationData:
"""Return current calibration."""
...
def execute_pulse(
self,
schedule: PulseSchedule,
shots: int
) -> ExecutionResult:
"""Execute pulse schedule."""
...
def validate_schedule(
self,
schedule: PulseSchedule
) -> ValidationResult:
"""Validate pulse schedule."""
...
API Referenceβ
ISA Mode Optionsβ
result = client.execute(
circuit=circuit,
backend="backend-id",
shots=1024,
mode="isa",
# Transpilation options
optimization_level=2, # 0-3
return_transpiled=True, # Include transpiled circuit
seed_transpiler=42, # Reproducibility
# Execution options
memory=True, # Return shot-by-shot results
timeout_seconds=300, # Maximum wait time
)
Pulse Mode Optionsβ
result = client.execute_pulse(
schedule=schedule,
backend="backend-id",
shots=1024,
# Calibration options
use_cached_calibration=False, # Get fresh calibration
calibration_id="cal-xyz", # Specific calibration
# Execution options
memory=True,
timeout_seconds=300,
)
Supportβ
- ISA Mode: All QCOS Compatible backends
- Pulse Mode: Pulse Certified backends only
- Questions: support@softquantus.com