TL;DR
EFaaS (Entangled Function-as-a-Service) is a novel serverless middleware designed to bridge the massive latency gap between classical CPUs and Quantum Processing Units (QPUs) in hybrid variational quantum workflows. By treating classical optimization and quantum execution as co-scheduled, "entangled" events, EFaaS dramatically reduces iteration latency, maximizes quantum hardware utilization, and eliminates performance degradation caused by quantum hardware drift.
What Problem Does This Paper Address?
Realizing near-term quantum advantage relies heavily on Hybrid Variational Quantum Algorithms (VQAs), such as the Variational Quantum Eigensolver (VQE) and the Quantum Approximate Optimization Algorithm (QAOA). As shown in Figure 1, these algorithms operate as a tightly coupled loop: a classical CPU optimizer updates parameterized variables, which are then evaluated as a cost function on a QPU through repeated circuit executions (shots).
However, current quantum cloud access models rely on multi-tenant batch queues. Every time a VQA completes an iteration, the updated circuit is sent to the back of a FIFO queue. This introduces massive Time-to-Next-Shot (TTNS) latency, inflating total runtime from minutes to days.
Worse still, this delay exposes the system to quantum hardware drift. QPU calibration data goes stale over a limited temporal window ($\tau_{drift}$). When queue delays exceed this threshold, the system suffers a "cold start," forcing either a costly recalibration cycle or execution on stale data that corrupts the optimization landscape. While statically reserving a QPU avoids queues, it is economically wasteful because the expensive QPU sits idle while the CPU calculates parameter updates.
Methods
The authors propose EFaaS, a serverless scheduling middleware that sits between the classical cloud orchestrator and the quantum control plane.
EFaaS introduces three core innovations to optimize the hybrid loop:
- Calibration-Aware Placement Strategy: Instead of tearing down the quantum environment after a circuit runs, EFaaS implements "Session Awareness." It caches QPU calibration data and dynamically routes subsequent iterations back to the same QPU, provided the elapsed time is within the physical drift threshold ($\tau_{drift}$), effectively eliminating cold starts.
- Dual-Resource Fair Queuing (DRFQ): This scheduling policy extends Dominant Resource Fairness to a setting with physical staleness constraints. It identifies active loops as "Hot Iterators" and gives them a massive priority boost, ensuring that as soon as a classical node yields a parameter update, the QPU executes it immediately.
- The
EF-QuantumFutureAbstraction: A programming primitive that enables classical speculative execution. It allows the classical CPU to perform result-independent tasks—such as transpiling the next candidate circuit or warming up non-quantum nodes—concurrently while awaiting QPU results, masking compute latency.
Datasets
The framework was evaluated using a comprehensive discrete-event simulator implemented with SimPy and instrumented with Qiskit Aer-based quantum evaluations. The workload consisted of a benchmark suite of 31 standard circuits stratified across three complexity bands:
- Simple: 2–5 qubits, circuit depths of 6–32.
- Medium: 6–10 qubits, circuit depths of 13–69.
- Complex: 10–16 qubits, circuit depths of 33–141.
The evaluations utilized Lithium Hydride (LiH) and transverse-field Ising-chain Hamiltonians.
Key Insights and Ideas
- Physical vs. Software Invariants: Unlike classical session affinity (which relies on software invariants like container liveness or cache hits), quantum session affinity must be governed by a physical threshold derived from qubit drift dynamics.
- Speculative Execution Without Rollbacks: The
EF-QuantumFutureprimitive elegantly avoids the need for complex rollback or commit mechanisms. It doesn't speculate on the optimizer's actual parameter updates (which depend on the QPU results); instead, it overlaps strictly result-independent classical prep-work with QPU execution time. - The Flaw of Warm Dispatch Without Calibration Caching: The paper highlights why existing pilot-job models (like Pilot-Quantum) still fail under complexity; though they reduce startup overhead, they lack session-aware calibration caching. As classical optimization steps grow longer in complex circuits, the inter-shot gap regularly exceeds the drift threshold, triggering performance-degrading recalibrations.
Key Results
EFaaS was benchmarked against four architectures: Standard Batch-Queue (SBQ), Pure FaaS (PF), Static Reservation (SR), and Pilot-Quantum (PQ).
- Latency Reduction: EFaaS achieved TTNS reductions of 11.4% to 94.3%, bringing the round-trip delay down to a near-hardware-minimum of ~3.6 seconds.
- Quantum Duty Cycle (QDC) Gains: EFaaS achieved the highest QPU utilization (mean QDC of 23.4%), outperforming SBQ and PF by over 13 percentage points. Remarkably, it even beat Static Reservation by 2.2 percentage points because the
EF-QuantumFutureoverlap minimized QPU idle time during classical updates. - Convergence Speedups: End-to-end VQA convergence times were accelerated by 83.2% to 98.3% across the benchmark suite.
- Drift Elimination: EFaaS accumulated virtually zero drift penalty events (only 1 outlier across the entire 219-run benchmark suite), compared to 95 events for SBQ and 89 for Pilot-Quantum.
Limitations and Future Work
The primary limitation acknowledged by the authors is that the evaluation was conducted via a high-fidelity discrete-event simulator rather than a live production quantum cloud deployment. While the simulator explicitly modeled real-world variables (like lognormal queue delays and Poisson background contention), validating the exact magnitude of these scheduling advantages against real provider queue logs and physical hardware remains an important direction for future work.
Summary updated