Abstract
We propose a novel variational method for solving the sub-graph isomorphism problem on a gate-based quantum computer. The method relies (1) on a new representation of the adjacency matrices of the underlying graphs, which requires a number of qubits that scales logarithmically with the number of vertices of the graphs; and (2) on a new ansatz that can efficiently probe the permutation space. Simulations are then presented to showcase the approach on graphs up to 16 vertices, whereas, given the logarithmic scaling, the approach could be applied to realistic sub-graph isomorphism problem instances in the medium term.
Introduction
The sub-graph isomorphism (SGI) problem is a fundamental challenge in network analysis, asking whether a small "pattern" graph $\mathcal{B}$ exists as a subset of a larger "target" graph $\mathcal{A}$. While critical for fields like drug discovery and social network analysis, SGI is NP-complete. Classical heuristics struggle with certain hard instances, and existing quantum approaches typically require $O(N^2)$ qubits—a prohibitive cost for large-scale graphs.
This paper introduces a variational quantum algorithm that achieves a breakthrough in resource efficiency by requiring only $O(\log N)$ qubits. This logarithmic scaling suggests that near-term quantum hardware could potentially handle graphs with millions of nodes, a scale previously thought to require trillions of qubits under quadratic mapping schemes.
Methodology
The proposed method is built upon three core components: the Log-Hadamard representation, a quantum loss function, and a variational permutation Ansatz.
Log-Hadamard Representation
Instead of the traditional one-qubit-per-edge mapping, the authors encode the adjacency matrix into a unitary operator. By utilizing a "flattening" technique and Walsh-Hadamard transforms, an $N$-vertex graph is represented using only $2\log_2(N) + 1$ qubits. This "unitary hat" representation ($\hat{A}$) allows graph permutations to be performed efficiently in the quantum domain via conjugate operations ($P\hat{A}P^\dagger$). To ensure distinct adjacency matrices remain physically distinguishable, the authors employ a formal "doubling functor" proof.
Variational Permutation Ansatz
To identify the correct vertex mapping, the algorithm employs a parametric quantum circuit (Ansatz) composed of non-entangling and entangling primitives. This circuit allows a classical optimizer, using Stochastic Gradient Descent (SGD), to explore the space of possible permutations.
Quantum Loss Function
The algorithm minimizes a "quantum disparity function" that measures the distance between graphs in the quantum state space. The authors demonstrate that this loss function is mathematically equivalent to the classical Frobenius norm, ensuring that its minimization leads to a valid isomorphism solution. A probabilistic rounding procedure is used to project continuous quantum parameters back into discrete vertex permutations.
Experimental Results
The algorithm was evaluated on Erdős-Rényi random graphs and simulated instances with up to 16 vertices. Despite the seemingly small node count, the search space for a 16-node graph exceeds $2 \times 10^{13}$ permutations.
- Qubit Efficiency: The approach demonstrates significant advantages over standard VQE/QAOA methods. For instance, a 32-node graph requires fewer than 15 qubits, compared to approximately 1000 qubits for quadratic methods.
- Convergence and Search: In convergence tests, the algorithm achieved the correct solution in 80-100% of runs. In harder search tests on 16-node graphs, the algorithm successfully identified sub-graphs using only 20 variational parameters and fewer than 128 SGD iterations.
Conclusion and Future Work
The transition from $O(N^2)$ to $O(\log N)$ scaling is a significant step toward practical quantum advantage in graph matching. Future research will focus on expanding the Ansatz coverage for highly symmetrical graphs, testing on noisy NISQ hardware, and extending the framework to directed and labeled graphs. While classical simulation limits current testing to small qubit counts, the logarithmic advantage positions this method as a strong candidate for large-scale applications as quantum hardware matures.
Summary updated