We develop a unified quantum framework for subgraph counting in graphs. We encode a graph on $N$ vertices into a quantum state on $2\lceil \log_2 N \rceil$ working qubits and $2$ ancilla qubits using its adjacency list, with worst-case gate complexity $O(N^2)$, which we refer to as the graph adjacency state. We design quantum measurement operators that capture the edge structure of a target subgraph, enabling estimation of its count via measurements on the $m$-fold tensor product of the adjacency state, where $m$ is the number of edges in the subgraph. We illustrate the framework for triangles, cycles, and cliques. This approach yields quantum logspace algorithms for motif counting, with no known classical counterpart.
翻译:我们提出了一个统一的量子框架,用于解决图中的子图计数问题。通过使用图的邻接列表,我们将包含 $N$ 个顶点的图编码为基于 $2\lceil \log_2 N \rceil$ 个工作量子比特和 $2$ 个辅助量子比特的量子态(最坏情况下门复杂度为 $O(N^2)$),称为图邻接态。我们设计了能捕捉目标子图边结构的量子测量算子,通过对该邻接态的 $m$ 重张量积(其中 $m$ 为子图的边数)进行测量,即可估计子图计数。我们以三角形、环和团为例演示了该框架。此方法为模体计数提供了量子对数空间算法,而目前尚无已知的经典对应算法。