We study a variant of the subgraph isomorphism problem that is of high interest to the quantum computing community. Our results give an algorithm to perform pattern matching in quantum circuits for many patterns simultaneously, independently of the number of patterns. After a pre-computation step in which the patterns are compiled into a decision tree, the running time is linear in the size of the input quantum circuit. More generally, we consider connected port graphs, in which every edge $e$ incident to $v$ has a label $L_v(e)$ unique in $v$. Jiang and Bunke showed that the subgraph isomorphism problem $H \subseteq G$ for such graphs can be solved in time $O(|V(G)| \cdot |V(H)|)$. We show that if in addition the graphs are directed acyclic, then the subgraph isomorphism problem can be solved for an unbounded number of patterns simultaneously. We enumerate all $m$ pattern matches in time $O(P)^{P+3/2} \cdot |V(G)| + O(m)$, where $P$ is the number of vertices of the largest pattern. In the case of quantum circuits, we can express the bound obtained in terms of the maximum number of qubits $N$ and depth $\delta$ of the patterns : $O(N)^{N + 1/2} \cdot \delta \log \delta \cdot |V(G)| + O(m)$.
翻译:我们研究子图的变体是量子计算界非常感兴趣的子形问题。 我们的结果提供了一种算法, 使量子电路的图案与许多图案同时匹配, 而不考虑图案的数量。 在将图案编入决策树的预计算步骤之后, 运行时间是输入量子电路大小的线性。 更一般地, 我们考虑连接的端口图, 每一个偏差美元到 $v, 都有一个以美元计算的标签 $_ v( e) 。 江和邦克显示, 此类图的量子形体问题 $H\ subseteqeq G$ 可以用时间解决 $( +V) {( G)\\ {c) =美元。 我们显示, 如果在图案外加电路图中, 那么子系统问题可以同时解决一个未标定的图案数量。 我们用时间将所有美元模式匹配 $( P+3}\ cdoeqeqeqe g$, 最大O==xxxx.