Skip to main content

ISA & Pulse Execution Modes

SoftQCOS provides two execution modes for quantum circuits, each optimized for different use cases.

Overview​

ModeBest ForAbstraction LevelPortability
ISA ModePortability & compatibilityGate-levelβœ… High
Pulse ModePerformance & precisionPulse-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 CaseWhy ISA Mode
Learning & PrototypingSimple, standard gate syntax
Cross-backend comparisonSame circuit, different hardware
Production workloadsReliable, well-tested
Multi-supplier strategyVendor 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:

  1. Maps logical qubits to physical qubits
  2. Decomposes gates to native gate set
  3. Optimizes circuit depth for the target hardware
  4. 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​

BenefitDescription
PortabilitySame circuit works on any QCOS Compatible backend
Automatic OptimizationQCOS optimizes for target hardware
Error HandlingStandard error taxonomy
TelemetryConsistent 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:

  1. Pulse Certified backend
  2. Backend-specific pulse knowledge
  3. Current calibration data

When to Use Pulse Mode​

Use CaseWhy Pulse Mode
Error mitigation researchCustom pulse sequences
Gate calibrationFine-tuning gate parameters
Novel algorithmsBeyond standard gate set
Maximum fidelityOptimal 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​

BenefitDescription
Maximum FidelityFine-tuned pulse parameters
Custom GatesDefine any unitary operation
Error MitigationDynamical decoupling, DD sequences
ResearchNovel 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​

AspectISA ModePulse Mode
AbstractionGate-levelPulse-level
Portabilityβœ… High⚠️ Backend-specific
Ease of Useβœ… SimpleRequires expertise
PerformanceGoodMaximum
FlexibilityStandard gatesAny operation
CertificationQCOS CompatiblePulse Certified

For Backend Manufacturers​

Supporting ISA Mode​

To achieve QCOS Compatible (ISA) certification:

  1. Implement get_capabilities() returning native gates
  2. Implement transpile_to_native() for gate decomposition
  3. Pass all 10 ACOS-ISA tests

Supporting Pulse Mode​

To achieve Pulse Certified certification:

  1. First obtain QCOS Compatible (ISA) certification
  2. Implement pulse-level API endpoints
  3. Provide calibration data endpoint
  4. 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