Abstract
Quantum circuit simulators are essential tools for developing quantum algorithms in the pre-fault-tolerant era. However, this paper demonstrates that these simulators leak sensitive information through timing side-channels. By employing a machine learning pipeline that combines K-Nearest Neighbors (KNN) and Wasserstein distance matching, researchers can identify specific quantum circuits with high accuracy. The framework achieves a 91.13% overall identification rate, rising to 99.9% for medium-scale circuits. These findings highlight a significant security risk for proprietary quantum algorithms hosted on shared cloud platforms.
Introduction
As the quantum computing landscape expands, the high cost and limited availability of physical quantum hardware have led many researchers to rely on cloud-based simulators like Qiskit Aer. These simulators execute on classical hardware, often within multi-tenant cloud environments. This paper addresses a critical security vulnerability: the computational complexity of simulating a quantum circuit is intrinsically linked to its structure, specifically the number of qubits and the sequence of gates. Consequently, the execution time serves as a unique "fingerprint." A malicious actor co-located on the same server could exploit these timing variations to reconstruct proprietary quantum algorithms, effectively stealing intellectual property without direct access to circuit files.
Methodology
The proposed attack framework utilizes a three-stage machine learning pipeline to exploit timing leaks:
- Data Collection & Feature Engineering: High-resolution timing data, including average, median, and min/max latency per "shot," along with memory usage metrics, are collected. These features are then standardized using z-score normalization.
- KNN-Based Range Estimation: A K-Nearest Neighbor (KNN) model is used to predict a plausible range for the number of qubits and gates. This step acts as a filter, narrowing the search space from hundreds of potential circuits to a manageable set of 10–14 candidates.
- Wasserstein Distance Matching: To achieve precise identification, the statistical distribution of the victim's timing traces is compared against known profiles using the Wasserstein distance (Earth Mover's Distance). This allows the framework to distinguish between circuits with similar average runtimes but distinct execution patterns.
Experimental Evaluation
The study utilized the QASMBench suite, comprising 92 circuits categorized into "small-scale" (2–10 qubits) and "medium-scale" (10–27 qubits). Simulations were conducted using the Qiskit state-vector simulator on a high-performance Linux workstation equipped with an NVIDIA RTX 4090 GPU and dual Intel Xeon 6533 processors.
Results and Discussion
The framework demonstrated remarkable efficacy in identifying quantum circuits based solely on timing and memory metadata.
- Identification Accuracy: The system achieved a 91.13% Top-1 identification rate across the entire dataset.
- Scale Paradox: Interestingly, larger circuits are easier to identify. Medium-scale circuits (11–18 qubits) reached a near-perfect 99.9% identification rate due to their higher signal-to-noise ratio compared to smaller, noisier circuits.
- Structural Inference: Beyond identifying specific circuits, the adversary could predict the number of qubits with 90% accuracy and approximate gate counts with 80% accuracy.
The results underscore that classical side-channel vulnerabilities persist even when the workload is quantum-centric. Traditional security measures cannot be overlooked in the quantum domain.
Conclusion
This research reveals a potent threat to the confidentiality of quantum algorithms in cloud environments. While countermeasures like timing randomization, constant-time kernels, and memory padding are possible, they often introduce significant performance overhead. Future work will explore the attack's effectiveness against different simulator types (e.g., tensor-network) and its robustness in noisier, public cloud settings.
Summary updated