Equivalence Checking of Parameterised Quantum Circuits

Xin Hong, Wei‐Jia Huang, Wei‐Chen Chien, Yuan Feng, Min-Hsiu Hsieh, Sanjiang Li, Mingsheng YingarXiv 2024 · DOI

Abstract

Parameterised quantum circuits (PQCs) hold great promise for demonstrating quantum advantages in practical applications of quantum computation. Examples of successful applications include the variational quantum eigensolver, the quantum approximate optimisation algorithm, and quantum machine learning. However, before executing PQCs on real quantum devices, they undergo compilation and optimisation procedures. Given the inherent error-proneness of these processes, it becomes crucial to verify the equivalence between the original PQC and its compiled or optimised version. Unfortunately, most existing quantum circuit verifiers cannot directly handle parameterised quantum circuits; instead, they require parameter substitution to perform verification. In this paper, we address the critical challenge of equivalence checking for PQCs. We propose a novel compact representation for PQCs based on tensor decision diagrams. Leveraging this representation, we present an algorithm for verifying PQC equivalence without the need for instantiation. Our approach ensures both effectiveness and efficiency, as confirmed by experimental evaluations. The decision-diagram representations offer a powerful tool for analysing and verifying parameterised quantum circuits, bridging the gap between theoretical models and practical implementations.

Introduction

In the current Noisy Intermediate-Scale Quantum (NISQ) era, variational algorithms like the Variational Quantum Eigensolver (VQE) and the Quantum Approximate Optimisation Algorithm (QAOA) are at the forefront of quantum research. These algorithms rely on Parameterised Quantum Circuits (PQCs), where gate angles act as tunable variables similar to weights in a classical neural network.

As these circuits are prepared for hardware execution, they undergo complex compilation and optimization. This stage is notoriously error-prone; a compiler bug could result in an optimized circuit that is no longer mathematically equivalent to the original design. Traditional verification tools often rely on "instantiation"—testing the circuit with specific numerical values. However, passing a test for one set of parameters does not guarantee equivalence across the entire parameter space. This research introduces a formal, symbolic method to verify PQCs for all possible parameter values simultaneously.

Methodology: Symbolic Tensor Decision Diagrams

The core innovation of this work is the development of a framework based on Tensor Decision Diagrams (TDDs). While standard TDDs use complex numbers as edge weights, the authors introduce two key extensions to handle parameters symbolically:

  1. S-valued TDD (S-TDD): This extension allows edge weights to be symbolic expressions, specifically trigonometric polynomials, rather than static numbers.
  2. Trigonometric Decision Diagrams (TrDD): To manage these symbolic weights efficiently, the researchers developed TrDDs. These provide a canonical form for trigonometric expressions, ensuring that functionally identical mathematical expressions result in the exact same graph structure.
Visual representation of (a) a standard Tensor Decision Diagram (TDD) and (b, c) the proposed Trigonometric Decision Diagrams (TrDDs) used for symbolic weights.

By representing two PQCs as S-TDDs, checking for equivalence is reduced to a graph comparison. If the normalized graphs are identical, the circuits are proven equivalent for every possible parameter value, accounting for global phase differences.

Experimental Results

The proposed method was evaluated using standard PQC architectures from the Qiskit library, including EfficientSU2, RealAmplitudes, and TwoLocal. The benchmarks ranged from 10 to 65 qubits, involving up to 5,135 gates and 910 parameters.

Performance comparison of the proposed S-TDD method against existing tools for various PQC benchmarks, showing node counts and execution times for error detection.

Key findings from the experimental evaluation include:

  • Scalability: The S-TDD approach successfully verified circuits with up to 65 qubits, a significant leap over previous symbolic methods that struggled with more than a few qubits.
  • Efficiency: In head-to-head comparisons, the S-TDD method often outperformed existing tools. For instance, on a 16-qubit RealAmplitudes benchmark, it completed verification in roughly 10.7 seconds, compared to 44.3 seconds for the ZX-calculus-based QCEC tool.
  • Robust Error Detection: The tool proved exceptionally fast at identifying mismatches. In cases where bit-flip or phase-flip errors were intentionally injected, the S-TDD method often detected the inequivalence in under a second, while competing tools sometimes timed out.

Conclusion and Future Work

This research demonstrates that symbolic verification of PQCs is not only theoretically sound but also practically viable at scale. By moving complexity from the circuit structure into the edge weights of a decision diagram, the authors have bridged a critical gap in quantum software verification.

Future work includes porting the current Python prototype to C++ to achieve further speedups and extending the symbolic engine to handle more complex, non-linear parameter dependencies. These advancements will be vital as quantum hardware continues to scale and PQC designs become increasingly sophisticated.

Summary updated

BibTeX
@misc{hong2024equivalence,
  author = {Xin Hong and Wei‐Jia Huang and Wei‐Chen Chien and Yuan Feng and Min-Hsiu Hsieh and Sanjiang Li and Mingsheng Ying},
  title = {{Equivalence Checking of Parameterised Quantum Circuits}},
  year = {2024},
  eprint = {2404.18456},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.18456},
}
Figure