TetrisLock: Quantum Circuit Split Compilation with Interlocking Patterns

Qian Wang, Jayden John, Ben Dong, Yuntao Liu · DOI

Abstract

In the "quantum-as-a-service" era, developers often rely on third-party compilers to optimize algorithms for specific hardware. However, these untrusted compilers pose significant risks to intellectual property (IP). This paper presents TetrisLock, a novel split compilation framework that protects quantum circuits by masking original logic with reversible random gates and splitting the design into interdependent, interlocking segments. TetrisLock achieves robust IP protection with zero circuit depth overhead and minimal gate count increases.

The Security Challenge in Quantum Compilation

Quantum developers typically send their high-level circuit designs to cloud providers for compilation and execution. These compilers are often "black boxes" that could potentially steal proprietary designs, reverse-engineer algorithms, or insert malicious Trojans. While classical chipmaking uses "split manufacturing" to mitigate similar risks, applying this to quantum computing is challenging due to potential "collusion attacks" and the high sensitivity of quantum hardware to circuit depth overhead.

The threat model of untrusted compilers in the quantum ecosystem, highlighting risks like IP infringement and Trojan insertion.

The TetrisLock Framework

TetrisLock introduces a multi-layered approach to obfuscate and split quantum circuits before they reach untrusted compilers. The workflow ensures that no single compiler sees the complete, functional design.

The TetrisLock workflow: from original circuit masking to interlocking split compilation and final deobfuscation.

1. Reversible Masking and "Tetris" Fill

The framework exploits the reversibility of quantum gates by appending a random circuit ($R$) and its inverse ($R^{-1}$) to the original design ($C$). Mathematically, $R^{-1}RC = C$, ensuring the final output remains correct. To maintain performance, TetrisLock identifies "empty slots"—idle periods for specific qubits—and "tucks" these masking gates into those slots. This results in 0% depth overhead, ensuring security does not degrade hardware performance.

2. Interlocking Splitting

Unlike simple vertical partitioning, TetrisLock uses an "interlocking" pattern to weave portions of the original circuit into segments containing random gates. This functional interdependence ensures that an attacker cannot isolate the "real" logic from the noise. Even if two compilers collude, the interwoven gates make reconstruction factorially harder.

3. Mismatched Qubit Splitting

By splitting circuits into segments with varying qubit counts, TetrisLock further increases the mathematical complexity for attackers attempting to map wires between different compiled segments.

Experimental Evaluation

The authors evaluated TetrisLock using the RevLib benchmark set (including arithmetic units and logical comparators) with qubit sizes ranging from 4 to 12. Simulations were conducted using IBM’s Qiskit FakeValencia backend to model real-world noise profiles.

Key Results

  • Zero Depth Increase: The circuit depth remained identical to the original across all benchmarks, utilizing existing "slack" in the algorithm.
  • Minimal Overhead: Total gate count increased by an average of only 20% (typically just 1 to 4 extra gates).
  • High Fidelity: Functional accuracy loss was less than 1% after recombination and de-obfuscation.
  • Robust Obfuscation: Total Variation Distance metrics indicated that obfuscated segments were indistinguishable from random noise to an attacker.

Conclusion

TetrisLock demonstrates that IP protection in quantum computing can be achieved without sacrificing performance. By utilizing idle hardware resources for security tasks, the framework provides a practical path for secure quantum-as-a-service. Future work will address scalability for larger-scale quantum processors and the classical processing costs of local de-obfuscation.

Summary updated

BibTeX
@inproceedings{wang2025tetrislock,
  author = {Qian Wang and Jayden John and Ben Dong and Yuntao Liu},
  title = {{TetrisLock: Quantum Circuit Split Compilation with Interlocking Patterns}},
  booktitle = {DAC},
  year = {2025},
  doi = {10.1109/dac63849.2025.11132682},
}
Figure