Implementation of Quantum Fourier Transform and Quantum Hashing for Quantum Devices with Arbitrary Qubit Connectivity Graphs

Kamil Khadiev, Aliya Khadieva, Zeyu Chen, Junde WuQuantum 2025

TL;DR

This paper introduces a general method for constructing quantum circuits for Quantum Fourier Transform (QFT) and Quantum Hashing, specifically designed for quantum computers with arbitrary qubit connectivity. The approach minimizes the number of costly CNOT gates, making these essential quantum algorithms more practical for a wider range of current and future quantum hardware.

What Problem Does This Paper Address?

Quantum computers, especially those based on superconducting qubits, often have limitations on which pairs of qubits can interact directly. This is typically represented by a "qubit connectivity graph." While many quantum algorithms have been optimized for simple architectures like linear nearest-neighbor (LNN) connections, real-world devices often feature more complex, arbitrary connectivity. Implementing fundamental algorithms like the Quantum Fourier Transform (QFT) and Quantum Hashing on these complex architectures efficiently, particularly by minimizing the number of expensive two-qubit gates (like CNOTs), is a significant challenge. This paper aims to bridge this gap by providing a unified method applicable to any connected qubit graph.

Methods

The core of the paper's methodology lies in a clever reduction to the Traveling Salesman Problem (TSP). For a given qubit connectivity graph, the authors first find a "shortest non-simple path" that visits all qubits at least once. This path is constructed by transforming the original graph into a "supergraph" where edge weights represent the shortest path distances between qubits in the original graph. A TSP solver is then applied to this supergraph.

This TSP solution is then used to guide the construction of the quantum circuits for QFT and Quantum Hashing. For Quantum Hashing, the method involves a sequence of controlled rotations and SWAP gates, carefully orchestrated along the identified path to minimize CNOTs. For QFT, the approach breaks down the circuit into "cascades," where each cascade is constructed using a similar path-based strategy, progressively excluding qubits as the algorithm progresses. The authors provide both exact (exponential time complexity) and heuristic (polynomial time complexity) algorithms for finding the shortest path.

Datasets

Not discussed in the paper. The paper focuses on theoretical algorithm development and circuit construction, not on training or evaluating on specific datasets.

Key Insights and Ideas

  • Universality through TSP: The most significant insight is the elegant reduction of circuit construction for arbitrary qubit connectivity to a well-studied problem like the Traveling Salesman Problem. This allows leveraging existing TSP algorithms to solve a complex quantum circuit design problem.
  • Minimizing CNOTs on Complex Architectures: The paper demonstrates that it's possible to construct efficient circuits for QFT and Quantum Hashing even on non-standard qubit layouts, going beyond the typical LNN assumption.
  • Path-Based Circuit Construction: The core idea of using a "shortest non-simple path" that visits all qubits as a blueprint for gate placement is a novel and effective strategy for managing qubit interactions under connectivity constraints.
  • Trade-off between Generality and Optimality: While the generic method is powerful, the paper acknowledges that for specific, highly optimized architectures (like LNN), specialized circuits might still offer slightly better CNOT counts. However, the generality of the proposed method is its key advantage.

Key Results

  • Generic Circuit Construction: The paper presents a general method for constructing quantum circuits for QFT and Quantum Hashing that works for any connected qubit connectivity graph.
  • CNOT Cost Analysis: The authors provide theoretical bounds on the CNOT cost for their constructed circuits. For Quantum Hashing, the CNOT cost is shown to be at most $3k-b-2$, where $k$ is the path length and $b$ is related to specific path properties. For QFT, the CNOT cost is bounded by $3kn-2n$.
  • Comparison with Existing Work: The proposed method yields comparable or slightly higher CNOT counts compared to circuits optimized for specific architectures like LNN, "sun," and "two joint suns." For instance, for the 16-qubit "sun" architecture, their method results in 342 CNOTs, while a specialized circuit uses 324. The difference is noted as approximately 5%.
  • Algorithmic Complexity: The exact algorithm for finding the shortest path has an exponential time complexity of $O(n^2 2^n)$, while a heuristic version achieves polynomial time complexity of $O(n^5)$.

Limitations and Future Work

  • Suboptimal for Highly Optimized Architectures: The paper acknowledges that for architectures with highly optimized, specialized circuits (like LNN), their generic method might result in a slightly higher CNOT count.
  • Open Question for QFT: An open question is posed regarding developing a technique for QFT on arbitrary connected graphs that achieves results comparable to or better than existing methods for specific architectures.
  • Heuristic vs. Exact: While the heuristic approach offers practical speedups, it doesn't guarantee the absolute minimum CNOT count. Future work could explore more advanced heuristic or approximation algorithms for TSP that translate to even better circuit efficiencies.
  • Quantum Algorithm for TSP: The paper mentions the possibility of using quantum algorithms for the TSP part, which could potentially offer further speedups, though this is not the focus of the current work.

Summary updated

Abstract

Abstract In the paper, we consider quantum circuits for quantum fingerprinting (quantum hashing) and quantum Fourier transform (QFT) algorithms. Quantum fingerprinting (quantum hashing) is a well-known technique for comparing large objects using small images. The QFT algorithm is a very popular technique used in many algorithms. We present a generic method for constructing quantum circuits for these algorithms for quantum devices with restrictions. Many quantum devices (e.g., based on superconductors) have restrictions on applying two-qubit gates. The restrictions are presented by a qubit connectivity graph. Typically, researchers consider only the linear nearest neighbor (LNN) architecture, but current devices have more complex graphs. We present a method for arbitrary connected graphs that minimizes the number of CNOT gates in the circuit. The heuristic version of the method is fast enough and works with O ( n 6 ) time complexity, where n is the number of qubits. The certain version of the algorithm has an exponential time complexity that is O ( n 2 2 n ). We compare quantum circuits built by our algorithm with quantum circuits optimized for specific graphs that are Linear-nearest-neighbor (LNN) architecture, “sun” (a cycle with tails, presented by the 16-qubit IBMQ device) and “two joint suns” (two joint cycles with tails, presented by the 27-qubit IBMQ device). Our generic method gives similar results with a few more CNOT gates. At the same time, our method allows us to construct a circuit for arbitrary connected graphs.
BibTeX
@inproceedings{khadiev2025implementation,
  author = {Kamil Khadiev and Aliya Khadieva and Zeyu Chen and Junde Wu},
  title = {{Implementation of Quantum Fourier Transform and Quantum Hashing for Quantum Devices with Arbitrary Qubit Connectivity Graphs}},
  booktitle = {Quantum},
  year = {2025},
  doi = {10.2478/qic-2025-0028},
}
Figure