Introduction
Quantum computers can solve certain problems dramatically faster than classical ones, but the extent of this advantage remains poorly understood. Notable families of algorithms with superpolynomial speedup include those based on finding periodic structures using Fourier transforms [43 ] and simulating the dynamics of quantum systems [34 ] . Identifying other mechanisms for quantum speedup, and understanding their limitations, remain central challenges.
The welded trees problem provides an example of a different kind of speedup that is due to interference when coherently exploring a graph. The graph, illustrated in Figure 1 , consists of two height-n n n balanced binary trees whose leaves are joined by a random cycle alternating between the two trees (the “weld”). Vertices have random labels and an algorithm accesses the graph through an adjacency-list oracle. Given the label of one root, the entrance , a quantum walk finds the other root, the exit , in time polynomial in n n n , whereas every classical algorithm requires exponentially many queries [15 ] . The quantum walk exploits the layered structure of the graph. Its evolution stays in the span of uniform superpositions over successive layers, effectively reducing the problem to traversal of a path of length O ( n ) O(n) O ( n ) . On the other hand, after crossing the weld, a classical traversal has little information about which edges lead towards the exit. Reaching a previously visited node along an unexplored edge could help identify a way towards the exit, but even this task requires exponentially many queries.
Figure 1. An instance of a welded trees graph. The blue node is the entrance, the green node is the exit and the red nodes are the leaves. The edges between the leaves are the weld edges.
Beyond providing a new mechanism for quantum speedup, the welded trees problem has yielded insight into a variety of other questions pertaining to the power of quantum computation. It was used to show that some quantum speedups cannot be achieved with only logarithmic quantum depth [20 ] , and was a building block for results on the power of adiabatic computation and optimization [25 , 37 ] , the quantum query complexity of graph property testing [7 ] , and exponential separations for machine learning tasks [26 ] . Understanding what quantum algorithms can and cannot do on these graphs therefore informs a broader set of questions about quantum advantage.
The problem also suggests a striking distinction between reaching a destination and finding a route to it. A classical traversal can record its route at little additional cost, so in particular, exit finding and pathfinding have the same classical query complexity, which is Θ ~ ( 2 n / 2 ) \widetilde{\Theta}(2^{n/2}) Θ ( 2 n /2 ) [23 , 6 AA18] . On the other hand, the quantum walk traverses many paths in superposition without outputting any one of them. Retaining distinguishable records of these paths suppresses the interference responsible for the speedup, similarly to how recording which slit a particle passes through destroys interference in the double-slit experiment. This explains why simply recording the quantum walk eliminates the speedup, but leaves open whether a different quantum algorithm could find a path efficiently. This has been a longstanding open problem, alluded to in the original paper [15 ] and highlighted in a list of open problems in quantum query complexity [2 ] .
Prior work ruled out efficient pathfinding algorithms that are both rooted and genuine [CCGZ23]. Informally, a genuine algorithm is restricted to only query the oracle at (superpositions of) known vertex labels, and a rooted algorithm always retains a path from the entrance to every vertex it records. These conditions capture natural approaches, including versions of the quantum snake walk [41 ] , whose state describes a polynomially long path in the graph. However, general algorithms need not satisfy either condition. We combine and strengthen our independent preliminary works [40 , 14 ] in order to obtain a quantum query lower bound for pathfinding on the welded trees graph that is tight up to logarithmic factors.
Theorem 1.1 (Informal version of Theorem 4.1 ). For any quantum algorithm A \mathcal{A} A making q ≥ 1 q \ge1 q ≥ 1 queries to a welded trees graph oracle,
Pr [ A outputs an entrance-exit path ] = O ( q 2 n / 3 + n ⋅ q 3 2 n ) , \Pr[\mathcal{A}\text{ outputs an entrance-exit path}] = O\left(\frac{q}{2^{n/3}}+\frac{n\cdot q^{3}}{2^{n}}\right), Pr [ A outputs an entrance-exit path ] = O ( 2 n /3 q + 2 n n ⋅ q 3 ) , with the oracle sampled from a distribution over welded trees graphs with a single cycle.
Hence in order to achieve constant success probability, an algorithm must make Ω ~ ( 2 n / 3 ) \widetilde{\Omega}(2^{n/3}) Ω ( 2 n /3 ) queries. This lower bound is nearly tight since an algorithm can find a path in O ( n ⋅ 2 n / 3 ) O(n\cdot2^{n/3}) O ( n ⋅ 2 n /3 ) queries, as follows. First, run the quantum walk algorithm to find the exit. Then observe that a nonbacktracking walk of length n n n from the entrance finds a leaf on the left side of the weld, and a nonbacktracking walk of length n n n from the exit finds a leaf on the right side of the weld. Furthermore, we can determine with two queries whether a given left leaf is connected to a given right leaf. Using the collision algorithm of [10 ] , with each root-to-leaf evaluation costing O ( n ) O(n) O ( n ) queries, we can then find a pair of connected leaves in O ( n ⋅ 2 n / 3 ) O(n\cdot2^{n/3}) O ( n ⋅ 2 n /3 ) queries. Therefore, in both classical and quantum settings, pathfinding reduces to collision finding. Furthermore, the pathfinding algorithm produces a shortest entrance-exit path by joining two root-to-leaf paths across a single weld edge. While in principle it might be easier to find a non-shortest path, our lower bound shows that finding any entrance-exit path is just as difficult as finding a shortest one up to factors polynomial in n n n .
Our proof uses the compressed permutation oracle of [13 , 21 ] , which provides a method for showing quantum lower bounds when querying an oracle that implements a random permutation. Conceptually, we use several compressed permutations as building blocks by implementing the welded trees oracle using separate permutations for the labels of vertices and edges between two adjacent columns. The compressed oracle method provides a way of reversibly recording an algorithm’s queries in a certain database state. Intuitively, this database provides a similar representation of the algorithm’s knowledge of the graph as in the genuine algorithms of [16 ] , but in a way that applies to general algorithms.
Technical overview
Briefly, the structure of the proof is as follows. The key idea is to track the information an algorithm retains about the structure of the graph during computation. In § 3 , we construct two compressed versions of the welded trees oracle and relate successful pathfinding to recording a path across the graph. In § 4.1 , we define the good space , which is a collection of states that do not record such a path. The key step is showing in § 4.2 and § 4.3 that a single query can move the state only slightly outside the good space. As the computation starts with an empty record, it starts in the good space and hence we find that Ω ~ ( 2 n / 3 ) \widetilde{\Omega}(2^{n/3}) Ω ( 2 n /3 ) queries are necessary to find a path with constant probability.
Recording graph information. In order to record what an algorithm knows about the graph, we use the compressed oracle framework of [Zha19]. Introduced as a technique for proving quantum indifferentiability (i.e., showing that some cryptographic construction is essentially as good as an ideal object), it has found a variety of other uses [18 , 30 , 11 , 39 , 3 , 9 , 28 , 13 ] . For an introduction, see [29 ] . Intuitively, the technique represents the information an algorithm retains about a random oracle using a database of input-output records. Note that the database is itself quantum, with records stored in superposition. These records can also be erased when the algorithm uncomputes queries, reflecting its ability to forget information.
We apply this framework to welded trees using the recent construction of compressed permutation oracles [13 , 21 ] . Specifically, we consider access to the graph via a neighbor oracle O ( w t ) O^{(\mathrm{wt})} O ( wt ) that takes a vertex label l l l and color α \alpha α as input and returns the label l ′ l' l ′ of the corresponding neighbor, if it exists. By revealing an edge coloring, this oracle gives the algorithm more information than the original adjacency-list oracle (so in particular, a lower bound in the model with colors implies a lower bound for the standard adjacency-list model).1 On the other hand, the coloring gives us a natural way to randomize the graph using permutations. We instantiate this oracle by fixing a welded trees graph along with a proper edge coloring and applying two independent families of permutations. The first, σ l a b e l \sigma_{\mathrm{label}} σ label , assigns random labels to vertices. The second, σ e d g e \sigma_{\mathrm{edge}} σ edge , permutes edges within each column and color in a certain region around the weld. To answer the query, the oracle identifies the corresponding vertex via v = σ l a b e l − 1 ( l ) v = \sigma_{\mathrm{label}}^{-1}(l) v = σ label − 1 ( l ) , follows its edge of color α \alpha α using σ e d g e \sigma_{\mathrm{edge}} σ edge to node w w w and then returns the label of the neighboring vertex, outputting l ′ = σ l a b e l ( w ) l' = \sigma_{\mathrm{label}}(w) l ′ = σ label ( w ) . This computation is illustrated in Figure 2 .
Figure 2. Answer to the query ( l , α ) (l,\alpha) ( l , α ) . The oracle maps the label l l l to vertex v v v , follows its edge using σ e d g e \sigma_{\mathrm{edge}} σ edge to vertex w w w and outputs the label l ′ l' l ′ of w w w . The algorithm only receives l ′ l' l ′ .
The algorithm never directly receives the vertices v v v or w w w . The edge permutation σ e d g e \sigma_{\mathrm{edge}} σ edge (illustrated in Figure 3 ) consists of independent permutations, each acting on edges of the same color α \alpha α between two adjacent columns c c c and c + 1 c+1 c + 1 , which we call an edge class . Within each such class, we keep the endpoints in one column fixed and permute their partners in the other column. We apply these edge permutations only in a region around the weld extending to approximately n / 3 n/3 n /3 edges away from each root, leaving the edges closer to the roots fixed. As this assignment is a bijection, every vertex retains the same number of edges of each color to each adjacent column. Thus the two binary trees retain their structure and the edge coloring remains proper.
Figure 3. An example of an application of σ e d g e \sigma_{\mathrm{edge}} σ edge on the welded trees graph.
We define this formally in § 3.1 . Replacing σ l a b e l \sigma_{\mathrm{label}} σ label and σ e d g e \sigma_{\mathrm{edge}} σ edge with compressed permutation oracles gives us two databases, a label database L L L that maps vertices to labels and an edge-color database C C C for the edge permutations. In § 3.2 , we construct the ordinary compressed welded trees oracle cpWT, which we use to understand what information is tracked. For some fixed input x x x , let pC denote an operator that swaps partial injective database states ∣ I ⟩ |I\rangle ∣ I ⟩ in which x x x is not recorded with the uniform superposition over extensions of I I I where x x x maps to some unused output y y y . We can write each step of the computation in O ( w t ) O(wt) O ( w t ) described above using a corresponding pC operator. Specifically, pCl a b i n v _{\mathrm{lab}}^{\mathrm{inv}} lab inv associates some vertex v = L − 1 ( l ) v=L^{-1}(l) v = L − 1 ( l ) to the label l l l , pCe d g e _{\mathrm{edge}} edge handles recording an edge from v v v to w w w in the database C C C and pCl a b f o r _{\mathrm{lab}}^{\mathrm{for}} lab for assigns the label L ( w ) L(w) L ( w ) to the vertex w w w . Lastly, we define P P P to be the operation that XORs L ( w ) L(w) L ( w ) into the output register, assuming all of the corresponding database values are in L L L and C C C , otherwise acting as the identity. Combining these gives
c p W T : = p l a b i n v ⋅ p e d g e i n v ⋅ p l a b f o r ⋅ P ⋅ p l a b f o r ⋅ p e d g e ⋅ p l a b i n v . (1) \mathrm{cpWT} := p_{\mathrm{lab}}^{\mathrm{inv}} \cdot p_{\mathrm{edge}}^{\mathrm{inv}} \cdot p_{\mathrm{lab}}^{\mathrm{for}} \cdot P \cdot p_{\mathrm{lab}}^{\mathrm{for}} \cdot p_{\mathrm{edge}} \cdot p_{\mathrm{lab}}^{\mathrm{inv}}. \tag*{(1)} cpWT := p lab inv ⋅ p edge inv ⋅ p lab for ⋅ P ⋅ p lab for ⋅ p edge ⋅ p lab inv . (1)
We also construct the exact compressed welded trees oracle c p W T ‾ \overline{\mathrm{cpWT}} cpWT , which can be viewed as an intermediate step between O ( w t ) O^{(\mathrm{wt})} O ( wt ) and c p W T \mathrm{cpWT} cpWT : it uses the same database states as c p W T \mathrm{cpWT} cpWT , but exactly preserves the success probability of the original oracle O ( w t ) O^{(\mathrm{wt})} O ( wt ) .
In § 3.3 , we compare these oracles. First, we characterize the relationship between c p W T \mathrm{cpWT} cpWT and c p W T ‾ \overline{\mathrm{cpWT}} cpWT , which allows us to transfer our bounds between them. Second, we show that the success probability of an algorithm using O ( w t ) O^{(\mathrm{wt})} O ( wt ) is bounded by the probability that a path across the region with permuted edges is recorded in the database C C C when using c p W T ‾ \overline{\mathrm{cpWT}} cpWT , with an additive error growing linearly with the number of queries.
Quantum walk speedup. Before turning to the proof of Theorem 1.1 , we explain how the databases L , C L,C L , C develop during the quantum walk that finds the exit vertex exponentially faster than any classical algorithm [15 ] . We analyze this process in more detail in Section A.
The quantum walk algorithm evolves with a Hamiltonian given by the adjacency matrix of the graph. As described above, starting at the entrance, the walk remains in the span of uniform superpositions over columns, so its evolution reduces to a continuous-time quantum walk on a weighted path of length O ( n ) O(n) O ( n ) .
For welded tree instances obtained by sampling σ l a b e l \sigma_{\mathrm{label}} σ label and σ e d g e \sigma_{\mathrm{edge}} σ edge uniformly (as described in § 3.1 ), the evolution of the database during a run of the walk is especially simple. At any evolution time, C C C is empty and L L L has at most one record. Moreover, up to norm error O ( 2 − n / 2 ) O(2^{-n/2}) O ( 2 − n /2 ) , this is the current vertex-label record (except that no label is needed at the entrance since its label is fixed). This follows because the amplitude at a given vertex depends only on its column, independently of the edge permutations. The purified state therefore has no dependence on those permutations and depends on the label permutation only through the current label. More precisely, the compression isometry produces an empty edge database and at most one label record. This record can be identified with the current vertex-label pair up to a small normalization correction, as described in detail in Section A. Since the database record does not distinguish different routes by which the quantum walk reached its current state, contributions from different routes can interfere.
A simulation of the continuous-time dynamics using a finite number of queries introduces bounded simulation error, and intermediate queries can temporarily create additional records. However, this does not change the fundamental conclusion that the database does not store information about the algorithm’s history and is compatible with producing the exit label without recording a path.
Good space. Returning to the hardness of pathfinding, the goal is to show that recording a path in the databases ( L , C ) (L,C) ( L , C ) is difficult. In § 4.1 , we define the good space, which is a space of states that have not recorded such a path. As mentioned above, the pair of databases ( L , C ) (L,C) ( L , C ) can be viewed as a representation of the known graph, where L L L represents the retained labels and C C C the edges. However, an algorithm only interacts with ( L , C ) (L,C) ( L , C ) through c p W T \mathrm{cpWT} cpWT . Each query takes in a label-color pair and outputs another label that represents its neighbor, meaning the query does not directly reveal vertex positions in the graph. We describe the labels and edges the algorithm retains by an abstract forest H H H , whose connected components are trees H i H_i H i . Note that H H H does not explicitly specify vertex positions. Instead, the actual vertices are written down using the map ϕ \phi ϕ from abstract vertices in H H H to vertices on the welded trees graph. We call the vertices of the welded trees graph structural vertices.
While H H H accurately represents the labels and the connections the algorithm retains, knowing where the exploration began can help the algorithm infer the vertices’ positions. For example, suppose that the algorithm randomly walks from the root. Until it crosses the weld, we know which column each node is in. However, after crossing the weld, the labels and edge colors along the abstract path may no longer tell the algorithm whether its subsequent steps move towards or away from the other root (unless they hit previously explored nodes or a root). To represent this information, for each connected component H i H_i H i of H H H , we define the partial assignment W i f i x W_i^{\mathrm{fix}} W i fix on ϕ \phi ϕ . Fix an assignment ϕ \phi ϕ and a vertex v v v in H i H_i H i . Starting from v v v , follow every path in H i H_i H i until just after crossing the first weld edge under ϕ \phi ϕ or reaching a leaf. The vertices encountered and their positions form the fixed data W f i x W^{\mathrm{fix}} W fix . We call these vertices fixed and the remaining vertices in H i H_i H i free.
Under some fixed H i H_i H i and W i f i x W_i^{\mathrm{fix}} W i fix , we assign the free vertices to structural vertices on the welded trees graph as follows. Starting from a leaf in the fixed data W i f i x W_i^{\mathrm{fix}} W i fix , we assign successive vertices along the edges of H i H_i H i . At each step, the edge color and preceding vertex’s position determine the next column and the allowed positions in it, from which we choose uniformly. Let μ \mu μ denote the distribution over assignments ϕ \phi ϕ according to this rule restricted to assignments that remain in the permuted region.
Finally, we define the boundary B B B to have two parts, one at each end of the permuted region, each of which is approximately n / 3 n/3 n /3 steps away from each root. Notice that any entrance-to-exit path must cross through this permuted region, so we solely focus on recording a path between the two boundary columns.
Figure 4. An abstract tree H i H_i H i consisting of the blue vertices and edges, and the nodes labeled a a a , b b b . The solid vertices denote W i f i x W_i^{\mathrm{fix}} W i fix , while dashed vertices are free, assigned according to μ \mu μ . Blue assignments to a a a , b b b are good, while the red assignment is bad. The boundary B B B is represented by the shaded region. In general, the boundary on each side consists of two columns of vertices, which happen to include the roots in this small example.
An assignment to the variable ϕ \phi ϕ is good if it is in the support of μ \mu μ , is injective and does not hit the boundary B B B outside the fixed part W f i x W^{\mathrm{fix}} W fix . Since each W i f i x W_i^{\mathrm{fix}} W i fix of each H i H_i H i can meet B B B only on one side of the weld, a path between the two boundary columns would have to hit B B B at a free vertex. This means that if ϕ \phi ϕ is good, it cannot contain a path across the region with permuted edges, meaning the corresponding database ( L , C ) (L,C) ( L , C ) it represents cannot contain an entrance-exit path. For each choice of H H H and fixed data, we form a superposition over good assignments with amplitudes weighted by μ \sqrt{\mu} μ . The good space is the span of these states.
Remaining in the good space. In § 4.2 , we show that each application of cpWT keeps us in the good space up to a small error by analyzing each operator in its decomposition in Eq. (1) . The main difficulty lies in the edge compression operator p C e d g e p_{C_{\mathrm{edge}}} p C edge , where we have to consider adding, deleting and replacing edge records. Adding an edge may violate goodness by hitting the boundary B B B outside of the fixed nodes, creating a cycle or joining two trees in the forest H H H outside of their fixed parts. We use the distribution μ \mu μ over assignments to bound these events. Deletion requires a separate argument because databases that differ only in the erased record become identical, which means their amplitudes add. As we saw above, erasing records allows different paths of the quantum walk to interfere. Nonetheless, we show that the resulting state remains in the good space, up to a small error. Finally, controlling both addition and deletion lets us control replacing an edge record.
First, fix some abstract forest H H H and data W f i x W^{\mathrm{fix}} W fix , and consider the assignments under μ \mu μ . The first free vertex after the fixed weld edge is assigned randomly among Ω ( N ) \Omega(N) Ω ( N ) possible positions, where N = 2 n N=2^n N = 2 n . Each subsequent step averages over possible assignments, which cannot increase the maximum probability of assignment to a particular vertex. Thus any free vertex has probability O ( 1 / N ) O(1/N) O ( 1/ N ) of being assigned to a particular structural vertex. Furthermore, even though the positions of any two distinct vertices are not necessarily independent, we show that the probability they are assigned to the same value is O ( n / N ) O(n/N) O ( n / N ) when at least one of them is free. After q q q queries, we only have O ( q ) O(q) O ( q ) recorded vertices, so
Pr μ [ new vertex hits B or another recorded vertex ] = O ( ∣ B ∣ N + n q N ) . (2) \Pr_{\mu}[\text{new vertex hits } B \text{ or another recorded vertex}] = O\left(\frac{|B|}{N}+\frac{nq}{N}\right). \tag*{(2)} μ Pr [ new vertex hits B or another recorded vertex ] = O ( N ∣ B ∣ + N n q ) . (2)
For an edge permutation over a column containing s s s nodes where s ≪ N s \ll N s ≪ N , using the O ( q / s ) O(q/s) O ( q / s ) collision estimate at every query would only give an Ω ( s 1 / 3 ) \Omega(s^{1/3}) Ω ( s 1/3 ) query lower bound which could not be improved using this estimate alone due to the collision lower bound [4 ] . However, a free queried vertex is unlikely to lie in this column in the first place, which is why instead we average over its position, allowing us to obtain the Θ ~ ( N 1 / 3 ) \widetilde{\Theta}(N^{1/3}) Θ ( N 1/3 ) bound instead. Fix some queried color and let s b s_b s b be the size of the permutation for an edge class b b b between adjacent columns. By the argument above, if the queried vertex is free, it lies in class b b b with probability O ( s b / N ) O(s_b/N) O ( s b / N ) . When this occurs, it will hit one of the O ( q ) O(q) O ( q ) recorded vertices with probability at most O ( q / s b ) O(q/s_b) O ( q / s b ) . Averaging over all O ( n ) O(n) O ( n ) edge classes,
∑ b O ( s b N ) ⋅ O ( q s b ) = O ( n q N ) , (3) \sum_b O\left(\frac{s_b}{N}\right) \cdot O\left(\frac{q}{s_b}\right) = O\left(\frac{nq}{N}\right), \tag*{(3)} b ∑ O ( N s b ) ⋅ O ( s b q ) = O ( N n q ) , (3)
which gives us the O ( n q / N ) O(nq/N) O ( n q / N ) term in Eq. (2) . Intuitively, a smaller permutation increases the chance of collision, but this is counteracted by the decreasing probability a random walker moving according to μ \mu μ gets this far up the tree. Otherwise, if the queried vertex is fixed, the same bound applies as the events that violate goodness are either coinciding with another assignment or creating a cycle.
An arbitrary good state is a linear combination of the states defined with a fixed H H H and W f i x W^{\mathrm{fix}} W fix , which may overlap as different fixed data may produce the same database. We group the complex coefficients in this combination according to which part of each H i H_i H i is fixed and reorganize them without changing the state. The goal is to combine the error bounds of each group without paying a factor for the number of groups. For a component separated from the queried vertex by a single weld edge ρ \rho ρ , we average its coefficients under μ \mu μ while fixing ρ \rho ρ . We subtract this average from those coefficients and add it to the coefficients of the component with the queried vertex. This is possible because both choices of fixed data include ρ \rho ρ . Repeating this over all tree components leaves the average 0 over all components besides the one containing the queried vertex. Fixing ρ \rho ρ and the assignments on the side containing the queried vertex makes one group’s coefficient a constant while the other averages to 0 under μ \mu μ . Therefore, their product, which is the sum of cross terms in the squared norm, also averages to 0. We also show that the sum of the averaged squared coefficients is at most a constant times the state’s squared norm, allowing us to combine the preceding bounds with only a constant loss.
For deletion, we use the same grouping of coefficients and check whether the deleted edge’s non-queried endpoint remains recorded in H H H . If it does, the group with the queried component fixed remains good. For the remaining groups, at most O ( q ) O(q) O ( q ) deleted edges lead to the same database and each deletion carries a factor of O ( 1 / s b ) O(1/\sqrt{s_b}) O ( 1/ s b ) , so Cauchy-Schwarz gives an O ( q / s b ) O(q/s_b) O ( q / s b ) factor in the squared error, which we average as in Eq. (3) . Otherwise, if deleting the edge also erases its endpoint, the amplitudes for all its possible positions add together. The amplitudes from different possible assignments would add up to a good state, except that some are missing because those assignments would have already been bad before the deletion. However, this is a reverse addition, which the bounds above show can only add a small error.
Since replacing an edge is just deleting it followed by adding a new one, the same arguments follow for this case, completing the analysis of p C e d g e \mathrm{pC}_{\mathrm{edge}} pC edge . The remaining operators in c p W T \mathrm{cpWT} cpWT are simpler. The operators p C l a b f o r \mathrm{pC}^{\mathrm{for}}_{\mathrm{lab}} pC lab for and P \mathrm{P} P preserve goodness exactly, while an analogous averaging argument bounds the error from p C l a b i n v \mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab}} pC lab inv . Adding all of these bounds, an application of c p W T \mathrm{cpWT} cpWT moves the norm outside of the good space by at most O ( ∣ B ∣ / N + n q / N ) O(\sqrt{|B|/N+nq/N}) O ( ∣ B ∣/ N + n q / N ) .
Completing the proof. In § 4.3 , we transfer the good-space bound from c p W T \mathrm{cpWT} cpWT to c p W T \mathrm{cpWT} cpWT using the comparison in § 3.3 . Replacing exact label queries with ordinary ones is simple as it incurs O ( 1 / N ) O(1/N) O ( 1/ N ) error, but the edge operator p C e d g e \mathrm{pC}_{\mathrm{edge}} pC edge requires more care. Applying the standard compression techniques from [21 ] accrues an error of O ( 1 / s ) O(1/\sqrt{s}) O ( 1/ s ) for permutations of size s s s . As mentioned earlier, the smallest permutation may have size s = Θ ( N 1 / 3 ) s=\Theta(N^{1/3}) s = Θ ( N 1/3 ) , which would give us a weaker bound. Instead, we bound how much the operator moves the state outside of the good space. If s s s is too small, we add its points to the boundary B B B , shrinking the part of the graph where we may walk. This causes two errors, one from adding points that are not fixed to the new boundary B B B and another because the new good states need not belong to the original good space. We show that these errors are both at most O ( q / N ) O(\sqrt{q/N}) O ( q / N ) . As a free vertex has an O ( 1 / N ) O(1/N) O ( 1/ N ) probability of being at a particular point, the probability any of the O ( q ) O(q) O ( q ) vertices hits one of the O ( s ) O(s) O ( s ) boundary points is O ( q s / N ) O(qs/N) O ( q s / N ) . This gives us an O ( q s / N ) O(\sqrt{qs/N}) O ( q s / N ) bound on the difference between the good spaces, which we multiply by the O ( 1 / s ) O(1/\sqrt{s}) O ( 1/ s ) difference between the oracle operators to bound each error by O ( q / N ) O(\sqrt{q/N}) O ( q / N ) . For larger permutations, the transfer from [21 ] suffices, giving us a transfer within the permitted bounds.
We finally obtain Theorem 1.1 . An empty database is trivially good and the algorithm’s unitaries do not affect the database. Therefore summing the errors over q q q queries, we get the bound. In § 4.4 , we also compare independent weld permutations with a weld that forms a single cycle. By showing an algorithm cannot distinguish them efficiently, their acceptance probability cannot differ too much. Placing the boundary at distance n / 3 n/3 n /3 away from both roots gives us the final success bound.
Distributions over graphs. Our sampling distribution differs from the original distribution over welded trees in [15 ] . The original chooses a uniformly random alternating cycle between the leaves, while we fix a proper edge coloring and permute edges between adjacent columns, separately for each color. Different uncolored graphs can be obtained from different numbers of compatible colored graphs, so forgetting the colors does not make the distribution uniform. For example, if two leaves on opposite sides have parent edges colored α \alpha α and β \beta β , any weld edge joining them must have color γ \gamma γ . On the other hand, if both parent edges have color α \alpha α , their connecting edge can instead have color β \beta β or γ \gamma γ . Furthermore, even when conditioning on a single cycle, as we do in § 4.4 , there is a sampling bias. Consequently, Theorem 1.1 gives a lower bound for this sampling distribution and for pathfinding on welded trees in the worst case—which suffices to illustrate an exponential separation between exit finding and pathfinding—but not on average for the original distribution.
Nonetheless, our techniques can be altered to recover an average-case bound for the original distribution by abandoning the proper edge coloring and instead assigning distinct labels to the edges at each vertex, without requiring labels at opposite ends of an edge to be equal. Therefore, we permute all edges between adjacent columns together. Every weld cycle has the same number of label assignments, since each leaf has two ways to assign its welded edges to its two available labels. Conditioning on a single cycle gives us the original distribution. The same proof of technique applies, with an additional error due to the fact that the edge labels occur in slightly uneven numbers within each column that is absorbed in the final bound. We omit the details of this variant of the result.
Open problems
This work raises several natural questions for further investigation.
Instantiating the welded trees oracle. Both the classical hardness of exit finding [15 ] and our lower bound for pathfinding are stated in the black-box model where they use oracles which we do not know how to implement efficiently. A natural question is whether the oracle can be instantiated : is there a family of graphs with a succinct and efficiently computable description (such as a keyed construction, possibly combined with obfuscation) for which the exit can still be found by a quantum walk but finding an entrance–exit path remains hard for efficient quantum algorithms? The difficulty is that an explicit circuit for the neighbor function can leak structure that the random-oracle model hides. For example, if labels are computed in a way that reveals the column of a vertex, then the exit is trivial to find classically. Hiding this information while keeping the neighbor function efficiently computable seems to require a nontrivial cryptographic assumption. Of course, non-black-box attacks exploiting an explicit instantiation are not covered by our lower bound, in contrast to settings where a random oracle can be heuristically replaced by a hash function (e.g., [45 ] ). To the best of our knowledge this question has not been addressed in the literature; existing work on implementing the welded trees oracle concerns circuit synthesis for explicit, non-hidden welds (e.g., [GLR+13, GCJ17]), which does not aim to conceal the graph structure.
The remaining gap in the query complexity. Theorem 1.1 shows that Ω ( ( 2 n / n ) 1 / 3 ) \Omega\left((2^n/n)^{1/3}\right) Ω ( ( 2 n / n ) 1/3 ) queries are required for constant success probability, while the straightforward collision-finding algorithm described above uses O ( n 2 n / 3 ) O(n^{2n/3}) O ( n 2 n /3 ) queries. Can we close this gap?
Space complexity. The collision-based algorithm uses Θ ~ ( 2 n / 3 ) \widetilde{\Theta}(2^{n/3}) Θ ( 2 n /3 ) bits of coherently addressable classical memory.
Similar considerations hold for the basic task of collision finding: the query-optimal algorithm [10 ] uses an amount of coherently addressable classical space comparable to its query complexity, and it is unknown whether similar query complexity can be achieved with significantly less space, or what is the nature of the query–space tradeoff (though a tradeoff has been established for the problem of finding many collision pairs [30 ] ). It would be interesting to prove query–space tradeoffs for pathfinding, to understand how they compare to such tradeoffs for collision finding, and to determine the time complexity of pathfinding without coherently addressable memory. (Such tradeoffs are explored in [35 ] , but this question remains largely open.)
Other graphs. Previous work has identified examples of other graphs with exponential separations between classical and quantum traversal, including graphs that generalize the structure of welded trees [12 ] and graphs built by combining many welded trees [33 , 36 , 38 ] .
Our framework applies compressed permutation oracles to randomly labeled and randomly structured graphs in a general way, so it might be able to show hardness of pathfinding for other graphs.
Another open problem is to identify examples of quantum speedup for graph traversal, with or without hardness of pathfinding, that are not obtained by modifying or composing the welded trees graph.
Pathfinding in cryptographic graphs. Many hash functions and key-exchange schemes are built on expander graphs, and their security reduces to the hardness of finding a path between two vertices. For example, the Charles–Lauter–Goren hash function [19 ] maps a message to the endpoint of a nonbacktracking walk in a supersingular isogeny graph starting at a fixed curve; preimage finding is equivalent to pathfinding in this graph, and collision finding is equivalent to finding a cycle. Pathfinding in this graph is polynomial-time equivalent to computing the endomorphism ring of a supersingular curve (subject to the generalized Riemann hypothesis, with a randomized reduction running in expected polynomial time) [EHL^{+}18, Wes22]. The welded trees problem can be seen as providing a black-box example of a graph for which such a pathfinding problem essentially requires collision finding.
We stress that there is no formal connection between welded trees and isogeny graphs. Isogeny graphs are explicit rather than randomly labeled, their vertices have canonical names (j j j -invariants), and their algebraic structure admits non-generic reductions (such as to the endomorphism ring problem) that have no analogue in the black-box setting. Is it possible to make a precise connection that establishes cryptographically relevant hardness results?
Preliminaries
Let us describe the notation used in this paper. For positive integers a , b a,b a , b such that a ≤ b a \le b a ≤ b , we use [ a ] [a] [ a ] to denote the set { 1 , 2 , … , a } \{1,2,\ldots,a\} { 1 , 2 , … , a } and [ a , b ] [a,b] [ a , b ] for { a , a + 1 , … , b } \{a,a+1,\ldots,b\} { a , a + 1 , … , b } . For operators A , B A,B A , B we write [ A , B ] = A B − B A [A,B]=AB-BA [ A , B ] = A B − B A . For subspaces V ⊆ U V \subseteq U V ⊆ U , we use the update U ∖ V U \setminus V U ∖ V . The symbol ρ \rho ρ will be used to denote density operators and for a pure state ∣ ψ ⟩ |\psi\rangle ∣ ψ ⟩ , ρ ( ∣ ψ ⟩ ) = ∣ ψ ⟩ ⟨ ψ ∣ \rho(|\psi\rangle)=|\psi\rangle\langle\psi| ρ ( ∣ ψ ⟩) = ∣ ψ ⟩ ⟨ ψ ∣ . All Hilbert spaces considered here are finite-dimensional. We use ∥ ⋅ ∥ \lVert\cdot\rVert ∥ ⋅ ∥ for the Euclidean norm of a vector or the induced operator norm. All projectors are orthogonal projectors. Throughout the section, we use s s s to denote an arbitrary integer such that s ≥ 3 s \ge3 s ≥ 3 . We use Sym ( s ) \operatorname{Sym}(s) Sym ( s ) to denote the set of permutations of [ s ] [s] [ s ] , and ϕ ∼ Sym ( s ) \phi\sim\operatorname{Sym}(s) ϕ ∼ Sym ( s ) denotes drawing a uniformly random permutation. Similarly, Sym ( D ) \operatorname{Sym}(D) Sym ( D ) for a set D D D is the set of permutations over D D D .
A graph G = ( V , E ) G=(V,E) G = ( V , E ) consists of vertices V V V and edges E E E between the vertices. When G G G is a rooted tree, we let r ( G ) r(G) r ( G ) be the root of G G G and for any v ∈ V v \in V v ∈ V , let depth ( v ) \operatorname{depth}(v) depth ( v ) be the distance between v v v and r ( G ) r(G) r ( G ) .
A quantum query algorithm A ( O ) \mathcal{A}^{(O)} A ( O ) that makes q q q queries to the oracle O O O is specified by a sequence of oracle-independent unitaries A 0 , … , A q A_0,\ldots,A_q A 0 , … , A q on its workspace, producing the final state A q O ⋯ A 1 O A 0 ∣ ψ ⟩ A_q O \cdots A_1 O A_0|\psi\rangle A q O ⋯ A 1 O A 0 ∣ ψ ⟩ . Access to O O O is provided using an XOR oracle, defined as
∣ x , y ⟩ → O f ∣ x , y ⊕ f ( x ) ⟩ . |x,y\rangle\xrightarrow{O_f} |x,y\oplus f(x)\rangle. ∣ x , y ⟩ O f ∣ x , y ⊕ f ( x )⟩ .
Note that we are assuming that every algorithm makes at least 1 query.
Useful statements. The following facts are useful in later analysis.
Lemma 2.1. Let H = H 1 ⊕ ⋯ ⊕ H k \mathcal{H}=\mathcal{H}_1\oplus\cdots\oplus\mathcal{H}_k H = H 1 ⊕ ⋯ ⊕ H k be a Hilbert space and O : H → H O:\mathcal{H}\to\mathcal{H} O : H → H an operator such that O = O 1 ⊕ ⋯ ⊕ O k O=O_1\oplus\cdots\oplus O_k O = O 1 ⊕ ⋯ ⊕ O k where for all i ∈ [ k ] i\in[k] i ∈ [ k ] , O i : H i → H i O_i:\mathcal{H}_i\to\mathcal{H}_i O i : H i → H i . Then,
∥ O ∥ = max i ∈ [ k ] ∥ O i ∥ . \lVert O\rVert=\max_{i\in[k]}\lVert O_i\rVert. ∥ O ∥ = i ∈ [ k ] max ∥ O i ∥ .
In the following statement, for a subspace τ \tau τ , Π τ \Pi_\tau Π τ denotes the orthogonal projector onto τ \tau τ .
Lemma 2.2 ([17 Theorem 1.1] ). Let G G G be a linear map with ∥ G ∥ ≤ 1 \lVert G\rVert\le1 ∥ G ∥ ≤ 1 and S , S ′ S,S' S , S ′ be subspaces of its domain. Suppose there exists a constant c > 0 c>0 c > 0 such that for all z ∈ G S z\in GS z ∈ GS , there exists some f ∈ S f\in S f ∈ S such that G f = z Gf=z G f = z and ∥ f ∥ ≤ c ∥ z ∥ \lVert f\rVert\le c\lVert z\rVert ∥ f ∥ ≤ c ∥ z ∥ . Suppose the same holds for S ′ S' S ′ . Then,
∥ Π G S − Π G S ′ ∥ ≤ c ∥ Π S − Π S ′ ∥ . \lVert\Pi_{GS}-\Pi_{GS'}\rVert\le c\lVert\Pi_S-\Pi_{S'}\rVert. ∥ Π GS − Π G S ′ ∥ ≤ c ∥ Π S − Π S ′ ∥ .
Lemma 2.3 (Consequence of Theorem IX.5.11 in [8 ] ). Let { T b } b \{T_b\}_b { T b } b be a set of self-adjoint operators such that T b T c = 0 T_bT_c=0 T b T c = 0 for b ≠ c b\ne c b = c . Let Π , Π b \Pi,\Pi_b Π , Π b be orthogonal projectors such that [ T b , Π b ] = 0 [T_b,\Pi_b]=0 [ T b , Π b ] = 0 . Then,
∥ [ Π , ∑ b T b ] ∥ ≤ 2 ( ∑ b ∥ T b ∥ 2 ∥ Π − Π b ∥ 2 ) 1 / 2 . \left\lVert\left[\Pi,\sum_b T_b\right]\right\rVert\le2\left(\sum_b\lVert T_b\rVert^2\lVert\Pi-\Pi_b\rVert^2\right)^{1/2}. [ Π , b ∑ T b ] ≤ 2 ( b ∑ ∥ T b ∥ 2 ∥ Π − Π b ∥ 2 ) 1/2 .
Lemma 2.4 (Consequence of Lemma 1 of [32 ] ). For some spaces H , L \mathcal{H},\mathcal{L} H , L , let V : H → L V:\mathcal{H}\to\mathcal{L} V : H → L be a contraction (i.e., ∥ V ∥ ≤ 1 \lVert V\rVert\le1 ∥ V ∥ ≤ 1 ) with K = V † V ≻ 0 K=V^\dagger V\succ0 K = V † V ≻ 0 , U , T U,T U , T self-adjoint operators on H , L \mathcal{H},\mathcal{L} H , L , δ = T V − V U \delta=TV-VU δ = T V − V U and I = V K − 1 / 2 \mathcal{I}=VK^{-1/2} I = V K − 1/2 . Suppose that some orthogonal projectors Π , Π ′ \Pi,\Pi' Π , Π ′ commute with K K K , [ K , U ] Π = Π ′ [ K , U ] Π [K,U]\Pi=\Pi'[K,U]\Pi [ K , U ] Π = Π ′ [ K , U ] Π and K ⪰ κ 1 K\succeq\kappa\mathbf{1} K ⪰ κ 1 on the ranges of Π , Π ′ \Pi,\Pi' Π , Π ′ for some constant κ \kappa κ . Then I \mathcal{I} I is an isometry and
∥ ( T I − I U ) Π ∥ ≤ ∥ δ Π ∥ κ 1 / 2 + ∥ ( δ † V − V † δ ) Π ∥ 2 κ 3 / 2 . \lVert(T\mathcal{I}-\mathcal{I}U)\Pi\rVert\le\frac{\lVert\delta\Pi\rVert}{\kappa^{1/2}}+\frac{\lVert(\delta^\dagger V-V^\dagger\delta)\Pi\rVert}{2\kappa^{3/2}}. ∥( T I − I U ) Π ∥ ≤ κ 1/2 ∥ δ Π ∥ + 2 κ 3/2 ∥( δ † V − V † δ ) Π ∥ .
Injective databases. As our result extensively uses the compressed permutation oracle of [13 ] , we follow their notation described below. We use I s \mathcal{I}_s I s to denote the set of partial injective functions from [ s ] [s] [ s ] to [ s ] [s] [ s ] (i.e., functions I : [ s ] → [ s ] ∪ { ⊥ } I:[s]\to[s]\cup\{\perp\} I : [ s ] → [ s ] ∪ { ⊥ } whose outputs in [ s ] [s] [ s ] are pairwise distinct). For I ∈ I s I\in\mathcal{I}_s I ∈ I s , we write Dom ( I ) \operatorname{Dom}(I) Dom ( I ) and Im ( I ) \operatorname{Im}(I) Im ( I ) for its domain and image (both excluding ⊥ \perp ⊥ ), and define its size ∣ I ∣ = ∣ Dom ( I ) ∣ |I|=|\operatorname{Dom}(I)| ∣ I ∣ = ∣ Dom ( I ) ∣ . We write I ≤ t = { I ∈ I s : ∣ I ∣ ≤ t } \mathcal{I}_{\le t}=\{I\in\mathcal{I}_s:|I|\le t\} I ≤ t = { I ∈ I s : ∣ I ∣ ≤ t } . For x ∈ [ s ] x\in[s] x ∈ [ s ] and y ∈ [ s ] ∪ { ⊥ } y\in[s]\cup\{\perp\} y ∈ [ s ] ∪ { ⊥ } , we define I [ x → y ] I[x\to y] I [ x → y ] as,
I [ x → y ] ( x ′ ) : = { I ( x ′ ) If x ≠ x ′ and either I ( x ′ ) ≠ y or y = ⊥ , ⊥ If x ≠ x ′ , y ≠ ⊥ and I ( x ′ ) = y , y If x = x ′ . I[x\to y](x') :=
\begin{cases}
I(x') & \text{If }x\ne x'\text{ and either }I(x')\ne y\text{ or }y=\perp,\\
\perp& \text{If }x\ne x',y\ne\perp\text{ and }I(x')=y,\\
y & \text{If }x=x'.
\end{cases} I [ x → y ] ( x ′ ) := ⎩ ⎨ ⎧ I ( x ′ ) ⊥ y If x = x ′ and either I ( x ′ ) = y or y =⊥ , If x = x ′ , y = ⊥ and I ( x ′ ) = y , If x = x ′ .
The Hilbert space H ( I s ) \mathcal{H}(\mathcal{I}_s) H ( I s ) is spanned by orthonormal basis states { ∣ I ⟩ : I ∈ I s } \{|I\rangle:I\in\mathcal{I}_s\} { ∣ I ⟩ : I ∈ I s } , and we store the injective database in the register I I I . We write Π ≤ t , I \Pi_{\le t,I} Π ≤ t , I for the projector
Π ≤ t , I : = ∑ I : ∣ I ∣ ≤ t ∣ I ⟩ ⟨ I ∣ . \Pi_{\le t,I}:=\sum_{I:|I|\le t}|I\rangle\langle I|. Π ≤ t , I := I : ∣ I ∣ ≤ t ∑ ∣ I ⟩ ⟨ I ∣.
The notation ∥ ⋅ ∥ ≤ t \lVert\cdot\rVert_{\le t} ∥ ⋅ ∥ ≤ t means ∥ ⋅ Π ≤ t , I ∥ \lVert\cdot\Pi_{\le t,I}\rVert ∥ ⋅ Π ≤ t , I ∥ . When comparing two injective databases I , J I,J I , J , we say that J ⪰ I J\succeq I J ⪰ I when for all x ∈ Dom ( I ) x\in\operatorname{Dom}(I) x ∈ Dom ( I ) , we have I ( x ) = J ( x ) I(x)=J(x) I ( x ) = J ( x ) . We denote the set of databases that extend I I I as Ext ( I ) : = { J : J ⪰ I } \operatorname{Ext}(I):=\{J:J\succeq I\} Ext ( I ) := { J : J ⪰ I } . The projector Π ⪰ I , I \Pi_{\succeq I,I} Π ⪰ I , I on all databases that include I I I is defined as
Π ⪰ I , I : = ∑ J : J ∈ Ext ( I ) ∣ J ⟩ ⟨ J ∣ . \Pi_{\succeq I,I}:=\sum_{J:J\in\operatorname{Ext}(I)}|J\rangle\langle J|. Π ⪰ I , I := J : J ∈ Ext ( I ) ∑ ∣ J ⟩ ⟨ J ∣.
Permutation oracles
Let us present permutation oracles and the compressed permutation oracle framework of [13 ] . We emphasize that throughout the paper, symbols such as I \mathrm{I} I , C \mathrm{C} C and L \mathrm{L} L symbolize registers, while I I I , C C C and L L L represent instances of databases (usually in these registers). Hence ∣ I ⟩ I |I\rangle_{\mathrm{I}} ∣ I ⟩ I represents the database I I I in register I \mathrm{I} I .
Standard permutation oracle. First, let us describe the oracle O ϕ O_{\phi} O ϕ for ϕ ∼ Sym ( s ) \phi\sim\operatorname{Sym}(s) ϕ ∼ Sym ( s ) on b ∈ { 0 , 1 } b \in\{0,1\} b ∈ { 0 , 1 } , x ∈ [ s ] x \in[s] x ∈ [ s ] , and y ∈ { 0 , 1 } d y \in\{0,1\}^{d} y ∈ { 0 , 1 } d ,
O ϕ ∣ b , x ⟩ X ∣ y ⟩ Y : = ∣ b , x ⟩ X ∣ y ⊕ ϕ 1 − 2 b ( x ) ⟩ Y . O_{\phi}|b,x\rangle_{X}|y\rangle_{Y} := |b,x\rangle_{X}|y \oplus\phi^{1-2b}(x)\rangle_{Y}. O ϕ ∣ b , x ⟩ X ∣ y ⟩ Y := ∣ b , x ⟩ X ∣ y ⊕ ϕ 1 − 2 b ( x ) ⟩ Y .
where the registers X , Y X,Y X , Y describe the query input and output registers. In this case, the bit b b b controls the direction of querying x x x . Let A O ϕ A O_{\phi} A O ϕ be a quantum algorithm that makes q q q queries to the oracle O ϕ O_{\phi} O ϕ . The final mixed state of the algorithm and its purification are described as
∣ ψ q O ϕ ⟩ = A q O ϕ ⋯ A 1 O ϕ A 0 ∣ 0 ⟩ , ρ A ( O ϕ ) = E ϕ ∼ Sym ( s ) [ ∣ ψ q O ϕ ⟩ A ⟨ ψ q O ϕ ∣ ] , ∣ ψ q ( O ) ⟩ A P = 1 s ! ∑ ϕ ∈ Sym ( s ) ∣ ψ q O ϕ ⟩ A ∣ ϕ ⟩ P . \begin{aligned}
|\psi_{q}^{O_{\phi}}\rangle&= A_{q}O_{\phi}\cdots A_{1}O_{\phi}A_{0}|0\rangle,\\
\rho_{A}^{(O_{\phi})} &= \mathbb{E}_{\phi\sim\operatorname{Sym}(s)}\left[|\psi_{q}^{O_{\phi}}\rangle_{A}\langle\psi_{q}^{O_{\phi}}|\right],\\
|\psi_{q}^{(O)}\rangle_{AP} &= \frac{1}{\sqrt{s!}}\sum_{\phi\in\operatorname{Sym}(s)}|\psi_{q}^{O_{\phi}}\rangle_{A}|\phi\rangle_{P}.
\end{aligned} ∣ ψ q O ϕ ⟩ ρ A ( O ϕ ) ∣ ψ q ( O ) ⟩ A P = A q O ϕ ⋯ A 1 O ϕ A 0 ∣0 ⟩ , = E ϕ ∼ Sym ( s ) [ ∣ ψ q O ϕ ⟩ A ⟨ ψ q O ϕ ∣ ] , = s ! 1 ϕ ∈ Sym ( s ) ∑ ∣ ψ q O ϕ ⟩ A ∣ ϕ ⟩ P .
Ordinary compressed permutation oracle. Let us begin by defining several key terms. Let ∣ ψ 1 ⟩ , ∣ ψ 2 ⟩ |\psi_{1}\rangle,|\psi_{2}\rangle ∣ ψ 1 ⟩ , ∣ ψ 2 ⟩ be arbitrary pure states such that ⟨ ψ 1 ∣ ψ 2 ⟩ = 0 \langle\psi_{1}|\psi_{2}\rangle=0 ⟨ ψ 1 ∣ ψ 2 ⟩ = 0 . Then pCF ( ∣ ψ 1 ⟩ , ∣ ψ 2 ⟩ ) \operatorname{pCF}(|\psi_{1}\rangle,|\psi_{2}\rangle) pCF ( ∣ ψ 1 ⟩ , ∣ ψ 2 ⟩) represents the compression primitive defined as
pCF ( ∣ ψ 1 ⟩ , ∣ ψ 2 ⟩ ) : = 1 − ∣ ψ 1 ⟩ ⟨ ψ 1 ∣ − ∣ ψ 2 ⟩ ⟨ ψ 2 ∣ + ∣ ψ 1 ⟩ ⟨ ψ 2 ∣ + ∣ ψ 2 ⟩ ⟨ ψ 1 ∣ . \operatorname{pCF}(|\psi_{1}\rangle,|\psi_{2}\rangle) := \mathbb{1}-|\psi_{1}\rangle\langle\psi_{1}|-|\psi_{2}\rangle\langle\psi_{2}|+|\psi_{1}\rangle\langle\psi_{2}|+|\psi_{2}\rangle\langle\psi_{1}|. pCF ( ∣ ψ 1 ⟩ , ∣ ψ 2 ⟩) := 1 − ∣ ψ 1 ⟩ ⟨ ψ 1 ∣ − ∣ ψ 2 ⟩ ⟨ ψ 2 ∣ + ∣ ψ 1 ⟩ ⟨ ψ 2 ∣ + ∣ ψ 2 ⟩ ⟨ ψ 1 ∣.
This operator swaps ∣ ψ 1 ⟩ |\psi_{1}\rangle ∣ ψ 1 ⟩ and ∣ ψ 2 ⟩ |\psi_{2}\rangle ∣ ψ 2 ⟩ and fixes their common orthogonal complement and is a self-adjoint unitary.
The database register I \mathrm{I} I holds states in H ( I s ) \mathcal{H}(I_{s}) H ( I s ) , initialized to ∣ ⊥ ⟩ I |\perp\rangle_{\mathrm{I}} ∣ ⊥ ⟩ I , the trivial database mapping all inputs to ⊥ \perp ⊥ . In the forward operators below, we suppress the direction bit b b b . For I ∈ I s I \in I_{s} I ∈ I s and x ∉ Dom ( I ) x \notin\operatorname{Dom}(I) x ∈ / Dom ( I ) , let
∣ + x , I ⟩ : = 1 s − ∣ I ∣ ∑ y ∈ [ s ] ∖ Im ( I ) ∣ I [ x → y ] ⟩ |+_{x,I}\rangle:= \frac{1}{\sqrt{s-|I|}}\sum_{y\in[s]\setminus\operatorname{Im}(I)}|I[x\to y]\rangle ∣ + x , I ⟩ := s − ∣ I ∣ 1 y ∈ [ s ] ∖ Im ( I ) ∑ ∣ I [ x → y ]⟩
be the uniform superposition over all non-colliding extensions of I I I at x x x . Define
H x , I : = Span ( { ∣ I ⟩ } ∪ { ∣ I [ x → y ] ⟩ : y ∈ [ s ] ∖ Im ( I ) } ) . \mathcal{H}_{x,I}:=\operatorname{Span}\left(\{|I\rangle\}\cup\{|I[x\to y]\rangle:y\in[s]\setminus\operatorname{Im}(I)\}\right). H x , I := Span ( { ∣ I ⟩} ∪ { ∣ I [ x → y ]⟩ : y ∈ [ s ] ∖ Im ( I )} ) .
These subspaces form an orthogonal decomposition of H ( I s ) \mathcal{H}(I_{s}) H ( I s ) for fixed x x x . On H x , I \mathcal{H}_{x,I} H x , I , the permutation compression operator pC x , I \operatorname{pC}_{x,I} pC x , I swaps the trivially undefined state ∣ I ⟩ |I\rangle ∣ I ⟩ with this uniform superposition:
pC x , I : = 1 − ∣ + x , I ⟩ ⟨ + x , I ∣ − ∣ I ⟩ ⟨ I ∣ + ∣ + x , I ⟩ ⟨ I ∣ + ∣ I ⟩ ⟨ + x , I ∣ (4) \operatorname{pC}_{x,I}:=\mathbb{1}-|+_{x,I}\rangle\langle+_{x,I}|-|I\rangle\langle I|+|+_{x,I}\rangle\langle I|+|I\rangle\langle+_{x,I}| \tag*{(4)} pC x , I := 1 − ∣ + x , I ⟩ ⟨ + x , I ∣ − ∣ I ⟩ ⟨ I ∣ + ∣ + x , I ⟩ ⟨ I ∣ + ∣ I ⟩ ⟨ + x , I ∣ (4)
= pCF ( ∣ + x , I ⟩ , ∣ I ⟩ ) ∣ H x , I . (5) =\operatorname{pCF}(|+_{x,I}\rangle,|I\rangle)|_{\mathcal{H}_{x,I}}. \tag*{(5)} = pCF ( ∣ + x , I ⟩ , ∣ I ⟩) ∣ H x , I . (5)
The key difference from the standard (function) compression operator is that the superposition ranges only over [ s ] ∖ Im ( I ) [s]\setminus\operatorname{Im}(I) [ s ] ∖ Im ( I ) , enforcing injectivity at each step. The full operator pC \operatorname{pC} pC is defined as
pC x : = ⨂ I : x ∉ Dom ( I ) pC x , I (6) \operatorname{pC}_{x}:=\bigotimes_{I:x\notin\operatorname{Dom}(I)}\operatorname{pC}_{x,I} \tag*{(6)} pC x := I : x ∈ / Dom ( I ) ⨂ pC x , I (6)
pC : = ∑ x ∈ [ s ] ∣ x ⟩ ⟨ x ∣ X ⊗ pC x , I . (7) \operatorname{pC}:=\sum_{x\in[s]}|x\rangle\langle x|_{X}\otimes\operatorname{pC}_{x,I}. \tag*{(7)} pC := x ∈ [ s ] ∑ ∣ x ⟩ ⟨ x ∣ X ⊗ pC x , I . (7)
The extended purified oracle P \mathrm{P} P XORs the current database value into the output register when the queried input is defined, and acts as the identity otherwise:
P ∣ x ⟩ X ∣ y ⟩ Y ∣ I ⟩ I : = { ∣ x ⟩ X ∣ y ⊕ I ( x ) ⟩ Y ∣ I ⟩ I if x ∈ Dom ( I ) , ∣ x ⟩ X ∣ y ⟩ Y ∣ I ⟩ I otherwise. \mathrm{P}|x\rangle_X|y\rangle_Y|I\rangle_I :=
\begin{cases}
|x\rangle_X|y \oplus I(x)\rangle_Y|I\rangle_I & \text{if } x \in\operatorname{Dom}(I),\\
|x\rangle_X|y\rangle_Y|I\rangle_I & \text{otherwise.}
\end{cases} P ∣ x ⟩ X ∣ y ⟩ Y ∣ I ⟩ I := { ∣ x ⟩ X ∣ y ⊕ I ( x ) ⟩ Y ∣ I ⟩ I ∣ x ⟩ X ∣ y ⟩ Y ∣ I ⟩ I if x ∈ Dom ( I ) , otherwise.
Finally, the flip operator F \mathrm{F} F inverts the injective database, F ∣ I ⟩ I = ∣ I − 1 ⟩ I \mathrm{F}|I\rangle_I = |I^{-1}\rangle_I F ∣ I ⟩ I = ∣ I − 1 ⟩ I , where I − 1 ( y ) = x I^{-1}(y) = x I − 1 ( y ) = x whenever I ( x ) = y I(x) = y I ( x ) = y . This allows inverse queries to be answered by first flipping the database, applying the forward-direction oracle, then flipping back.
The compressed permutation oracle c p O \mathrm{cpO} cpO is defined as
c p O ∣ b ⟩ : = ∣ b ⟩ ⊗ { p C ⋅ P ⋅ p C † if b = 0 , F ⋅ p C ⋅ P ⋅ p C † F otherwise. (8) \mathrm{cpO}|b\rangle:= |b\rangle\otimes
\begin{cases}
\mathrm{pC}\cdot\mathrm{P}\cdot\mathrm{pC}^{\dagger} & \text{if } b=0,\\
\mathrm{F}\cdot\mathrm{pC}\cdot\mathrm{P}\cdot\mathrm{pC}^{\dagger}\mathrm{F} & \text{otherwise.}
\end{cases} \tag*{(8)} cpO ∣ b ⟩ := ∣ b ⟩ ⊗ { pC ⋅ P ⋅ pC † F ⋅ pC ⋅ P ⋅ pC † F if b = 0 , otherwise. (8)
The compressed oracle experiment initializes I \mathrm{I} I to ∣ ⊥ ⟩ I |\bot\rangle_I ∣⊥ ⟩ I and replaces each call to O φ O_\varphi O φ with c p O \mathrm{cpO} cpO . The unitaries A i A_i A i act only on A \mathrm{A} A , with the identity on I \mathrm{I} I implicit. The joint state of the algorithm and database registers after q q q queries is
∣ ψ q ( c p O ) ⟩ A I : = A q c p O ⋯ A 1 c p O A 0 ∣ 0 ⟩ A ∣ ⊥ ⟩ I . |\psi_q^{(\mathrm{cpO})}\rangle_{\mathrm{AI}} := A_q\mathrm{cpO}\cdots A_1\mathrm{cpO}A_0|0\rangle_A|\bot\rangle_I. ∣ ψ q ( cpO ) ⟩ AI := A q cpO ⋯ A 1 cpO A 0 ∣0 ⟩ A ∣⊥ ⟩ I .
Tracing out I \mathrm{I} I gives the algorithm’s reduced state
ρ A ( c p O ) : = Tr I [ ∣ ψ q ( c p O ) ⟩ ⟨ ψ q ( c p O ) ∣ A I ] . \rho_A^{(\mathrm{cpO})} := \operatorname{Tr}_I\left[|\psi_q^{(\mathrm{cpO})}\rangle\langle\psi_q^{(\mathrm{cpO})}|_{\mathrm{AI}}\right]. ρ A ( cpO ) := Tr I [ ∣ ψ q ( cpO ) ⟩ ⟨ ψ q ( cpO ) ∣ AI ] .
The following observation is useful to understand how querying the same value may behave.
Observation 2.5. Let I ∈ I s I \in\mathcal{I}_s I ∈ I s , x ∉ Dom ( I ) x \notin\operatorname{Dom}(I) x ∈ / Dom ( I ) , and y ∈ [ s ] ∖ Im ( I ) y \in[s] \setminus\operatorname{Im}(I) y ∈ [ s ] ∖ Im ( I ) , and let m = s − ∣ I ∣ m=s-|I| m = s − ∣ I ∣ . Then,
p C x ∣ I [ x → y ] ⟩ I = ∣ I [ x → y ] ⟩ − 1 m ∣ + x , I ⟩ + 1 m ∣ I ⟩ . \mathrm{pC}_x|I[x\to y]\rangle_I = |I[x\to y]\rangle- \frac{1}{\sqrt{m}}|+_{x,I}\rangle+ \frac{1}{\sqrt{m}}|I\rangle. pC x ∣ I [ x → y ] ⟩ I = ∣ I [ x → y ]⟩ − m 1 ∣ + x , I ⟩ + m 1 ∣ I ⟩ .
The same calculation gives the following bound when the answer is retained.
Proposition 2.6. Let x , y ∈ [ s ] x,y \in[s] x , y ∈ [ s ] and I I I be an injective database over [ s ] [s] [ s ] such that I ( x ) = y I(x)=y I ( x ) = y , and I ⊥ = I ∖ { ( x , y ) } I_\perp=I\setminus\{(x,y)\} I ⊥ = I ∖ {( x , y )} . Then,
∥ ( p C x − 1 ) ∣ I ⟩ ∥ 2 = 2 s − ∣ I ∣ + 1 . \left\|(\mathrm{pC}_x-1)|I\rangle\right\|^2=\frac{2}{s-|I|+1}. ∥ ( pC x − 1 ) ∣ I ⟩ ∥ 2 = s − ∣ I ∣ + 1 2 . More generally, fix x x x and let ζ \zeta ζ be a vector supported on databases I I I with x ∈ Dom ( I ) x \in\operatorname{Dom}(I) x ∈ Dom ( I ) and ∣ I ∣ ≤ r |I|\le r ∣ I ∣ ≤ r , with an orthogonal record ∣ I ( x ) ⟩ |I(x)\rangle ∣ I ( x )⟩ in a subregister of the algorithm register. Then,
∥ ( p C x − 1 ) ζ ∥ ≤ 2 s − r + 1 ∥ ζ ∥ . \left\|(\mathrm{pC}_x-1)\zeta\right\|\le\sqrt{\frac{2}{s-r+1}}\|\zeta\|. ∥ ( pC x − 1 ) ζ ∥ ≤ s − r + 1 2 ∥ ζ ∥.
Proof. By Theorem 2.5,
∥ ( p C x − 1 ) ∣ I ⟩ ∥ 2 = ∥ ∣ I ⊥ ⟩ − ∣ + x , I ⊥ ⟩ ∥ 2 s − ∣ I ⊥ ∣ = 2 s − ∣ I ⊥ ∣ = 2 s − ∣ I ∣ + 1 , (9) \left\|(\mathrm{pC}_x-1)|I\rangle\right\|^2
=\frac{\left\||I_\perp\rangle-|+_{x,I_\perp}\rangle\right\|^2}{s-|I_\perp|}
=\frac{2}{s-|I_\perp|}
=\frac{2}{s-|I|+1}, \tag*{(9)} ∥ ( pC x − 1 ) ∣ I ⟩ ∥ 2 = s − ∣ I ⊥ ∣ ∥ ∣ I ⊥ ⟩ − ∣ + x , I ⊥ ⟩ ∥ 2 = s − ∣ I ⊥ ∣ 2 = s − ∣ I ∣ + 1 2 , (9)
where in the second equality we used the fact that ∣ I ⊥ ⟩ |I_\perp\rangle ∣ I ⊥ ⟩ and ∣ + x , I ⊥ ⟩ |+_{x,I_\perp}\rangle ∣ + x , I ⊥ ⟩ are orthogonal. For the second part of the statement, we may write ζ \zeta ζ as
ζ = ∑ y , I ⊥ ( ζ y , I ⊥ ⊗ ∣ y ⟩ ) A ∣ I ⊥ [ x → y ] ⟩ I . \zeta=\sum_{y,I_\perp}(\zeta_{y,I_\perp}\otimes|y\rangle)_A|I_\perp[x\to y]\rangle_I. ζ = y , I ⊥ ∑ ( ζ y , I ⊥ ⊗ ∣ y ⟩ ) A ∣ I ⊥ [ x → y ] ⟩ I .
Therefore,
∥ ( p C x − 1 ) ζ ∥ 2 = ∑ y , I ⊥ 2 s − ∣ I ⊥ ∣ ∥ ζ y , I ⊥ ∥ 2 (By xref‘Eq. (9)‘) ≤ 2 s − r + 1 ∑ y , I ⊥ ∥ ζ y , I ⊥ ∥ 2 = 2 s − r + 1 ∥ ζ ∥ 2 . \begin{aligned}
\left\|(\mathrm{pC}_x-1)\zeta\right\|^2
=\sum_{y,I_\perp}\frac{2}{s-|I_\perp|}\|\zeta_{y,I_\perp}\|^2
\quad\text{(By {xref}`Eq. (9)`)} \\
&\le\frac{2}{s-r+1}\sum_{y,I_\perp}\|\zeta_{y,I_\perp}\|^2
=\frac{2}{s-r+1}\|\zeta\|^2.
\end{aligned} ∥ ( pC x − 1 ) ζ ∥ 2 = y , I ⊥ ∑ s − ∣ I ⊥ ∣ 2 ∥ ζ y , I ⊥ ∥ 2 (By xref ‘Eq. (9)‘) ≤ s − r + 1 2 y , I ⊥ ∑ ∥ ζ y , I ⊥ ∥ 2 = s − r + 1 2 ∥ ζ ∥ 2 .
Taking the square root completes the statement. ∎
Exact compressed permutation oracle. Aside from the compressed permutation oracle from [13 ] , we use an oracle that bridges the gap between cpO and O ϕ O_{\phi} O ϕ based on the subspaces analyzed by Rosmanis [42 ] and revisited in [21 ] . This will be an exact compressed purification of the standard oracle, we call it the exact compressed permutation oracle and denote it by c p O ^ \widehat{\mathrm{cpO}} cpO . Throughout this section, we say a bound on O c O_c O c holds with coherent controls if it also holds for ∑ c ∣ c ⟩ ⟨ c ∣ ⊗ O c \sum_c |c\rangle\langle c| \otimes O_c ∑ c ∣ c ⟩ ⟨ c ∣ ⊗ O c .
For I ∈ I s I \in\mathcal{I}_s I ∈ I s , let ∣ T I ⟩ |T_I\rangle ∣ T I ⟩ be the uniform superposition over permutations that extend I I I ,
∣ T I ⟩ : = 1 ( s − ∣ I ∣ ) ! ∑ ϕ ⊃ I ∣ ϕ ⟩ . |T_I\rangle:= \frac{1}{\sqrt{(s-|I|)!}} \sum_{\phi\supset I} |\phi\rangle. ∣ T I ⟩ := ( s − ∣ I ∣ )! 1 ϕ ⊃ I ∑ ∣ ϕ ⟩ .
For r ∈ [ 0 , s ] r \in[0,s] r ∈ [ 0 , s ] , define H s , ≤ r : = Span { ∣ T I ⟩ : I ∈ I s , ∣ I ∣ = r } \mathcal{H}_{s,\leq r} := \operatorname{Span}\{|T_I\rangle: I \in\mathcal{I}_s, |I|=r\} H s , ≤ r := Span { ∣ T I ⟩ : I ∈ I s , ∣ I ∣ = r } . Notice that these spaces are nested as for ∣ I ∣ = r < s |I|=r<s ∣ I ∣ = r < s and x ∉ Dom ( I ) x \notin\operatorname{Dom}(I) x ∈ / Dom ( I ) ,
∣ T I ⟩ = 1 s − r ∑ y ∉ Im ( I ) ∣ T I [ x → y ] ⟩ . |T_I\rangle= \frac{1}{\sqrt{s-r}} \sum_{y \notin\operatorname{Im}(I)} |T_{I[x\to y]}\rangle. ∣ T I ⟩ = s − r 1 y ∈ / Im ( I ) ∑ ∣ T I [ x → y ] ⟩ .
Let H s , ≤ − 1 : = 0 \mathcal{H}_{s,\leq-1}:=0 H s , ≤ − 1 := 0 , H s , r : = H s , ≤ r ⊖ H s , ≤ r − 1 \mathcal{H}_{s,r}:=\mathcal{H}_{s,\leq r}\ominus\mathcal{H}_{s,\leq r-1} H s , r := H s , ≤ r ⊖ H s , ≤ r − 1 and Π s , r , Π s , ≤ r \Pi_{s,r},\Pi_{s,\leq r} Π s , r , Π s , ≤ r be the projectors on H s , r , H s , ≤ r \mathcal{H}_{s,r},\mathcal{H}_{s,\leq r} H s , r , H s , ≤ r respectively. We call H s , r \mathcal{H}_{s,r} H s , r level r r r . On the register P over fully described permutations ϕ \phi ϕ we define
Π ⪰ I , P : = ∑ ϕ ⊃ I ∣ ϕ ⟩ ⟨ ϕ ∣ P . \Pi_{\succeq I,\mathrm{P}} := \sum_{\phi\supset I} |\phi\rangle\langle\phi|_{\mathrm{P}}. Π ⪰ I , P := ϕ ⊃ I ∑ ∣ ϕ ⟩ ⟨ ϕ ∣ P .
Notice the following.
Observation 2.7 ([21 , 42 ] ). A standard XOR query changes the level by at most 1, cpO changes the database size by at most 1, and
Π ⪰ I , P H s , ≤ t ⊆ H s , ≤ t + ∣ I ∣ . \Pi_{\succeq I,\mathrm{P}}\mathcal{H}_{s,\leq t}\subseteq\mathcal{H}_{s,\leq t+|I|}. Π ⪰ I , P H s , ≤ t ⊆ H s , ≤ t + ∣ I ∣ .
On the span of databases I I I such that ∣ I ∣ = r |I|=r ∣ I ∣ = r , define the operators Γ s , r \Gamma_{s,r} Γ s , r and G s , r G_{s,r} G s , r as
Γ s , r ∣ I ⟩ = Π s , r ∣ T I ⟩ , G s , r = Γ s , r Γ s , r † . (10) \Gamma_{s,r}|I\rangle=\Pi_{s,r}|T_I\rangle,\qquad G_{s,r}=\Gamma_{s,r}\Gamma_{s,r}^{\dagger}. \tag*{(10)} Γ s , r ∣ I ⟩ = Π s , r ∣ T I ⟩ , G s , r = Γ s , r Γ s , r † . (10)
By Lemma 4.9 in [21 ] , G s , r ⪰ Π s , r G_{s,r}\succeq\Pi_{s,r} G s , r ⪰ Π s , r and when 2 r < s 2r<s 2 r < s ,
Π s , r ⪯ G s , r ⪯ exp ( r s − 2 r + 1 ) Π s , r . (11) \Pi_{s,r}\preceq G_{s,r}\preceq\exp\left(\frac{r}{s-2r+1}\right)\Pi_{s,r}. \tag*{(11)} Π s , r ⪯ G s , r ⪯ exp ( s − 2 r + 1 r ) Π s , r . (11)
The intertwiner I s \mathcal{I}_s I s that takes us from P to I is defined as
I s : = ⨁ r < s Γ s , r † G s , r − 1 / 2 . (12) \mathcal{I}_s:=\bigoplus_{r<s}\Gamma_{s,r}^{\dagger}G_{s,r}^{-1/2}. \tag*{(12)} I s := r < s ⨁ Γ s , r † G s , r − 1/2 . (12)
By Theorem 4.2 and Lemma 4.10 in [21 ] ,
I s † I s = 1 , I s ∣ T ⊥ ⟩ = ∣ ⊥ ⟩ , \mathcal{I}_s^{\dagger}\mathcal{I}_s=1,\qquad\mathcal{I}_s|T_{\perp}\rangle=|\perp\rangle, I s † I s = 1 , I s ∣ T ⊥ ⟩ = ∣ ⊥ ⟩ ,
Π ≤ r , I I s = I s Π s , ≤ r . (13) \Pi_{\leq r,\mathrm{I}}\mathcal{I}_s=\mathcal{I}_s\Pi_{s,\leq r}. \tag*{(13)} Π ≤ r , I I s = I s Π s , ≤ r . (13)
In particular, I s \mathcal{I}_s I s preserves norms and converts level bounds into record bounds. Let K s = Ran ( I s ) K_s=\operatorname{Ran}(\mathcal{I}_s) K s = Ran ( I s ) and Π K s = I s I s † \Pi_{K_s}=\mathcal{I}_s\mathcal{I}_s^{\dagger} Π K s = I s I s † . By Eq. (13) , Π K s \Pi_{K_s} Π K s commutes with database size projectors Π ≤ t , I \Pi_{\leq t,\mathrm{I}} Π ≤ t , I .
For a fixed x ∈ [ s ] x\in[s] x ∈ [ s ] , let O x O_x O x be defined by O x ∣ a , ϕ ⟩ Y P = ∣ a ⊕ ϕ ( x ) , ϕ ⟩ Y P O_x|a,\phi\rangle_{\mathrm{Y}\mathrm{P}}=|a\oplus\phi(x),\phi\rangle_{\mathrm{Y}\mathrm{P}} O x ∣ a , ϕ ⟩ YP = ∣ a ⊕ ϕ ( x ) , ϕ ⟩ YP and let c p O x \mathrm{cpO}_x cpO x be the corresponding ordinary compressed permutation query. Define the exact query operator c p O ^ x \widehat{\mathrm{cpO}}_x cpO x as
c p O ^ x : = I s O x I s † + ( 1 − Π K s ) c p O x ( 1 − Π K s ) . (14) \widehat{\mathrm{cpO}}_x:=\mathcal{I}_sO_x\mathcal{I}_s^{\dagger}+(1-\Pi_{K_s})\mathrm{cpO}_x(1-\Pi_{K_s}). \tag*{(14)} cpO x := I s O x I s † + ( 1 − Π K s ) cpO x ( 1 − Π K s ) . (14)
Using the proof techniques of [21 ] , we obtain the following statement. Note that in the ranges we use, we obtain an improvement over Theorem 4.2 of [21 ] as we can get rid of a O ( t / s ) O(t/s) O ( t / s ) term, where t t t is the number of records in the database.
Lemma 2.8 (Exact compressed oracle query). The operator c p O ^ x \widehat{\mathrm{cpO}}_x cpO x is a self-adjoint contraction that satisfies c p O ^ x I s = I s O x \widehat{\mathrm{cpO}}_x\mathcal{I}_s=\mathcal{I}_sO_x cpO x I s = I s O x and changes the database size by at most 1. Furthermore, if 4 ( t + 4 ) ≤ s 4(t+4)\le s 4 ( t + 4 ) ≤ s , then
∥ ( c p O ^ x − c p O x ) Π ≤ t , I ∥ = O ( 1 s ) . (15) \left\|(\widehat{\mathrm{cpO}}_x-\mathrm{cpO}_x)\Pi_{\le t,I}\right\|=O\left(\frac{1}{\sqrt{s}}\right). \tag*{(15)} ( cpO x − cpO x ) Π ≤ t , I = O ( s 1 ) . (15) The same holds for inverse queries and under coherent control.
Proof. Let us first show the statements about c p O ^ x \widehat{\mathrm{cpO}}_x cpO x . In Eq. (14) , the two summands act on orthogonal subspaces and are self-adjoint contractions. Furthermore, as I s † I s = 1 \mathcal{I}_s^{\dagger}\mathcal{I}_s=1 I s † I s = 1 and ( 1 − Π K s ) I s = 0 (1-\Pi_{K_s})\mathcal{I}_s=0 ( 1 − Π K s ) I s = 0 , we have that c p O ^ x I s = I s O x \widehat{\mathrm{cpO}}_x\mathcal{I}_s=\mathcal{I}_sO_x cpO x I s = I s O x . By Theorem 2.7 and Eq. (13) , each summand changes the size of a database by at most one.
The rest of the proof is concerned with Eq. (15) . Proposition 4.8 in [21 ] is an analogous statement to ours, except for swap queries. Specifically, it uses the maps
V s : = ⨁ r < s Γ s , r † G s , r − 1 , K : = V s † V s = ⨁ r < s G s , r − 1 . V_s:=\bigoplus_{r<s}\Gamma_{s,r}^{\dagger}G_{s,r}^{-1},\qquad K:=V_s^{\dagger}V_s=\bigoplus_{r<s}G_{s,r}^{-1}. V s := r < s ⨁ Γ s , r † G s , r − 1 , K := V s † V s = r < s ⨁ G s , r − 1 .
By Eqs. (11) and (12) and 4 ( t + 4 ) ≤ s 4(t+4)\le s 4 ( t + 4 ) ≤ s ,
0 ≺ K ⪯ 1 , K ∣ H s , ≤ t + 3 ⪰ e − 1 / 2 1 , I s = V s K − 1 / 2 . 0\prec K\preceq1,\qquad K|_{\mathcal{H}_{s,\le t+3}}\succeq e^{-1/2}1,\qquad\mathcal{I}_s=V_sK^{-1/2}. 0 ≺ K ⪯ 1 , K ∣ H s , ≤ t + 3 ⪰ e − 1/2 1 , I s = V s K − 1/2 .
For y ∈ [ s ] y\in[s] y ∈ [ s ] , let S y = p C F ( ∣ ⊥ ⟩ , ∣ y ⟩ ) S_y=p_{\mathrm{CF}}(|\perp\rangle,|y\rangle) S y = p CF ( ∣ ⊥ ⟩ , ∣ y ⟩) swap ∣ ⊥ ⟩ |\perp\rangle ∣ ⊥ ⟩ with ∣ y ⟩ |y\rangle ∣ y ⟩ and fix the other basis states. Define the swap compressed permutation oracle as
O x s w a p ∣ a , ϕ ⟩ Y P : = ( S ϕ ( x ) ∣ a ⟩ ) Y ⊗ ∣ ϕ ⟩ P , O_x^{\mathrm{swap}}|a,\phi\rangle_{YP}:=(S_{\phi(x)}|a\rangle)_Y\otimes|\phi\rangle_P, O x swap ∣ a , ϕ ⟩ Y P := ( S ϕ ( x ) ∣ a ⟩ ) Y ⊗ ∣ ϕ ⟩ P ,
P x s w a p ∣ a , I ⟩ Y I : = { ( S I ( x ) ∣ a ⟩ ) Y ⊗ ∣ I ⟩ I , x ∈ Dom ( I ) , ∣ a , I ⟩ Y I , x ∉ Dom ( I ) , P_x^{\mathrm{swap}}|a,I\rangle_{YI}:=
\begin{cases}
(S_{I(x)}|a\rangle)_Y\otimes|I\rangle_I,&x\in\operatorname{Dom}(I),\\
|a,I\rangle_{YI},&x\notin\operatorname{Dom}(I),
\end{cases} P x swap ∣ a , I ⟩ Y I := { ( S I ( x ) ∣ a ⟩ ) Y ⊗ ∣ I ⟩ I , ∣ a , I ⟩ Y I , x ∈ Dom ( I ) , x ∈ / Dom ( I ) ,
c p O x s w a p : = p C x P x s w a p p C x . \mathrm{cpO}_x^{\mathrm{swap}}:=p_{C_x}P_x^{\mathrm{swap}}p_{C_x}. cpO x swap := p C x P x swap p C x .
Proposition 4.8 in [21 ] states that for j ∈ [ 0 , t + 3 ] j\in[0,t+3] j ∈ [ 0 , t + 3 ] ,
∥ ( c p O x s w a p V s − V s O x s w a p ) Π s , ≤ j ∥ ≤ 60 s − j = O ( s − 1 / 2 ) . (16) \left\|(\mathrm{cpO}_x^{\mathrm{swap}}V_s-V_sO_x^{\mathrm{swap}})\Pi_{s,\le j}\right\|\le\frac{60}{\sqrt{s-j}}=O(s^{-1/2}). \tag*{(16)} ∥ ( cpO x swap V s − V s O x swap ) Π s , ≤ j ∥ ≤ s − j 60 = O ( s − 1/2 ) . (16)
where O x s w a p = ∑ y ∈ [ s ] S y ⊗ Π { ( x , y ) } , P O_x^{\mathrm{swap}}=\sum_{y\in[s]}S_y\otimes\Pi_{\{(x,y)\},P} O x swap = ∑ y ∈ [ s ] S y ⊗ Π {( x , y )} , P . By Theorem 2.7, O x s w a p O_x^{\mathrm{swap}} O x swap changes the level by at most 1. Similarly, c p O x s w a p \mathrm{cpO}_x^{\mathrm{swap}} cpO x swap also only changes the size of a database by at most 1. Consequently, as V s V_s V s maps level r r r to databases of size r r r , for j ∈ [ 0 , t + 2 ] j\in[0,t+2] j ∈ [ 0 , t + 2 ] ,
∥ ( c p O x s w a p V s − V s O x s w a p ) Π ≤ j , I ∥ = O ( s − 1 / 2 ) . \left\|(\mathrm{cpO}_x^{\mathrm{swap}}V_s-V_sO_x^{\mathrm{swap}})\Pi_{\le j,I}\right\|=O(s^{-1/2}). ∥ ( cpO x swap V s − V s O x swap ) Π ≤ j , I ∥ = O ( s − 1/2 ) .
Consequently, as ∥ V s ∥ ≤ 1 \|V_s\|\le1 ∥ V s ∥ ≤ 1 ,
∥ [ K , O x s w a p ] Π s , ≤ j ∥ = ∥ ( ( c p O x s w a p V s − V s O x s w a p ) † V s − V s † ( c p O x s w a p V s − V s O x s w a p ) ) Π s , ≤ j ∥ = O ( s − 1 / 2 ) . \begin{aligned}
\left\|[K,O_x^{\mathrm{swap}}]\Pi_{s,\le j}\right\|
&=\left\|((\mathrm{cpO}_x^{\mathrm{swap}}V_s-V_sO_x^{\mathrm{swap}})^\dagger V_s
-V_s^\dagger(\mathrm{cpO}_x^{\mathrm{swap}}V_s-V_sO_x^{\mathrm{swap}}))\Pi_{s,\le j}\right\|\\
&=O(s^{-1/2}).
\end{aligned} ∥ [ K , O x swap ] Π s , ≤ j ∥ = (( cpO x swap V s − V s O x swap ) † V s − V s † ( cpO x swap V s − V s O x swap )) Π s , ≤ j = O ( s − 1/2 ) .
As K K K preserves levels, [ K , O x s w a p ] [K,O_x^{\mathrm{swap}}] [ K , O x swap ] maps H s , ≤ j \mathcal{H}_{s,\le j} H s , ≤ j into H s , ≤ j + 1 \mathcal{H}_{s,\le j+1} H s , ≤ j + 1 . Apply Theorem 2.4 with V = V s V=V_s V = V s , U = O x s w a p U=O_x^{\mathrm{swap}} U = O x swap , T = c p O x s w a p T=\mathrm{cpO}_x^{\mathrm{swap}} T = cpO x swap , I = I s \mathcal{I}=\mathcal{I}_s I = I s , Π = Π s , ≤ j \Pi=\Pi_{s,\le j} Π = Π s , ≤ j , Π ′ = Π s , ≤ j + 1 \Pi'=\Pi_{s,\le j+1} Π ′ = Π s , ≤ j + 1 and κ = e − 1 / 2 \kappa=e^{-1/2} κ = e − 1/2 to get
∥ ( c p O x s w a p I s − I s O x s w a p ) Π s , ≤ j ∥ = O ( s − 1 / 2 ) , (17) \left\|(\mathrm{cpO}_x^{\mathrm{swap}}\mathcal{I}_s-\mathcal{I}_sO_x^{\mathrm{swap}})\Pi_{s,\le j}\right\|=O(s^{-1/2}), \tag*{(17)} ∥ ( cpO x swap I s − I s O x swap ) Π s , ≤ j ∥ = O ( s − 1/2 ) , (17)
when j ∈ [ 0 , t + 2 ] j\in[0,t+2] j ∈ [ 0 , t + 2 ] . Notice that any XOR query can be implemented by a swap query into an auxiliary register ∣ ⊥ ⟩ |\perp\rangle ∣ ⊥ ⟩ , XORing its value into the output register Y Y Y and applying a second swap query to restore the register to ∣ ⊥ ⟩ |\perp\rangle ∣ ⊥ ⟩ . The same works for compressed queries. Hence by the triangle inequality and Eq. (17) ,
∥ ( c p O x I s − I s O x ) Π s , ≤ j ∥ = O ( s − 1 / 2 ) . (18) \left\|(\mathrm{cpO}_x\mathcal{I}_s-\mathcal{I}_sO_x)\Pi_{s,\le j}\right\|=O(s^{-1/2}). \tag*{(18)} ∥ ( cpO x I s − I s O x ) Π s , ≤ j ∥ = O ( s − 1/2 ) . (18)
where j ∈ [ 0 , t + 1 ] j \in[0,t+1] j ∈ [ 0 , t + 1 ] . The decrease in j j j is due to the first swap query. By Eq. (14) and Π K s = I s I s † \Pi_{K_s}=\mathcal{I}_s\mathcal{I}_s^\dagger Π K s = I s I s † ,
c p O ^ x − c p O x = − ( c p O x I s − I s O x ) I s † − I s ( c p O x I s − I s O x ) † ( 1 − Π K s ) . \widehat{\mathrm{cpO}}_x-\mathrm{cpO}_x=-(\mathrm{cpO}_x\mathcal{I}_s-\mathcal{I}_s\mathrm{O}_x)\mathcal{I}_s^\dagger-\mathcal{I}_s(\mathrm{cpO}_x\mathcal{I}_s-\mathcal{I}_s\mathrm{O}_x)^\dagger(1-\Pi_{K_s}). cpO x − cpO x = − ( cpO x I s − I s O x ) I s † − I s ( cpO x I s − I s O x ) † ( 1 − Π K s ) .
By Theorem 2.7 and Eq. (13) , c p O x I s − I s O x \mathrm{cpO}_x\mathcal{I}_s-\mathcal{I}_s\mathrm{O}_x cpO x I s − I s O x maps level r r r to databases of sizes in [ r − 1 , r + 1 ] [r-1,r+1] [ r − 1 , r + 1 ] , while Π K s \Pi_{K_s} Π K s preserves the database size. Hence by Eq. (18) ,
∥ ( c p O ^ x − c p O x ) Π ≤ t , I ∥ ≤ ∥ ( c p O x I s − I s O x ) Π s , ≤ t ∥ + ∥ ( c p O x I s − I s O x ) Π s , ≤ t + 1 ∥ = O ( s − 1 / 2 ) . \begin{aligned}
\left\|(\widehat{\mathrm{cpO}}_x-\mathrm{cpO}_x)\Pi_{\leq t,I}\right\|\leq\left\|(\mathrm{cpO}_x\mathcal{I}_s-\mathcal{I}_s\mathrm{O}_x)\Pi_{s,\leq t}\right\|+\left\|(\mathrm{cpO}_x\mathcal{I}_s-\mathcal{I}_s\mathrm{O}_x)\Pi_{s,\leq t+1}\right\| \\
&=O(s^{-1/2}).
\end{aligned} ( cpO x − cpO x ) Π ≤ t , I ≤ ∥ ( cpO x I s − I s O x ) Π s , ≤ t ∥ + ∥ ( cpO x I s − I s O x ) Π s , ≤ t + 1 ∥ = O ( s − 1/2 ) .
Hence Eq. (15) holds. Inversion follows analogously. The generalization under coherent controls follows from Theorem 2.1.
Welded trees oracles
In this section, we use the compressed permutation oracle technique to construct the welded trees oracles and analyze their properties.
Standard welded trees oracle
The following hold for the remainder of the paper. Assume that n n n is even and N : = 2 n N:=2^n N := 2 n . Let l ∈ [ 2 , n − 4 ] l\in[2,n-4] l ∈ [ 2 , n − 4 ] be a fixed integer for the remainder of the paper and the middle columns be B m i d = [ n − l , n + l ] B_{\mathrm{mid}}=[n-l,n+l] B mid = [ n − l , n + l ] . Furthermore, we use N l : = 2 n − l N_l:=2^{n-l} N l := 2 n − l for the size of the permuted column and ϵ l : = 2 − l \epsilon_l:=2^{-l} ϵ l := 2 − l as an error term.
An instance of a welded trees graph G n = ( V n , E n ) G_n=(V_n,E_n) G n = ( V n , E n ) consists of two binary trees T 1 , T 2 T_1,T_2 T 1 , T 2 of height n n n (with n n n edges from each root to a leaf and n + 1 n+1 n + 1 vertex levels) whose leaves are joined by a bipartite cycle. We denote the set of edges on the cycle E W E_W E W and call them the “weld edges”. For c ∈ [ 0 , 2 n + 1 ] c\in[0,2n+1] c ∈ [ 0 , 2 n + 1 ] , we define the column nodes col ( c ) ⊆ V n \operatorname{col}(c)\subseteq V_n col ( c ) ⊆ V n as
col ( c ) : = { { v ∈ V ( T 1 ) : depth ( v ) = c } if c ≤ n , { v ∈ V ( T 2 ) : depth ( v ) = 2 n + 1 − c } if c ≥ n + 1. \operatorname{col}(c):=
\begin{cases}
\{v\in V(T_1):\operatorname{depth}(v)=c\} & \text{if }c\leq n,\\
\{v\in V(T_2):\operatorname{depth}(v)=2n+1-c\} & \text{if }c\geq n+1.
\end{cases} col ( c ) := { { v ∈ V ( T 1 ) : depth ( v ) = c } { v ∈ V ( T 2 ) : depth ( v ) = 2 n + 1 − c } if c ≤ n , if c ≥ n + 1.
For v ∈ V n v\in V_n v ∈ V n , we define col ( v ) \operatorname{col}(v) col ( v ) to be the unique c ∈ [ 0 , 2 n + 1 ] c\in[0,2n+1] c ∈ [ 0 , 2 n + 1 ] such that v ∈ col ( c ) v\in\operatorname{col}(c) v ∈ col ( c ) .
Notice that as T 1 , T 2 T_1,T_2 T 1 , T 2 are binary trees, ∣ col ( c ) ∣ = 2 min ( c , 2 n + 1 − c ) |\operatorname{col}(c)|=2^{\min(c,2n+1-c)} ∣ col ( c ) ∣ = 2 m i n ( c , 2 n + 1 − c ) . Each vertex v ∈ V n v\in V_n v ∈ V n is assigned a structural index w : V n → [ 0 , 2 n + 2 − 3 ] w:V_n\to[0,2^{n+2}-3] w : V n → [ 0 , 2 n + 2 − 3 ] as follows:
w ( v ) : = { 0 if v = r ( T 1 ) , 2 n + 1 − 1 if v = r ( T 2 ) , 2 ⋅ w ( v ′ ) + 1 col ( v ) ∈ [ 1 , n ] and v is the left child of v ′ , 2 ⋅ w ( v ′ ) + 2 col ( v ) ∈ [ 1 , n ] and v is the right child of v ′ , 2 ⋅ w ( v ′ ) − 2 n + 1 + 2 col ( v ) ∈ [ n + 1 , 2 n ] and v is the left child of v ′ , 2 ⋅ w ( v ′ ) − 2 n + 1 + 3 col ( v ) ∈ [ n + 1 , 2 n ] and v is the right child of v ′ . w(v):=
\begin{cases}
0 & \text{if }v=r(T_1),\\
2^{n+1}-1 & \text{if }v=r(T_2),\\
2\cdot w(v')+1 & \text{col}(v)\in[1,n]\text{ and }v\text{ is the left child of }v',\\
2\cdot w(v')+2 & \text{col}(v)\in[1,n]\text{ and }v\text{ is the right child of }v',\\
2\cdot w(v')-2^{n+1}+2 & \text{col}(v)\in[n+1,2n]\text{ and }v\text{ is the left child of }v',\\
2\cdot w(v')-2^{n+1}+3 & \text{col}(v)\in[n+1,2n]\text{ and }v\text{ is the right child of }v'.
\end{cases} w ( v ) := ⎩ ⎨ ⎧ 0 2 n + 1 − 1 2 ⋅ w ( v ′ ) + 1 2 ⋅ w ( v ′ ) + 2 2 ⋅ w ( v ′ ) − 2 n + 1 + 2 2 ⋅ w ( v ′ ) − 2 n + 1 + 3 if v = r ( T 1 ) , if v = r ( T 2 ) , col ( v ) ∈ [ 1 , n ] and v is the left child of v ′ , col ( v ) ∈ [ 1 , n ] and v is the right child of v ′ , col ( v ) ∈ [ n + 1 , 2 n ] and v is the left child of v ′ , col ( v ) ∈ [ n + 1 , 2 n ] and v is the right child of v ′ .
For the remainder of the paper, we will use the structural vertex v ∈ V n v\in V_n v ∈ V n and the structural index w ( v ) w(v) w ( v ) interchangeably. We will use p : V n → V n ∪ { ⊥ } p:V_n\to V_n\cup\{\perp\} p : V n → V n ∪ { ⊥ } to denote the parent of a vertex,
p ( w ) : = { ⌊ ( w − 1 ) / 2 ⌋ if col ( w ) ∈ [ 1 , n ] , ⌊ ( w − 2 n + 1 ) / 2 ⌋ + 2 n + 1 − 1 if col ( w ) ∈ [ n + 1 , 2 n ] , ⊥ otherwise . p(w):=
\begin{cases}
\lfloor(w-1)/2\rfloor& \text{if }\operatorname{col}(w)\in[1,n],\\
\lfloor(w-2^{n+1})/2\rfloor+2^{n+1}-1 & \text{if }\operatorname{col}(w)\in[n+1,2n],\\
\perp& \text{otherwise}.
\end{cases} p ( w ) := ⎩ ⎨ ⎧ ⌊( w − 1 ) /2 ⌋ ⌊( w − 2 n + 1 ) /2 ⌋ + 2 n + 1 − 1 ⊥ if col ( w ) ∈ [ 1 , n ] , if col ( w ) ∈ [ n + 1 , 2 n ] , otherwise .
Next, let us assign colors from the set C = { α , β , γ } \mathcal{C}=\{\alpha,\beta,\gamma\} C = { α , β , γ } to the edges.
Observation 3.1 (Edge coloring G n G_n G n ). For any G n G_n G n , there exists a proper edge coloring Color : E n → C \operatorname{Color}:E_n\to\mathcal{C} Color : E n → C .
Proof. Notice that G n G_n G n is a bipartite graph as the odd columns may form one partition and the even columns the other. As the maximum degree of G n G_n G n is 3, König’s theorem implies that the graph is 3-edge-colorable [Kön16].
For the remainder of the paper, we will fix some edge coloring Color obtained using Theorem 3.1. An example of a welded trees instance using the procedures above may be found in Figure 5 .
Figure 5. An instance of a welded trees graph G 3 G_3 G 3 .
For all nodes except the roots of T 1 , T 2 T_1,T_2 T 1 , T 2 , we define the parent color χ \chi χ as the color that leads to a node’s parent, χ ( v ) = Color ( { v , p ( v ) } ) \chi(v) = \operatorname{Color}(\{v,p(v)\}) χ ( v ) = Color ({ v , p ( v )}) . We will partition the nodes v v v in G n G_n G n based on col ( v ) \operatorname{col}(v) col ( v ) and χ ( v ) \chi(v) χ ( v ) . Specifically, for all c ∈ [ 2 n ] c \in[2n] c ∈ [ 2 n ] and α ∈ C \alpha\in C α ∈ C , define the color class C c , α C_{c,\alpha} C c , α and its size N c , α N_{c,\alpha} N c , α as,
C c , α : = { v : col ( v ) = c , χ ( v ) = α } , N c , α : = ∣ C c , α ∣ C_{c,\alpha} := \{v : \operatorname{col}(v) = c,\chi(v) = \alpha\}, \qquad N_{c,\alpha} := |C_{c,\alpha}| C c , α := { v : col ( v ) = c , χ ( v ) = α } , N c , α := ∣ C c , α ∣
We call the edges in column c c c those between vertices in columns c − 1 c-1 c − 1 and c c c . The following lemma shows that the number of edges with a color is approximately 1 3 \frac{1}{3} 3 1 of all edges in the column.
Lemma 3.2 (Lemma 55 in the full version of [16 ] ). Let α 1 \alpha_1 α 1 be the color that is not used by any edges to r ( T 1 ) r(T_1) r ( T 1 ) . For any color α ′ ∈ C \alpha' \in C α ′ ∈ C , let γ ( α ′ , c ) \gamma(\alpha',c) γ ( α ′ , c ) denote the number of edges colored α ′ \alpha' α ′ in column c ∈ [ n ] c \in[n] c ∈ [ n ] of T 1 T_1 T 1 . Then,
γ ( α ′ , c ) = { ⌈ 2 c 3 ⌉ if c is odd and α ′ = α 1 or c is even and α ′ ≠ α 1 ⌊ 2 c 3 ⌋ otherwise. (19) \gamma(\alpha',c) =
\begin{cases}
\left\lceil\frac{2^c}{3} \right\rceil& \text{if } c \text{ is odd and } \alpha' = \alpha_1 \text{ or } c \text{ is even and } \alpha' \ne\alpha_1 \\
\left\lfloor\frac{2^c}{3} \right\rfloor& \text{otherwise.}
\end{cases} \tag*{(19)} γ ( α ′ , c ) = { ⌈ 3 2 c ⌉ ⌊ 3 2 c ⌋ if c is odd and α ′ = α 1 or c is even and α ′ = α 1 otherwise. (19) For T 2 T_2 T 2 (i.e. c ∈ [ n + 2 , 2 n + 1 ] c \in[n+2,2n+1] c ∈ [ n + 2 , 2 n + 1 ] ), replace c c c in Eq. (19) with 2 n − c + 2 2n-c+2 2 n − c + 2 and let α 1 \alpha_1 α 1 be the color not used by the edges incident to r ( T 2 ) r(T_2) r ( T 2 ) .
Proof. The proof is by induction on the edge-column c c c . When c = 1 c=1 c = 1 , the graph contains two differently colored edges neither of which is equal to α 1 \alpha_1 α 1 , meaning Eq. (19) holds. Assume Eq. (19) holds for some c ∈ [ n − 1 ] c \in[n-1] c ∈ [ n − 1 ] , c c c is odd and α \alpha α is some color. For edge-column c + 1 c+1 c + 1 , the parent v v v of each edge colored α \alpha α must have χ ( v ) ≠ α \chi(v) \ne\alpha χ ( v ) = α . Therefore,
γ ( α , c + 1 ) = ∑ α ′ ≠ α γ ( α ′ , c ) = { 2 ⋅ ⌈ 2 c 3 ⌉ if α = α 1 , ⌈ 2 c 3 ⌉ + ⌊ 2 c 3 ⌋ otherwise, = { ⌈ 2 c + 1 3 ⌉ if α = α 1 , ⌊ 2 c + 1 3 ⌋ otherwise. \begin{aligned}
\gamma(\alpha,c+1) = \sum_{\alpha' \ne\alpha} \gamma(\alpha',c) \\
&= \begin{cases}
2\cdot\left\lceil\frac{2^c}{3} \right\rceil& \text{if } \alpha= \alpha_1, \\
\left\lceil\frac{2^c}{3} \right\rceil+ \left\lfloor\frac{2^c}{3} \right\rfloor& \text{otherwise,}
\end{cases} \\
&= \begin{cases}
\left\lceil\frac{2^{c+1}}{3} \right\rceil& \text{if } \alpha= \alpha_1, \\
\left\lfloor\frac{2^{c+1}}{3} \right\rfloor& \text{otherwise.}
\end{cases}
\end{aligned} γ ( α , c + 1 ) = α ′ = α ∑ γ ( α ′ , c ) = { 2 ⋅ ⌈ 3 2 c ⌉ ⌈ 3 2 c ⌉ + ⌊ 3 2 c ⌋ if α = α 1 , otherwise, = ⎩ ⎨ ⎧ ⌈ 3 2 c + 1 ⌉ ⌊ 3 2 c + 1 ⌋ if α = α 1 , otherwise.
The result when c c c is even or c ∈ [ n + 2 , 2 n + 1 ] c \in[n+2,2n+1] c ∈ [ n + 2 , 2 n + 1 ] follows analogously.
Furthermore, it will be useful to partition the edges in E n E_n E n based on their colors. For an arbitrary edge e = { u , v } e=\{u,v\} e = { u , v } where col ( u ) > col ( v ) \operatorname{col}(u)>\operatorname{col}(v) col ( u ) > col ( v ) , we use head ( e ) \operatorname{head}(e) head ( e ) and tail ( e ) \operatorname{tail}(e) tail ( e ) to denote their direction,
head ( e ) : = { v if e ∈ E T 1 , u if e ∈ E T 2 , u if e ∈ E W . \operatorname{head}(e):=
\begin{cases}
v & \text{if } e\in E_{T_1},\\
u & \text{if } e\in E_{T_2},\\
u & \text{if } e\in E_W.
\end{cases} head ( e ) := ⎩ ⎨ ⎧ v u u if e ∈ E T 1 , if e ∈ E T 2 , if e ∈ E W .
tail ( e ) : = { u if head ( e ) = v , v otherwise. \operatorname{tail}(e):=
\begin{cases}
u & \text{if } \operatorname{head}(e)=v,\\
v & \text{otherwise.}
\end{cases} tail ( e ) := { u v if head ( e ) = v , otherwise.
Thus a tree edge is always directed from a child to its parent. Formally, for any edge e ∈ E T 1 ∪ E T 2 e\in E_{T_1}\cup E_{T_2} e ∈ E T 1 ∪ E T 2 , χ ( tail ( e ) ) = Color ( e ) \chi(\operatorname{tail}(e))=\operatorname{Color}(e) χ ( tail ( e )) = Color ( e ) . For weld edges E W E_W E W , the order is arbitrary, so we set it to go from column n n n to n + 1 n+1 n + 1 . Letting c ∈ [ 2 n ] c\in[2n] c ∈ [ 2 n ] and α ∈ C \alpha\in\mathcal{C} α ∈ C ,
E t r , c , α : = { e = { u , v } ∈ E T 1 ∪ E T 2 : col ( tail ( e ) ) = c , Color ( e ) = α } (20) E_{\mathrm{tr},c,\alpha}:=\{e=\{u,v\}\in E_{T_1}\cup E_{T_2}:\operatorname{col}(\operatorname{tail}(e))=c,\operatorname{Color}(e)=\alpha\} \tag*{(20)} E tr , c , α := { e = { u , v } ∈ E T 1 ∪ E T 2 : col ( tail ( e )) = c , Color ( e ) = α } (20)
= { { v , p ( v ) } : v ∈ C c , α } (21) =\{\{v,p(v)\}:v\in C_{c,\alpha}\} \tag*{(21)} = {{ v , p ( v )} : v ∈ C c , α } (21)
E w l d , α : = { e ∈ E W : Color ( e ) = α } . (22) E_{\mathrm{wld},\alpha}:=\{e\in E_W:\operatorname{Color}(e)=\alpha\}. \tag*{(22)} E wld , α := { e ∈ E W : Color ( e ) = α } . (22)
Here c c c indexes the child vertex column. Thus E t r , c , α E_{\mathrm{tr},c,\alpha} E tr , c , α lies in edge-column c c c for T 1 T_1 T 1 and edge-column c + 1 c+1 c + 1 for T 2 T_2 T 2 , using the convention of Theorem 3.2 . By Eqs. (21) and (22) , we have that ∣ E t r , c , α ∣ = N c , α |E_{\mathrm{tr},c,\alpha}|=N_{c,\alpha} ∣ E tr , c , α ∣ = N c , α and ∣ E w l d , α ∣ = ∑ β ∈ C ∖ { α } N n , β |E_{\mathrm{wld},\alpha}|=\sum_{\beta\in\mathcal{C}\setminus\{\alpha\}}N_{n,\beta} ∣ E wld , α ∣ = ∑ β ∈ C ∖ { α } N n , β .
Constructing the oracle. For the remainder of the section, we will construct the welded trees oracle O ( w t ) O^{(\mathrm{wt})} O ( wt ) and describe its distribution. There are two independent sources of randomness, both of which will use permutations. First, we randomize the edges using σ e d g e \sigma_{\mathrm{edge}} σ edge and then the labels using σ l a b e l \sigma_{\mathrm{label}} σ label .
Let us begin by defining the edge permutation σ e d g e \sigma_{\mathrm{edge}} σ edge . Simply put, σ e d g e \sigma_{\mathrm{edge}} σ edge permutes over edges in each column that have the same color. Formally, we consider permutations π : E n → E n \pi:E_n\to E_n π : E n → E n such that,
∀ c ∈ [ 2 n ] , α ∈ C : π ( E t r , c , α ) = E t r , c , α and π ( E w l d , α ) = E w l d , α . (23) \forall c\in[2n],\alpha\in\mathcal{C}:\pi(E_{\mathrm{tr},c,\alpha})=E_{\mathrm{tr},c,\alpha}\text{ and }\pi(E_{\mathrm{wld},\alpha})=E_{\mathrm{wld},\alpha}. \tag*{(23)} ∀ c ∈ [ 2 n ] , α ∈ C : π ( E tr , c , α ) = E tr , c , α and π ( E wld , α ) = E wld , α . (23)
We call permutations that satisfy Eq. (23) color-preserving , as all vertices v v v remain on the same column and their parent color χ ( v ) \chi(v) χ ( v ) does not change.
We may decompose color-preserving permutations based on the permutations over each set of edges separately. We will be solely interested in permutations within the middle columns B m i d B_{\mathrm{mid}} B mid . The entire set of permuted edges is denoted by
B e d g e : = { ( t r , c , α ) : c ∈ B m i d , α ∈ C } ∪ { ( w l d , α ) : α ∈ C } . B_{\mathrm{edge}}:=\{(\mathrm{tr},c,\alpha):c\in B_{\mathrm{mid}},\alpha\in\mathcal{C}\}\cup\{(\mathrm{wld},\alpha):\alpha\in\mathcal{C}\}. B edge := {( tr , c , α ) : c ∈ B mid , α ∈ C } ∪ {( wld , α ) : α ∈ C } .
For b ∈ B e d g e b\in B_{\mathrm{edge}} b ∈ B edge , we let σ b : E b → E b \sigma_b:E_b\to E_b σ b : E b → E b denote the permutation over the corresponding edges and S b S_b S b be the set of all permutations. Finally, we define the edge permutation σ e d g e \sigma_{\mathrm{edge}} σ edge and the set of all permutations S e d g e S_{\mathrm{edge}} S edge as
σ e d g e : = ∏ b ∈ B e d g e σ b \sigma_{\mathrm{edge}}:=\prod_{b\in B_{\mathrm{edge}}}\sigma_b σ edge := b ∈ B edge ∏ σ b
S e d g e : = ∏ b ∈ B e d g e S b . S_{\mathrm{edge}}:=\prod_{b\in B_{\mathrm{edge}}}S_b. S edge := b ∈ B edge ∏ S b .
Notice that when we permute edges using σ e d g e \sigma_{\mathrm{edge}} σ edge , we do not change the columns of the vertices. Therefore, if our oracle returns the structural index, we are leaking the current position in the graph, making the pathfinding problem trivial. In order to avoid this leak, we randomly assign each node with a label. Let M : = 2 2 n M:=2^{2n} M := 2 2 n . The corresponding set of permutations is
S M ( 0 ) : = { π ∈ Sym ( [ 0 , M ] ) : π ( 0 ) = 0 } . S_M^{(0)}:=\{\pi\in\operatorname{Sym}([0,M]):\pi(0)=0\}. S M ( 0 ) := { π ∈ Sym ([ 0 , M ]) : π ( 0 ) = 0 } .
We will always sample the labeling permutation σ l a b e l ∼ S M ( 0 ) \sigma_{\mathrm{label}}\sim S_M^{(0)} σ label ∼ S M ( 0 ) . Notice that as σ l a b e l ( 0 ) = 0 \sigma_{\mathrm{label}}(0)=0 σ label ( 0 ) = 0 , we have that the entrance label is fixed and thus known to the algorithm. Furthermore, since M ≫ ∣ V n ∣ M\gg|V_n| M ≫ ∣ V n ∣ , randomly guessing the label of a structural vertex has a negligible probability.
For v ∈ [ 0 , M ] v \in[0,M] v ∈ [ 0 , M ] and α ∈ C \alpha\in C α ∈ C , we may define the edge-color function e α ( v ) e_\alpha(v) e α ( v ) to be the edge that contains v v v in direction α \alpha α ,
e α ( v ) : = { e if ∃ e = { u , v } ∈ E n s.t. Color ( e ) = α , ⊥ otherwise. (24) e_\alpha(v) :=
\begin{cases}
e & \text{if } \exists e=\{u,v\}\in E_n\text{ s.t. }\operatorname{Color}(e)=\alpha,\\
\perp& \text{otherwise.}
\end{cases} \tag*{(24)} e α ( v ) := { e ⊥ if ∃ e = { u , v } ∈ E n s.t. Color ( e ) = α , otherwise. (24)
Notice that e α ( v ) e_\alpha(v) e α ( v ) returns ⊥ \perp ⊥ either when v ∉ V n v \notin V_n v ∈ / V n or when we query the one color that the edges from the roots of the trees were not assigned by Theorem 3.1. The edge-cell indicator b e d g e ( e ) b_{\mathrm{edge}}(e) b edge ( e ) describes which permutation an edge belongs to:
b e d g e ( e ) : = { ( t r , col ( tail ( e ) ) , Color ( e ) ) if e ∈ E T 1 ∪ E T 2 and col ( tail ( e ) ) ∈ B m i d , ( w l d , Color ( e ) ) if e ∈ E W , ⊥ otherwise. b_{\mathrm{edge}}(e) :=
\begin{cases}
(\mathrm{tr},\operatorname{col}(\operatorname{tail}(e)),\operatorname{Color}(e)) & \text{if }e\in E_{T_1}\cup E_{T_2}\text{ and }\operatorname{col}(\operatorname{tail}(e))\in B_{\mathrm{mid}},\\
(\mathrm{wld},\operatorname{Color}(e)) & \text{if }e\in E_W,\\
\perp& \text{otherwise.}
\end{cases} b edge ( e ) := ⎩ ⎨ ⎧ ( tr , col ( tail ( e )) , Color ( e )) ( wld , Color ( e )) ⊥ if e ∈ E T 1 ∪ E T 2 and col ( tail ( e )) ∈ B mid , if e ∈ E W , otherwise.
Assume that we have some fixed σ e d g e ∈ S e d g e \sigma_{\mathrm{edge}}\in S_{\mathrm{edge}} σ edge ∈ S edge . Letting v ∈ [ 0 , M ] v\in[0,M] v ∈ [ 0 , M ] , α ∈ C \alpha\in C α ∈ C and e = e α ( v ) e=e_\alpha(v) e = e α ( v ) , the neighbor function Nb σ e d g e \operatorname{Nb}_{\sigma_{\mathrm{edge}}} Nb σ edge is defined as
Nb σ e d g e ( v , α ) : = { v if v ∉ V n or e = ⊥ , head ( e ) if e ≠ ⊥ , b e d g e ( e ) = ⊥ and v = tail ( e ) , tail ( e ) if e ≠ ⊥ , b e d g e ( e ) = ⊥ and v = head ( e ) , head ( σ b e d g e ( e ) ( e ) ) if b e d g e ( e ) ≠ ⊥ and v = tail ( e ) , tail ( σ b e d g e ( e ) − 1 ( e ) ) if b e d g e ( e ) ≠ ⊥ and v = head ( e ) . (25) \operatorname{Nb}_{\sigma_{\mathrm{edge}}}(v,\alpha):=
\begin{cases}
v & \text{if }v\notin V_n\text{ or }e=\perp,\\
\operatorname{head}(e) & \text{if }e\ne\perp,\ b_{\mathrm{edge}}(e)=\perp\text{ and }v=\operatorname{tail}(e),\\
\operatorname{tail}(e) & \text{if }e\ne\perp,\ b_{\mathrm{edge}}(e)=\perp\text{ and }v=\operatorname{head}(e),\\
\operatorname{head}(\sigma_{b_{\mathrm{edge}}(e)}(e)) & \text{if }b_{\mathrm{edge}}(e)\ne\perp\text{ and }v=\operatorname{tail}(e),\\
\operatorname{tail}(\sigma_{b_{\mathrm{edge}}(e)}^{-1}(e)) & \text{if }b_{\mathrm{edge}}(e)\ne\perp\text{ and }v=\operatorname{head}(e).
\end{cases} \tag*{(25)} Nb σ edge ( v , α ) := ⎩ ⎨ ⎧ v head ( e ) tail ( e ) head ( σ b edge ( e ) ( e )) tail ( σ b edge ( e ) − 1 ( e )) if v ∈ / V n or e =⊥ , if e = ⊥ , b edge ( e ) =⊥ and v = tail ( e ) , if e = ⊥ , b edge ( e ) =⊥ and v = head ( e ) , if b edge ( e ) = ⊥ and v = tail ( e ) , if b edge ( e ) = ⊥ and v = head ( e ) . (25)
Notice that for a fixed color, the function is an involution:
Nb σ ( Nb σ ( v , α ) , α ) = v . \operatorname{Nb}_{\sigma}(\operatorname{Nb}_{\sigma}(v,\alpha),\alpha)=v. Nb σ ( Nb σ ( v , α ) , α ) = v .
Furthermore, this handles the boundary of B m i d B_{\mathrm{mid}} B mid on columns n − l n-l n − l and n + l n+l n + l . For some σ = ( σ l a b e l , σ e d g e ) ∈ S M ( 0 ) × S e d g e \sigma=(\sigma_{\mathrm{label}},\sigma_{\mathrm{edge}})\in S_M^{(0)}\times S_{\mathrm{edge}} σ = ( σ label , σ edge ) ∈ S M ( 0 ) × S edge , l ∈ [ 0 , M ] l\in[0,M] l ∈ [ 0 , M ] , l ′ ∈ { 0 , 1 } 2 n + 1 l'\in\{0,1\}^{2n+1} l ′ ∈ { 0 , 1 } 2 n + 1 and α ∈ C \alpha\in C α ∈ C , the welded trees oracle O σ ( w t ) O_{\sigma}^{(\mathrm{wt})} O σ ( wt ) is defined as
F σ ( w t ) ( l , α ) : = σ l a b e l ( Nb σ ( σ l a b e l − 1 ( l ) , α ) ) F_{\sigma}^{(\mathrm{wt})}(l,\alpha):=\sigma_{\mathrm{label}}\left(\operatorname{Nb}_{\sigma}\left(\sigma_{\mathrm{label}}^{-1}(l),\alpha\right)\right) F σ ( wt ) ( l , α ) := σ label ( Nb σ ( σ label − 1 ( l ) , α ) )
O σ ( w t ) ∣ l , α , l ′ ⟩ : = ∣ l , α , l ′ ⊕ F σ ( w t ) ( l , α ) ⟩ , (26) O_{\sigma}^{(\mathrm{wt})}|l,\alpha,l'\rangle:=|l,\alpha,l'\oplus F_{\sigma}^{(\mathrm{wt})}(l,\alpha)\rangle, \tag*{(26)} O σ ( wt ) ∣ l , α , l ′ ⟩ := ∣ l , α , l ′ ⊕ F σ ( wt ) ( l , α )⟩ , (26)
where the first and third registers store strings of 2 n + 1 2n+1 2 n + 1 bits. For l > M l>M l > M , all welded trees oracles act as the identity.
When it is obvious that σ \sigma σ is fixed, we will omit it from the notation and write F ( w t ) F^{(\mathrm{wt})} F ( wt ) and O ( w t ) O^{(\mathrm{wt})} O ( wt ) . We write D p r o d D_{\mathrm{prod}} D prod to denote the distribution over graphs obtained by uniformly sampling σ ∼ S M ( 0 ) × S e d g e \sigma\sim S_M^{(0)}\times S_{\mathrm{edge}} σ ∼ S M ( 0 ) × S edge . Notice that these graphs may contain more than one cycle over the weld edges. Letting S S S be the event that the weld edges form one cycle, we let D s i n g = D p r o d ∣ S D_{\mathrm{sing}}=D_{\mathrm{prod}}|_S D sing = D prod ∣ S . Unless specified otherwise, we are working with D p r o d D_{\mathrm{prod}} D prod . A visualization of the effect of σ e d g e \sigma_{\mathrm{edge}} σ edge may be found in Figure 3 .
Suppose a query algorithm A \mathcal{A} A has access to O ( w t ) O^{(\mathrm{wt})} O ( wt ) . The final pure and mixed states of the algorithm are
∣ ψ A , q ( O ( w t ) ) ⟩ A : = A q O σ ( w t ) A q − 1 … O σ ( w t ) A 0 ∣ 0 ⟩ A (27) |\psi_{A,q}^{(O^{(\mathrm{wt})})}\rangle_A:=A_qO_{\sigma}^{(\mathrm{wt})}A_{q-1}\ldots O_{\sigma}^{(\mathrm{wt})}A_0|0\rangle_A \tag*{(27)} ∣ ψ A , q ( O ( wt ) ) ⟩ A := A q O σ ( wt ) A q − 1 … O σ ( wt ) A 0 ∣0 ⟩ A (27)
ρ A ( O ( w t ) ) : = E σ l a b e l ∼ S M ( 0 ) σ e d g e ∼ S e d g e [ ρ ( ∣ ψ A , q ( O ( w t ) ) ⟩ ) ] . (28) \rho_A^{(O^{(\mathrm{wt})})}:=\mathbb{E}_{\substack{\sigma_{\mathrm{label}}\sim S_M^{(0)}\\\sigma_{\mathrm{edge}}\sim S_{\mathrm{edge}}}}\left[\rho\left(|\psi_{A,q}^{(O^{(\mathrm{wt})})}\rangle\right)\right]. \tag*{(28)} ρ A ( O ( wt ) ) := E σ label ∼ S M ( 0 ) σ edge ∼ S edge [ ρ ( ∣ ψ A , q ( O ( wt ) ) ⟩ ) ] . (28)
Write ∣ ψ A , q ( O ( w t ) ) ⟩ A P |\psi_{A,q}^{(O^{(\mathrm{wt})})}\rangle_{AP} ∣ ψ A , q ( O ( wt ) ) ⟩ A P for the purified version of ρ A ( O ( w t ) ) \rho_A^{(O^{(\mathrm{wt})})} ρ A ( O ( wt ) ) where P stores σ = ( σ l a b e l , σ e d g e ) \sigma=(\sigma_{\mathrm{label}},\sigma_{\mathrm{edge}}) σ = ( σ label , σ edge ) as in § 2.1 . The construction of O ( w t ) O^{(\mathrm{wt})} O ( wt ) provides us with the following observation.
Observation 3.3. Assume that n ≥ 16 n\ge16 n ≥ 16 . For every b ∈ B e d g e b\in B_{\mathrm{edge}} b ∈ B edge and every σ b : E b → E b \sigma_b:E_b\to E_b σ b : E b → E b ,
∣ E b ∣ ≥ N l 4 . |E_b|\ge\frac{N_l}{4}. ∣ E b ∣ ≥ 4 N l .
Proof. The smallest permutations occur at columns c = n − l c=n-l c = n − l and some color α ∈ C \alpha\in C α ∈ C . By Theorem 3.2 ,
∣ E t r , c , α ∣ ≥ N c , α ≥ ⌊ 2 n − l 3 ⌋ ≥ N l 4 . |E_{\mathrm{tr},c,\alpha}|\ge N_{c,\alpha}\ge\left\lfloor\frac{2^{n-l}}{3}\right\rfloor\ge\frac{N_l}{4}. ∣ E tr , c , α ∣ ≥ N c , α ≥ ⌊ 3 2 n − l ⌋ ≥ 4 N l .
Compressed welded trees oracle
In the following subsection, we construct the compressed welded trees oracle cpWT and prove its bounded growth property.
A label database is the partial injection L : [ M ] ⇀ [ M ] L:[M]\rightharpoonup[M] L : [ M ] ⇀ [ M ] . As with σ l a b e l \sigma_{\mathrm{label}} σ label , we use the convention L ( 0 ) = 0 L(0)=0 L ( 0 ) = 0 to fix the entrance vertex and do not count it in Dom ( L ) \operatorname{Dom}(L) Dom ( L ) . An edge (also called color) database C C C is a family of partial injections C = { C b } b ∈ B e d g e C=\{C_b\}_{b\in B_{\mathrm{edge}}} C = { C b } b ∈ B edge where each C b : E b ⇀ E b C_b:E_b\rightharpoonup E_b C b : E b ⇀ E b . We denote the cardinality of C C C by ∣ C ∣ = ∑ b ∣ C b ∣ |C|=\sum_b |C_b| ∣ C ∣ = ∑ b ∣ C b ∣ . We denote their respective registers by L and C. A pair of the label and color databases is denoted using I = ( L , C ) I=(L,C) I = ( L , C ) under the register I.
For e 1 , e 2 ∈ E b e_1,e_2\in E_b e 1 , e 2 ∈ E b , we write C [ e 1 → e 2 ] C[e_1\to e_2] C [ e 1 → e 2 ] to denote extending the injection C b C_b C b with e 1 → e 2 e_1\to e_2 e 1 → e 2 and keeping the rest of C C C the same. As each edge has a unique label b e d g e ( e ) \mathrm{b}_{\mathrm{edge}}(e) b edge ( e ) , we may omit the subscript b b b . Furthermore, C 1 ⪯ C 2 C_1\preceq C_2 C 1 ⪯ C 2 denotes that for all b ∈ B e d g e b\in B_{\mathrm{edge}} b ∈ B edge , C 1 , b ⪯ C 2 , b C_{1,b}\preceq C_{2,b} C 1 , b ⪯ C 2 , b .
Following the definition of F ( w t ) F^{(\mathrm{wt})} F ( wt ) in Eq. (26) , cpWT first unlabels using p l a b C i n v p^{C_{\mathrm{inv}}}_{\mathrm{lab}} p lab C inv (compression operator for σ l a b e l \sigma_{\mathrm{label}} σ label ), followed by moving between columns using p C e d g e p^{C_{\mathrm{edge}}} p C edge (compression operator for σ e d g e \sigma_{\mathrm{edge}} σ edge ) and finally relabels using p l a b C f o r p^{C_{\mathrm{for}}}_{\mathrm{lab}} p lab C for (compression operator for $\sigma_{\mathrm{label}}). All three operators perform the recording action. The query-input and query-output registers X and Y are written as ∣ l , α ⟩ X ∣ a ⟩ Y |l,\alpha\rangle_X|a\rangle_Y ∣ l , α ⟩ X ∣ a ⟩ Y where l ∈ [ 0 , M ] l\in[0,M] l ∈ [ 0 , M ] , a ∈ { 0 , 1 } 2 n + 1 a\in\{0,1\}^{2n+1} a ∈ { 0 , 1 } 2 n + 1 and α ∈ C \alpha\in C α ∈ C . The operator P XORs the label of the adjacent structural vertex into Y.
For a fixed partial edge database C C C , a structural index v ∈ [ 0 , M ] v\in[0,M] v ∈ [ 0 , M ] and a color α ∈ C \alpha\in C α ∈ C , let e = e α ( v ) e=e_\alpha(v) e = e α ( v ) and b = b e d g e ( e ) b=\mathrm{b}_{\mathrm{edge}}(e) b = b edge ( e ) . The partial neighbor map is defined as
N b C ( v , α ) : = { v if v ∉ V n or e = ⊥ , head ( e ) if b = ⊥ and v = tail ( e ) , tail ( e ) if b = ⊥ and v = head ( e ) , head ( C b ( e ) ) if b ∈ B e d g e , v = tail ( e ) and e ∈ Dom ( C b ) , tail ( C b − 1 ( e ) ) if b ∈ B e d g e , v = head ( e ) and e ∈ Im ( C b ) , ⊥ otherwise. (29) N_b^C(v,\alpha):=
\begin{cases}
v & \text{if }v\notin V_n\text{ or }e=\bot,\\
\operatorname{head}(e) & \text{if }b=\bot\text{ and }v=\operatorname{tail}(e),\\
\operatorname{tail}(e) & \text{if }b=\bot\text{ and }v=\operatorname{head}(e),\\
\operatorname{head}(C_b(e)) & \text{if }b\in B_{\mathrm{edge}},\ v=\operatorname{tail}(e)\text{ and }e\in\operatorname{Dom}(C_b),\\
\operatorname{tail}(C_b^{-1}(e)) & \text{if }b\in B_{\mathrm{edge}},\ v=\operatorname{head}(e)\text{ and }e\in\operatorname{Im}(C_b),\\
\bot& \text{otherwise.}
\end{cases} \tag*{(29)} N b C ( v , α ) := ⎩ ⎨ ⎧ v head ( e ) tail ( e ) head ( C b ( e )) tail ( C b − 1 ( e )) ⊥ if v ∈ / V n or e = ⊥ , if b = ⊥ and v = tail ( e ) , if b = ⊥ and v = head ( e ) , if b ∈ B edge , v = tail ( e ) and e ∈ Dom ( C b ) , if b ∈ B edge , v = head ( e ) and e ∈ Im ( C b ) , otherwise. (29)
Thus the map N b C N_b^C N b C uses C b C_b C b exactly as N b σ e d g e N_b^{\sigma_{\mathrm{edge}}} N b σ edge uses σ b \sigma_b σ b in Eq. (25) . Furthermore, notice that when N b C ( v , α ) ≠ ⊥ N_b^C(v,\alpha)\ne\bot N b C ( v , α ) = ⊥ , we have that N b C ( N b C ( v , α ) , α ) = v N_b^C(N_b^C(v,\alpha),\alpha)=v N b C ( N b C ( v , α ) , α ) = v .
Let us define the inverse-label compression operator p l a b C i n v p^{C_{\mathrm{inv}}}_{\mathrm{lab}} p lab C inv , which is essentially just an inverse call to the pC operator defined in Eq. (7) . Letting l ∈ [ M ] l\in[M] l ∈ [ M ] and L L L being some label database such that l ∉ Im ( L ) l\notin\operatorname{Im}(L) l ∈ / Im ( L ) ,
∣ + l , L i n v ⟩ : = 1 M − ∣ L ∣ ∑ v ∈ [ M ] ∖ Dom ( L ) ∣ L [ v → l ] ⟩ (30) |+^{\mathrm{inv}}_{l,L}\rangle:=\frac{1}{\sqrt{M-|L|}}\sum_{v\in[M]\setminus\operatorname{Dom}(L)}|L[v\to l]\rangle \tag*{(30)} ∣ + l , L inv ⟩ := M − ∣ L ∣ 1 v ∈ [ M ] ∖ Dom ( L ) ∑ ∣ L [ v → l ]⟩ (30)
p l , L C i n v : = pCF ( ∣ + l , L i n v ⟩ , ∣ L ⟩ ) p^{C_{\mathrm{inv}}}_{l,L}:=\operatorname{pCF}(|+^{\mathrm{inv}}_{l,L}\rangle,|L\rangle) p l , L C inv := pCF ( ∣ + l , L inv ⟩ , ∣ L ⟩)
p l C i n v : = ⨁ L : l ∉ Im ( L ) p l , L C i n v p^{C_{\mathrm{inv}}}_{l}:=\bigoplus_{L:l\notin\operatorname{Im}(L)}p^{C_{\mathrm{inv}}}_{l,L} p l C inv := L : l ∈ / Im ( L ) ⨁ p l , L C inv
p l a b C i n v ∣ l , α ⟩ X ∣ L ⟩ L : = { ∣ l , α ⟩ X ( p l C i n v ∣ L ⟩ L ) if l ∈ [ M ] , ∣ l , α ⟩ X ∣ L ⟩ L if l ∉ [ M ] . p^{C_{\mathrm{inv}}}_{\mathrm{lab}}|l,\alpha\rangle_X|L\rangle_L:=
\begin{cases}
|l,\alpha\rangle_X\left(p^{C_{\mathrm{inv}}}_{l}|L\rangle_L\right) & \text{if }l\in[M],\\
|l,\alpha\rangle_X|L\rangle_L & \text{if }l\notin[M].
\end{cases} p lab C inv ∣ l , α ⟩ X ∣ L ⟩ L := { ∣ l , α ⟩ X ( p l C inv ∣ L ⟩ L ) ∣ l , α ⟩ X ∣ L ⟩ L if l ∈ [ M ] , if l ∈ / [ M ] .
Next, we define the compressed edge-permutation operator. Fix b ∈ B e d g e b\in B_{\mathrm{edge}} b ∈ B edge and e ∈ E b e\in E_b e ∈ E b . For an edge database C C C , we define the following:
∣ + e , b , C → ⟩ : = 1 ∣ E b ∣ − ∣ C b ∣ ∑ e ′ ∈ E b ∖ Im ( C b ) ∣ C [ e → e ′ ] ⟩ (31) |+^{\to}_{e,b,C}\rangle:=\frac{1}{\sqrt{|E_b|-|C_b|}}\sum_{e'\in E_b\setminus\operatorname{Im}(C_b)}|C[e\to e']\rangle \tag*{(31)} ∣ + e , b , C → ⟩ := ∣ E b ∣ − ∣ C b ∣ 1 e ′ ∈ E b ∖ Im ( C b ) ∑ ∣ C [ e → e ′ ]⟩ (31)
p e , b C → : = ⨁ C : e ∉ Dom ( C b ) pCF ( ∣ + e , b , C → ⟩ , ∣ C ⟩ ) (32) p^{C_{\to}}_{e,b}:=\bigoplus_{C:e\notin\operatorname{Dom}(C_b)}\operatorname{pCF}(|+^{\to}_{e,b,C}\rangle,|C\rangle) \tag*{(32)} p e , b C → := C : e ∈ / Dom ( C b ) ⨁ pCF ( ∣ + e , b , C → ⟩ , ∣ C ⟩) (32)
∣ + e , b , C ← ⟩ : = 1 ∣ E b ∣ − ∣ C b ∣ ∑ e ′ ∈ E b ∖ Dom ( C b ) ∣ C [ e ′ → e ] ⟩ (33) |+^{\leftarrow}_{e,b,C}\rangle:=\frac{1}{\sqrt{|E_b|-|C_b|}}\sum_{e'\in E_b\setminus\operatorname{Dom}(C_b)}|C[e'\to e]\rangle \tag*{(33)} ∣ + e , b , C ← ⟩ := ∣ E b ∣ − ∣ C b ∣ 1 e ′ ∈ E b ∖ Dom ( C b ) ∑ ∣ C [ e ′ → e ]⟩ (33)
p e , b C ← : = ⨁ C : e ∉ Im ( C b ) pCF ( ∣ + e , b , C ← ⟩ , ∣ C ⟩ ) . (34) p^{C_{\leftarrow}}_{e,b}:=\bigoplus_{C:e\notin\operatorname{Im}(C_b)}\operatorname{pCF}(|+^{\leftarrow}_{e,b,C}\rangle,|C\rangle). \tag*{(34)} p e , b C ← := C : e ∈ / Im ( C b ) ⨁ pCF ( ∣ + e , b , C ← ⟩ , ∣ C ⟩) . (34)
For v ∈ [ 0 , M ] v \in[0,M] v ∈ [ 0 , M ] and α ∈ C \alpha\in\mathcal{C} α ∈ C , let e = e α ( v ) e=e_{\alpha}(v) e = e α ( v ) and b = b e d g e ( e ) b=b_{\mathrm{edge}}(e) b = b edge ( e ) . Define
p C v , α : = { p C e , b † if e ≠ ⊥ , b ∈ B e d g e and v = tail ( e ) , p C e , b † if e ≠ ⊥ , b ∈ B e d g e and v = head ( e ) , 1 otherwise. (35) p\mathrm{C}_{v,\alpha}:=\begin{cases}
p\mathrm{C}^{\dagger}_{e,b} & \text{if } e\ne\perp,\ b\in B_{\mathrm{edge}}\text{ and }v=\operatorname{tail}(e),\\
p\mathrm{C}^{\dagger}_{e,b} & \text{if } e\ne\perp,\ b\in B_{\mathrm{edge}}\text{ and }v=\operatorname{head}(e),\\
\mathbb{1} & \text{otherwise.}
\end{cases} \tag*{(35)} p C v , α := ⎩ ⎨ ⎧ p C e , b † p C e , b † 1 if e = ⊥ , b ∈ B edge and v = tail ( e ) , if e = ⊥ , b ∈ B edge and v = head ( e ) , otherwise. (35)
The controlled edge-compression operator is defined as
p C e d g e ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C : = { ∣ l , α ⟩ X ∣ L ⟩ L ( p C v , α ∣ C ⟩ C ) if l ∈ Im ( L ) and v = L − 1 ( l ) , ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C otherwise. (36) p\mathrm{C}_{\mathrm{edge}}|l,\alpha\rangle_{X}|L\rangle_{L}|C\rangle_{C}:=\begin{cases}
|l,\alpha\rangle_{X}|L\rangle_{L}(p\mathrm{C}_{v,\alpha}|C\rangle_{C}) & \text{if }l\in\operatorname{Im}(L)\text{ and }v=L^{-1}(l),\\
|l,\alpha\rangle_{X}|L\rangle_{L}|C\rangle_{C} & \text{otherwise.}
\end{cases} \tag*{(36)} p C edge ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C := { ∣ l , α ⟩ X ∣ L ⟩ L ( p C v , α ∣ C ⟩ C ) ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C if l ∈ Im ( L ) and v = L − 1 ( l ) , otherwise. (36)
The forward-label compression operator is defined using a partial map s F ( l , α , L , C ) \mathrm{sF}(l,\alpha,L,C) sF ( l , α , L , C ) ,
s F ( l , α , L , C ) : = { N b C ( L − 1 ( l ) , α ) if l ∈ Im ( L ) ∪ { 0 } , ⊥ if l ∉ Im ( L ) ∪ { 0 } . (37) \mathrm{sF}(l,\alpha,L,C):=\begin{cases}
\mathrm{Nb}_{C}(L^{-1}(l),\alpha) & \text{if }l\in\operatorname{Im}(L)\cup\{0\},\\
\perp& \text{if }l\notin\operatorname{Im}(L)\cup\{0\}.
\end{cases} \tag*{(37)} sF ( l , α , L , C ) := { Nb C ( L − 1 ( l ) , α ) ⊥ if l ∈ Im ( L ) ∪ { 0 } , if l ∈ / Im ( L ) ∪ { 0 } . (37)
p C w f o r : = ⨂ L : w ∉ Dom ( L ) p C w , L (38) p\mathrm{C}^{\mathrm{for}}_{w}:=\bigotimes_{L:w\notin\operatorname{Dom}(L)}p\mathrm{C}_{w,L} \tag*{(38)} p C w for := L : w ∈ / Dom ( L ) ⨂ p C w , L (38)
p C l a b f o r ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C : = { ∣ l , α ⟩ X ( p C w f o r ∣ L ⟩ L ) ∣ C ⟩ C if w = s F ( l , α , L , C ) ∉ { ⊥ , L − 1 ( l ) , 0 } , ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C if w ∈ { ⊥ , L − 1 ( l ) , 0 } . (39) p\mathrm{C}^{\mathrm{for}}_{\mathrm{lab}}|l,\alpha\rangle_{X}|L\rangle_{L}|C\rangle_{C}:=\begin{cases}
|l,\alpha\rangle_{X}(p\mathrm{C}^{\mathrm{for}}_{w}|L\rangle_{L})|C\rangle_{C} & \text{if }w=\mathrm{sF}(l,\alpha,L,C)\notin\{\perp,L^{-1}(l),0\},\\
|l,\alpha\rangle_{X}|L\rangle_{L}|C\rangle_{C} & \text{if }w\in\{\perp,L^{-1}(l),0\}.
\end{cases} \tag*{(39)} p C lab for ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C := { ∣ l , α ⟩ X ( p C w for ∣ L ⟩ L ) ∣ C ⟩ C ∣ l , α ⟩ X ∣ L ⟩ L ∣ C ⟩ C if w = sF ( l , α , L , C ) ∈ / { ⊥ , L − 1 ( l ) , 0 } , if w ∈ { ⊥ , L − 1 ( l ) , 0 } . (39)
Note that we are using the definition of p C x , I p\mathrm{C}_{x,I} p C x , I from Eq. (4) . Finally, we define the XOR operator P \mathrm{P} P as
P ∣ l , α ⟩ X ∣ a ⟩ Y ∣ L , C ⟩ I : = { ∣ l , α ⟩ X ∣ a ⊕ L ( w ) ⟩ Y ∣ L , C ⟩ I if w = s F ( l , α , L , C ) ∈ Dom ( L ) ∪ { 0 } , ∣ l , α ⟩ X ∣ a ⟩ Y ∣ L , C ⟩ I otherwise. \mathrm{P}|l,\alpha\rangle_{X}|a\rangle_{Y}|L,C\rangle_{I}:=\begin{cases}
|l,\alpha\rangle_{X}|a\oplus L(w)\rangle_{Y}|L,C\rangle_{I} & \text{if }w=\mathrm{sF}(l,\alpha,L,C)\in\operatorname{Dom}(L)\cup\{0\},\\
|l,\alpha\rangle_{X}|a\rangle_{Y}|L,C\rangle_{I} & \text{otherwise.}
\end{cases} P ∣ l , α ⟩ X ∣ a ⟩ Y ∣ L , C ⟩ I := { ∣ l , α ⟩ X ∣ a ⊕ L ( w ) ⟩ Y ∣ L , C ⟩ I ∣ l , α ⟩ X ∣ a ⟩ Y ∣ L , C ⟩ I if w = sF ( l , α , L , C ) ∈ Dom ( L ) ∪ { 0 } , otherwise.
Therefore, we may define the ordinary compressed oracle.
Definition 3.4 (Compressed Welded Trees Oracle). Let I = ( L , C ) I=(L,C) I = ( L , C ) be the injective database registers, which are initialized as ∣ ⊥ ⟩ I |\perp\rangle_{I} ∣ ⊥ ⟩ I . The ordinary compressed welded trees oracle cpWT is defined as
c p W T : = p C l a b i n v ⋅ p C e d g e ⋅ p C l a b f o r ⋅ P ⋅ p C f o r ⋅ p C e d g e † ⋅ p C i n v † . (40) \mathrm{cpWT}:=p\mathrm{C}_{\mathrm{lab}}^{\mathrm{inv}}\cdot p\mathrm{C}_{\mathrm{edge}}\cdot p\mathrm{C}_{\mathrm{lab}}^{\mathrm{for}}\cdot\mathrm{P}\cdot p\mathrm{C}_{\mathrm{for}}\cdot p\mathrm{C}_{\mathrm{edge}}^{\dagger}\cdot p\mathrm{C}_{\mathrm{inv}}^{\dagger}. \tag*{(40)} cpWT := p C lab inv ⋅ p C edge ⋅ p C lab for ⋅ P ⋅ p C for ⋅ p C edge † ⋅ p C inv † . (40)
The final mixed and pure state of some q q q -query algorithm A \mathcal{A} A using cpWT is denoted by,
∣ ψ A , q ( c p W T ) ⟩ : = A q , A c p W T A I A q − 1 , A ⋯ c p W T A I A 0 , A ∣ 0 ⟩ A ∣ ⊥ ⟩ I , |\psi_{\mathcal{A},q}^{(\mathrm{cpWT})}\rangle:=A_{q,A}\mathrm{cpWT}_{A_I}A_{q-1,A}\cdots\mathrm{cpWT}_{A_I}A_{0,A}|0\rangle_{A}|\perp\rangle_{I}, ∣ ψ A , q ( cpWT ) ⟩ := A q , A cpWT A I A q − 1 , A ⋯ cpWT A I A 0 , A ∣0 ⟩ A ∣ ⊥ ⟩ I ,
ρ A , q ( c p W T ) : = Tr I [ ρ ( ∣ ψ A , q ( c p W T ) ⟩ ) ] . \rho_{\mathcal{A},q}^{(\mathrm{cpWT})}:=\operatorname{Tr}_{I}\left[\rho\left(|\psi_{\mathcal{A},q}^{(\mathrm{cpWT})}\rangle\right)\right]. ρ A , q ( cpWT ) := Tr I [ ρ ( ∣ ψ A , q ( cpWT ) ⟩ ) ] .
However, the oracle cpWT is only an approximate purification of O ( w t ) O^{(\mathrm{wt})} O ( wt ) . We will also use the oracle cpWT on the same database registers that represent O ( w t ) O^{(\mathrm{wt})} O ( wt ) exactly. To define it, we will use the intermediate oracle O ∘ w t O_{\circ}^{\mathrm{wt}} O ∘ wt that writes out its computation between each step of evaluating each permutation. Let Z Z Z be the intermediate computation register. Assume that the queried input is ∣ l , α ⟩ |l,\alpha\rangle ∣ l , α ⟩ . The oracle O ∘ w t O_{\circ}^{\mathrm{wt}} O ∘ wt acts in the following way.
Write into Z Z Z the inverse label v = σ l a b e l − 1 ( l ) v=\sigma_{\mathrm{label}}^{-1}(l) v = σ label − 1 ( l ) .
Let e = e α ( v ) e=e_{\alpha}(v) e = e α ( v ) . If e ≠ ⊥ e\ne\perp e = ⊥ and b = b e d g e ( e ) ∈ B e d g e b=b_{\mathrm{edge}}(e)\in B_{\mathrm{edge}} b = b edge ( e ) ∈ B edge , write f f f into Z Z Z , where
f = { σ b ( e ) if v = tail ( e ) , σ b − 1 ( e ) if v = head ( e ) . f=\begin{cases}
\sigma_{b}(e) & \text{if }v=\operatorname{tail}(e),\\
\sigma_{b}^{-1}(e) & \text{if }v=\operatorname{head}(e).
\end{cases} f = { σ b ( e ) σ b − 1 ( e ) if v = tail ( e ) , if v = head ( e ) .
Otherwise, set f = ⊥ f=\perp f =⊥ . We encode ⊥ \perp ⊥ by 0 0 0 and all valid edge indices by nonzero strings.
Let w = N b σ e d g e ( v , α ) w=\mathrm{Nb}_{\sigma_{\mathrm{edge}}}(v,\alpha) w = Nb σ edge ( v , α ) be the corresponding neighbor of v v v , which is a function of ( v , α , f ) (v,\alpha,f) ( v , α , f ) .
XOR σ l a b e l ( w ) \sigma_{\mathrm{label}}(w) σ label ( w ) with the output Y.
Uncompute f f f and then uncompute v v v .
We use the following conventions, also in the compressed version below. When l = 0 l = 0 l = 0 , skip the inverse-label calls and set v = 0 v = 0 v = 0 . Otherwise, if l ≠ 0 l \ne0 l = 0 and v = 0 v = 0 v = 0 , skip the middle computation and only uncompute v v v . If an edge-permutation query returns f = ⊥ f = \bot f = ⊥ , set w = ⊥ w = \bot w = ⊥ and skip the forward-label step. When w = v w = v w = v , XOR the original label l l l directly, otherwise when w = 0 w = 0 w = 0 , do nothing. Invalid structural vertices and missing colors have w = v w = v w = v , and invalid edge-work values are treated as f = ⊥ f = \bot f = ⊥ . These conventions preserve the action of O ( w t ) O^{(\mathrm{wt})} O ( wt ) , since genuine permutation queries are always defined and σ l a b e l ( v ) = l \sigma_{\mathrm{label}}(v) = l σ label ( v ) = l .
Therefore, the computation can be viewed as invoking the following permutations as oracles:
σ l a b e l − 1 ⋅ σ b ⋅ σ l a b e l ⋅ σ b ⋅ σ l a b e l − 1 . \sigma_{\mathrm{label}}^{-1} \cdot\sigma_b \cdot\sigma_{\mathrm{label}} \cdot\sigma_b \cdot\sigma_{\mathrm{label}}^{-1}. σ label − 1 ⋅ σ b ⋅ σ label ⋅ σ b ⋅ σ label − 1 .
Observation 3.5. Running the oracle O ∘ w t O_{\circ}^{\mathrm{wt}} O ∘ wt with the intermediate register ∣ 0 , 0 ⟩ Z \lvert0,0\rangle_Z ∣ 0 , 0 ⟩ Z returns it to ∣ 0 , 0 ⟩ Z \lvert0,0\rangle_Z ∣ 0 , 0 ⟩ Z and behaves like O ( w t ) O^{(\mathrm{wt})} O ( wt ) .
Proof. Conditioned on some query register ∣ l , α , a ⟩ X Y \lvert l,\alpha,a\rangle_{XY} ∣ l , α , a ⟩ X Y , O ∘ w t O_{\circ}^{\mathrm{wt}} O ∘ wt acts as
∣ l , α , a ⟩ X Y ∣ 0 , 0 ⟩ Z → σ l a b e l − 1 ∣ l , α , a ⟩ X Y ∣ v , 0 ⟩ Z → σ b ∣ l , α , a ⟩ X Y ∣ v , f ⟩ Z → σ l a b e l ∣ l , α , a ⊕ σ l a b e l ( w ) ⟩ X Y ∣ v , f ⟩ Z → σ b ∣ l , α , a ⊕ σ l a b e l ( w ) ⟩ X Y ∣ v , 0 ⟩ Z → σ l a b e l − 1 ∣ l , α , a ⊕ σ l a b e l ( w ) ⟩ X Y ∣ 0 , 0 ⟩ Z = ( O σ ( w t ) ∣ l , α , a ⟩ X Y ) ∣ 0 , 0 ⟩ Z . \begin{aligned}
\lvert l,\alpha,a\rangle_{XY}\lvert0,0\rangle_Z
&\xrightarrow{\sigma_{\mathrm{label}}^{-1}} \lvert l,\alpha,a\rangle_{XY}\lvert v,0\rangle_Z \\
&\xrightarrow{\sigma_b} \lvert l,\alpha,a\rangle_{XY}\lvert v,f\rangle_Z \\
&\xrightarrow{\sigma_{\mathrm{label}}} \lvert l,\alpha,a\mathbin{\oplus}\sigma_{\mathrm{label}}(w)\rangle_{XY}\lvert v,f\rangle_Z \\
&\xrightarrow{\sigma_b} \lvert l,\alpha,a\mathbin{\oplus}\sigma_{\mathrm{label}}(w)\rangle_{XY}\lvert v,0\rangle_Z \\
&\xrightarrow{\sigma_{\mathrm{label}}^{-1}} \lvert l,\alpha,a\mathbin{\oplus}\sigma_{\mathrm{label}}(w)\rangle_{XY}\lvert0,0\rangle_Z \\
&= \left(O^{(\mathrm{wt})}_{\sigma}\lvert l,\alpha,a\rangle_{XY}\right)\lvert0,0\rangle_Z.
\end{aligned} ∣ l , α , a ⟩ X Y ∣ 0 , 0 ⟩ Z σ label − 1 ∣ l , α , a ⟩ X Y ∣ v , 0 ⟩ Z σ b ∣ l , α , a ⟩ X Y ∣ v , f ⟩ Z σ label ∣ l , α , a ⊕ σ label ( w ) ⟩ X Y ∣ v , f ⟩ Z σ b ∣ l , α , a ⊕ σ label ( w ) ⟩ X Y ∣ v , 0 ⟩ Z σ label − 1 ∣ l , α , a ⊕ σ label ( w ) ⟩ X Y ∣ 0 , 0 ⟩ Z = ( O σ ( wt ) ∣ l , α , a ⟩ X Y ) ∣ 0 , 0 ⟩ Z .
We let c p W T ∘ \mathrm{cpWT}_{\circ} cpWT ∘ be the compressed version of O ∘ w t O_{\circ}^{\mathrm{wt}} O ∘ wt ,
c p W T ∘ : = c p O l a b i n v ⋅ c p O e d g e ⋅ c p O l a b f o r ⋅ c p O e d g e ⋅ c p O l a b i n v . \mathrm{cpWT}_{\circ} := \mathrm{cpO}_{\mathrm{lab}}^{\mathrm{inv}} \cdot\mathrm{cpO}_{\mathrm{edge}} \cdot\mathrm{cpO}_{\mathrm{lab}}^{\mathrm{for}} \cdot\mathrm{cpO}_{\mathrm{edge}} \cdot\mathrm{cpO}_{\mathrm{lab}}^{\mathrm{inv}}. cpWT ∘ := cpO lab inv ⋅ cpO edge ⋅ cpO lab for ⋅ cpO edge ⋅ cpO lab inv .
Here c p O e d g e = p C v , α ′ ⋅ P e d g e ⋅ p C v , α ′ \mathrm{cpO}_{\mathrm{edge}} = pC'_{v,\alpha} \cdot P_{\mathrm{edge}} \cdot pC'_{v,\alpha} cpO edge = p C v , α ′ ⋅ P edge ⋅ p C v , α ′ . For e = e α ( v ) e = e_{\alpha}(v) e = e α ( v ) and b = b e d g e ( e ) ∈ B e d g e b = b_{\mathrm{edge}}(e) \in B_{\mathrm{edge}} b = b edge ( e ) ∈ B edge , the operator P e d g e P_{\mathrm{edge}} P edge XORs C b ( e ) C_b(e) C b ( e ) into the edge subregister of Z Z Z when v = tail ( e ) v = \operatorname{tail}(e) v = tail ( e ) , and C b − 1 ( e ) C_b^{-1}(e) C b − 1 ( e ) when v = head ( e ) v = \operatorname{head}(e) v = head ( e ) . It acts as the identity if b = ⊥ b = \bot b = ⊥ or the requested database entry is absent. Note that as we are using compression operators, it is possible that the queries are not perfectly uncomputed.
Definition 3.6 (Exact Compressed Welded Trees Oracle). Let c p W T ^ ∘ \widehat{\mathrm{cpWT}}_{\circ} cpWT ∘ be c p W T ∘ \mathrm{cpWT}_{\circ} cpWT ∘ where each permutation query is replaced by its exact database query from Theorem 2.8 and I Z I_Z I Z be the isometry such that for any state ∣ ψ ⟩ \lvert\psi\rangle ∣ ψ ⟩ , I Z ∣ ψ ⟩ = ∣ ψ ⟩ ∣ 0 , 0 ⟩ Z I_Z\lvert\psi\rangle= \lvert\psi\rangle\lvert0,0\rangle_Z I Z ∣ ψ ⟩ = ∣ ψ ⟩ ∣ 0 , 0 ⟩ Z . The exact compressed welded trees oracle is
c p W T ^ : = I Z † ⋅ c p W T ^ ∘ ⋅ I Z . \widehat{\mathrm{cpWT}} := I_Z^\dagger\cdot\widehat{\mathrm{cpWT}}_{\circ} \cdot I_Z. cpWT := I Z † ⋅ cpWT ∘ ⋅ I Z .
Furthermore, we let I P I_P I P be the product of isometries from Eq. (12) over the label and edge permutations,
I P : = I M ⊗ ⨂ b ∈ B e d g e I ∣ E b ∣ . (41) I_P := I_M \otimes\bigotimes_{b \in B_{\mathrm{edge}}} I_{\lvert E_b\rvert}. \tag*{(41)} I P := I M ⊗ b ∈ B edge ⨂ I ∣ E b ∣ . (41)
Notice that I P I_P I P acts as the identity on the algorithm registers and maps the uniform initial permutation state to the empty database ∣ ⊥ ⟩ \lvert\bot\rangle ∣ ⊥ ⟩ .
Observation 3.7. The oracle c p W T ^ \widehat{\mathrm{cpWT}} cpWT represents O ( w t ) O^{(\mathrm{wt})} O ( wt ) exactly, i.e.,
c p W T ^ I P = I P O ( w t ) . (42) \widehat{\mathrm{cpWT}} I_P = I_P O^{(\mathrm{wt})}. \tag*{(42)} cpWT I P = I P O ( wt ) . (42) Furthermore, the final state of a q q q -query algorithm using c p W T ^ \widehat{\mathrm{cpWT}} cpWT is supported on databases ( L , C ) (L,C) ( L , C ) such that ∣ L ∣ ≤ 2 q \lvert L\rvert\le2q ∣ L ∣ ≤ 2 q and ∣ C ∣ ≤ q \lvert C\rvert\le q ∣ C ∣ ≤ q .
Proof. By Theorem 3.5, we may implement O ( w t ) O^{(\mathrm{wt})} O ( wt ) using O ^ w t \widehat{O}^{\mathrm{wt}} O wt , as it always returns the work register to ∣ 0 , 0 ⟩ Z |0,0\rangle_{\mathrm{Z}} ∣0 , 0 ⟩ Z . By Theorem 2.8, each exact query satisfies c p O ^ X I S = I S O X \mathrm{cp}\widehat{O}_{\mathrm{X}}\mathcal{I}_{\mathrm{S}}=\mathcal{I}_{\mathrm{S}}O_{\mathrm{X}} cp O X I S = I S O X and I P \mathcal{I}_{\mathrm{P}} I P does not alter the register Z. Hence we may move I P \mathcal{I}_{\mathrm{P}} I P through the 5 queries, so
c p W T ^ ∘ I Z I P = I Z I P O ( w t ) . \mathrm{cp}\widehat{\mathrm{WT}}_{\circ}\mathcal{I}_{\mathrm{Z}}\mathcal{I}_{\mathrm{P}}=\mathcal{I}_{\mathrm{Z}}\mathcal{I}_{\mathrm{P}}O^{(\mathrm{wt})}. cp WT ∘ I Z I P = I Z I P O ( wt ) .
Applying I Z † \mathcal{I}_{\mathrm{Z}}^{\dagger} I Z † gives Eq. (42) . Next, let us bound ∣ L ∣ |L| ∣ L ∣ and ∣ C ∣ |C| ∣ C ∣ . Fix some input ∣ l , α ⟩ |l,\alpha\rangle ∣ l , α ⟩ . Notice that repeated oracle calls in O ∘ w t O^{\mathrm{wt}}_{\circ} O ∘ wt (inverse label and edge) are conditioned on the same value, so they affect the same register in the database. By Theorem 2.7, each query raises the label level by at most 2 and edge level by at most 1. As the initial permutation has level 0, Eqs. (13) and (42) give ∣ L ∣ ≤ 2 q |L|\leq2q ∣ L ∣ ≤ 2 q and ∣ C ∣ ≤ q |C|\leq q ∣ C ∣ ≤ q .
Bridge between standard and compressed oracles
In the following subsection, we will bridge O ( w t ) O^{(\mathrm{wt})} O ( wt ) , c p W T \mathrm{cpWT} cpWT and c p W T \mathrm{cpWT} cpWT . Specifically, Theorem 3.8 characterizes the exact difference between c p W T \mathrm{cpWT} cpWT and c p W T \mathrm{cpWT} cpWT , while Theorem 3.12 shows the relationship between recording a path using c p W T \mathrm{cpWT} cpWT and solving the pathfinding problem.
For some edge class b b b , define the vertex class V c l a s s ( b ) V_{\mathrm{class}}(b) V class ( b ) and valid edge projector Π b s r c \Pi^{\mathrm{src}}_{b} Π b src as
V c l a s s ( b ) = { tail ( e ) , head ( e ) : e ∈ E b } , V_{\mathrm{class}}(b)=\{\operatorname{tail}(e),\operatorname{head}(e):e\in E_b\}, V class ( b ) = { tail ( e ) , head ( e ) : e ∈ E b } ,
Π b s r c ∣ l , α , a , I ⟩ X Y I = 1 [ l ≠ 0 , l ∈ Im ( L ) , e α ( L − 1 ( l ) ) ∈ E b ] ∣ l , α , a , I ⟩ X Y I . \Pi^{\mathrm{src}}_{b}|l,\alpha,a,I\rangle_{\mathrm{XYI}}=\mathbf{1}[l\ne0,l\in\operatorname{Im}(L),e_{\alpha}(L^{-1}(l))\in E_b]|l,\alpha,a,I\rangle_{\mathrm{XYI}}. Π b src ∣ l , α , a , I ⟩ XYI = 1 [ l = 0 , l ∈ Im ( L ) , e α ( L − 1 ( l )) ∈ E b ] ∣ l , α , a , I ⟩ XYI .
Notice that ∣ V c l a s s ( b ) ∣ = 2 ∣ E b ∣ |V_{\mathrm{class}}(b)|=2|E_b| ∣ V class ( b ) ∣ = 2∣ E b ∣ and Π b s r c \Pi^{\mathrm{src}}_{b} Π b src tests whether the recorded vertex has its queried edge in E b E_b E b . Letting t t t be the bound on ∣ L ∣ + ∣ C ∣ |L|+|C| ∣ L ∣ + ∣ C ∣ and t ′ = t + 6 t'=t+6 t ′ = t + 6 , assume that N l ≥ C ( t + 1 ) N_l\geq C(t+1) N l ≥ C ( t + 1 ) for a constant C C C large enough that 4 ( t + 16 ) ≤ ∣ E b ∣ 4(t+16)\leq|E_b| 4 ( t + 16 ) ≤ ∣ E b ∣ for all permuted edge classes b ∈ B e d g e b\in B_{\mathrm{edge}} b ∈ B edge (by Theorem 3.3) and 4 ( t + 16 ) ≤ M 4(t+16)\leq M 4 ( t + 16 ) ≤ M . Lastly, for a database I = ( I b , I ¬ b ) I=(I_b,I_{\neg b}) I = ( I b , I ¬ b ) , we use I b I_b I b to denote C b C_b C b and the label records at vertices in V c l a s s ( b ) V_{\mathrm{class}}(b) V class ( b ) , while I ¬ b I_{\neg b} I ¬ b is the rest of the database.
Lemma 3.8. For each b ∈ B e d g e b\in B_{\mathrm{edge}} b ∈ B edge , there exist self-adjoint operators T b d i f f T_b^{\mathrm{diff}} T b diff that change the number of records by at most 3, T b d i f f = Π b s r c T b d i f f Π b s r c T_b^{\mathrm{diff}}=\Pi_b^{\mathrm{src}}T_b^{\mathrm{diff}}\Pi_b^{\mathrm{src}} T b diff = Π b src T b diff Π b src , ∥ T b d i f f Π ≤ t , I ∥ ≤ C ∣ E b ∣ − 1 / 2 \|T_b^{\mathrm{diff}}\Pi_{\leq t,I}\|\leq C|E_b|^{-1/2} ∥ T b diff Π ≤ t , I ∥ ≤ C ∣ E b ∣ − 1/2 and,
( c p W T ^ ∘ − c p W T ∘ − p C l a b i n v ( ∑ b T b d i f f ) p C l a b i n v ) Π ≤ t , I = E r r t , (43) \left(\widehat{\mathrm{cpWT}}_{\circ}-\mathrm{cpWT}_{\circ}-\mathrm{p}C_{\mathrm{lab}}^{\mathrm{inv}}\left(\sum_b T_b^{\mathrm{diff}}\right)\mathrm{p}C_{\mathrm{lab}}^{\mathrm{inv}}\right)\Pi_{\leq t,I}=\mathrm{Err}_t, \tag*{(43)} ( cpWT ∘ − cpWT ∘ − p C lab inv ( b ∑ T b diff ) p C lab inv ) Π ≤ t , I = Err t , (43) where ∥ E r r t ∥ ≤ C / N \|\mathrm{Err}_t\|\leq C/N ∥ Err t ∥ ≤ C / N . Furthermore, T b d i f f T_b^{\mathrm{diff}} T b diff is such that the inner product ⟨ a ′ , J ∣ T b d i f f ∣ a , I ⟩ \langle a',J|T_b^{\mathrm{diff}}|a,I\rangle ⟨ a ′ , J ∣ T b diff ∣ a , I ⟩ is 0 when J ¬ b ≠ I ¬ b J_{\neg b}\ne I_{\neg b} J ¬ b = I ¬ b and otherwise solely depends on a , a ′ , I b , J b a,a',I_b,J_b a , a ′ , I b , J b and the labels used and number of labels in I I I outside of b b b .
Proof. Let ∣ ψ ⟩ |\psi\rangle ∣ ψ ⟩ be such that Π ≤ t , I ∣ ψ ⟩ = ∣ ψ ⟩ \Pi_{\leq t,I}|\psi\rangle=|\psi\rangle Π ≤ t , I ∣ ψ ⟩ = ∣ ψ ⟩ . As each operator fixes the query register X, we may fix some query l , α l,\alpha l , α . Suppose l ≠ 0 l\ne0 l = 0 as at l = 0 l=0 l = 0 no edges are permuted so only the forward-label replacement is necessary. First, replace the exact label queries in c p W T ∘ \mathrm{cpWT}_{\circ} cpWT ∘ by their compressed versions c p O \mathrm{cpO} cpO . By Theorem 2.8, this introduces the error E r r l a b \mathrm{Err}_{\mathrm{lab}} Err lab with ∥ E r r l a b Π ≤ t , I ∥ = O ( M − 1 / 2 ) = O ( 1 / N ) \|\mathrm{Err}_{\mathrm{lab}}\Pi_{\leq t,I}\|=O(M^{-1/2})=O(1/N) ∥ Err lab Π ≤ t , I ∥ = O ( M − 1/2 ) = O ( 1/ N ) . Hence we may expand c p O l a b i n v \mathrm{cpO}^{\mathrm{inv}}_{\mathrm{lab}} cpO lab inv in c p W T ∘ \mathrm{cpWT}_{\circ} cpWT ∘ as
c p W T ^ ∘ = p C l a b , l i n v p L l a b , l i n v ( c p O ^ e d g e ⋅ c p O l a b f o r ⋅ c p O ^ e d g e ) p L l a b , l i n v p C l a b , l i n v + E r r l a b . \widehat{\mathrm{cpWT}}_{\circ}=\mathrm{p}C_{\mathrm{lab},l}^{\mathrm{inv}}\mathrm{p}L_{\mathrm{lab},l}^{\mathrm{inv}}\left(\widehat{\mathrm{cpO}}_{\mathrm{edge}}\cdot\mathrm{cpO}_{\mathrm{lab}}^{\mathrm{for}}\cdot\widehat{\mathrm{cpO}}_{\mathrm{edge}}\right)\mathrm{p}L_{\mathrm{lab},l}^{\mathrm{inv}}\mathrm{p}C_{\mathrm{lab},l}^{\mathrm{inv}}+\mathrm{Err}_{\mathrm{lab}}. cpWT ∘ = p C lab , l inv p L lab , l inv ( cpO edge ⋅ cpO lab for ⋅ cpO edge ) p L lab , l inv p C lab , l inv + Err lab .
Let
c p W T ^ ∘ ( 1 ) : = p C l a b , l i n v p L l a b , l i n v ( c p O ^ e d g e ⋅ c p O l a b f o r ⋅ c p O ^ e d g e ) p L l a b , l i n v p C l a b , l i n v , (44) \widehat{\mathrm{cpWT}}_{\circ}^{(1)}:=\mathrm{p}C_{\mathrm{lab},l}^{\mathrm{inv}}\mathrm{p}L_{\mathrm{lab},l}^{\mathrm{inv}}\left(\widehat{\mathrm{cpO}}_{\mathrm{edge}}\cdot\mathrm{cpO}_{\mathrm{lab}}^{\mathrm{for}}\cdot\widehat{\mathrm{cpO}}_{\mathrm{edge}}\right)\mathrm{p}L_{\mathrm{lab},l}^{\mathrm{inv}}\mathrm{p}C_{\mathrm{lab},l}^{\mathrm{inv}}, \tag*{(44)} cpWT ∘ ( 1 ) := p C lab , l inv p L lab , l inv ( cpO edge ⋅ cpO lab for ⋅ cpO edge ) p L lab , l inv p C lab , l inv , (44)
which is just removing the intermediate p C l a b , l i n v \mathrm{p}C_{\mathrm{lab},l}^{\mathrm{inv}} p C lab , l inv calls after XORing. Let ∣ ϕ ⟩ = p L l a b p C l a b , l i n v ∣ ψ ⟩ ∣ 0 ⟩ Z |\phi\rangle=\mathrm{p}L_{\mathrm{lab}}\mathrm{p}C_{\mathrm{lab},l}^{\mathrm{inv}}|\psi\rangle|0\rangle_{\mathrm{Z}} ∣ ϕ ⟩ = p L lab p C lab , l inv ∣ ψ ⟩ ∣0 ⟩ Z be the state immediately after the first XOR. In the case that v = 0 v=0 v = 0 (equivalently, l ∉ Im ( L ) l\notin\operatorname{Im}(L) l ∈ / Im ( L ) , since l ≠ 0 l\ne0 l = 0 and 0 ∉ Dom ( L ) 0\notin\operatorname{Dom}(L) 0 ∈ / Dom ( L ) ), the middle computation is the identity, so the compression operators perfectly cancel out. Otherwise, the register Z records that L ( v ) = l L(v)=l L ( v ) = l and this does not change until the last XOR operator. Therefore Theorem 2.6 applies to both before and after the computation between the XORs. As the label database increases by at most 2, by the triangle inequality we have,
∥ ( c p W T ^ ∘ − c p W T ^ ∘ ( 1 ) ) ∣ ψ ⟩ ∣ 0 ⟩ Z ∥ ≤ ∥ E r r l a b ∣ ψ ⟩ ∣ 0 ⟩ Z ∥ + ∥ ( p C l a b , l i n v − 1 ) Π v ≠ 0 ∣ ϕ ⟩ ∥ . + ∥ ( p ^ l a b , l C i n v − 1 ) ( c p O ^ e d g e ⋅ c p O l a b f o r ⋅ c p O ^ e d g e ) Π v ≠ 0 ∣ ϕ ⟩ ∥ ≤ 2 2 M − t − 1 ∥ ψ ∥ + O ( 1 / N ) ∥ ψ ∥ = O ( 1 / N ) ∥ ψ ∥ . \begin{aligned}
\left\|\left(\widehat{\mathrm{cpWT}}_{\circ}-\widehat{\mathrm{cpWT}}_{\circ}^{(1)}\right)|\psi\rangle|0\rangle_{\mathrm{Z}}\right\|\leq\|\mathrm{Err}_{\mathrm{lab}}|\psi\rangle|0\rangle_{\mathrm{Z}}\|+\|(\mathrm{p}C_{\mathrm{lab},l}^{\mathrm{inv}}-\mathbb{1})\Pi_{v\ne0}|\phi\rangle\|. \\
&+\left\|\left(\widehat{p}^{\mathrm{Cinv}}_{\mathrm{lab},l}-1\right)\left(\widehat{\mathrm{cpO}}_{\mathrm{edge}}\cdot\mathrm{cpO}^{\mathrm{for}}_{\mathrm{lab}}\cdot\widehat{\mathrm{cpO}}_{\mathrm{edge}}\right)\Pi_{v\ne0}|\phi\rangle\right\|
\le2\sqrt{\frac{2}{M-t-1}}\|\psi\|+O(1/N)\|\psi\|=O(1/N)\|\psi\|.
\end{aligned} ( cpWT ∘ − cpWT ∘ ( 1 ) ) ∣ ψ ⟩ ∣0 ⟩ Z ≤ ∥ Err lab ∣ ψ ⟩ ∣0 ⟩ Z ∥ + ∥ ( p C lab , l inv − 1 ) Π v = 0 ∣ ϕ ⟩ ∥. + ( p lab , l Cinv − 1 ) ( cpO edge ⋅ cpO lab for ⋅ cpO edge ) Π v = 0 ∣ ϕ ⟩ ≤ 2 M − t − 1 2 ∥ ψ ∥ + O ( 1/ N ) ∥ ψ ∥ = O ( 1/ N ) ∥ ψ ∥.
(By Theorem 2.6)
The same argument applies to the two edge queries around the forward-label query. Recall the edge-compression operator p C v , α ′ \mathrm{pC}^{\prime}_{v,\alpha} pC v , α ′ , which is the identity when the edge is not permuted. By Theorem 2.8, replacing the exact edge queries of class b b b by ordinary compressed ones costs at most 2 C ∣ E b ∣ − 1 / 2 2C|E_b|^{-1/2} 2 C ∣ E b ∣ − 1/2 . If f = ⊥ f=\perp f =⊥ , the compressions cancel out. Otherwise, the register Z Z Z keeps the queried edge assignment until it is uncomputed and Theorem 2.6 bounds the inner compression. Hence,
∥ ( c p O ^ e d g e ⋅ c p O l a b f o r ⋅ c p O ^ e d g e − p C v , α ′ P e d g e c p O l a b f o r P e d g e p C v , α ′ ) ∣ ϕ ⟩ ∥ ≤ ( 2 C ∣ E b ∣ + 2 2 ∣ E b ∣ − t ′ − 5 ) ∥ ∣ ϕ ⟩ ∥ . \left\|\left(\widehat{\mathrm{cpO}}_{\mathrm{edge}}\cdot\mathrm{cpO}^{\mathrm{for}}_{\mathrm{lab}}\cdot\widehat{\mathrm{cpO}}_{\mathrm{edge}}-\mathrm{pC}^{\prime}_{v,\alpha}P_{\mathrm{edge}}\mathrm{cpO}^{\mathrm{for}}_{\mathrm{lab}}P_{\mathrm{edge}}\mathrm{pC}^{\prime}_{v,\alpha}\right)|\phi\rangle\right\|
\le\left(\frac{2C}{\sqrt{|E_b|}}+2\sqrt{\frac{2}{|E_b|-t'-5}}\right)\||\phi\rangle\|. ( cpO edge ⋅ cpO lab for ⋅ cpO edge − pC v , α ′ P edge cpO lab for P edge pC v , α ′ ) ∣ ϕ ⟩ ≤ ( ∣ E b ∣ 2 C + 2 ∣ E b ∣ − t ′ − 5 2 ) ∥∣ ϕ ⟩ ∥.
In this bound we assume that Π ≤ t ′ , I ∣ ϕ ⟩ = ∣ ϕ ⟩ \Pi_{\le t',I}|\phi\rangle=|\phi\rangle Π ≤ t ′ , I ∣ ϕ ⟩ = ∣ ϕ ⟩ , the source is in class b b b and the edge work register is initialized to 0. Hence the expanded products have I I I such that ∣ I ∣ ≤ t ′ + 6 |I|\le t'+6 ∣ I ∣ ≤ t ′ + 6 . Let Π b w o r k \Pi_b^{\mathrm{work}} Π b work be the projector onto cases where l ≠ 0 l\ne0 l = 0 , v ≠ 0 v\ne0 v = 0 and e α ( v ) ∈ E b e_\alpha(v)\in E_b e α ( v ) ∈ E b in the X Z XZ X Z registers. We define this difference restricted to b b b as,
Δ b = Π b w o r k ( c p O ^ e d g e c p O l a b f o r c p O ^ e d g e − p C v , α ′ P e d g e c p O l a b f o r P e d g e p C v , α ′ ) Π b w o r k , \Delta_b=\Pi_b^{\mathrm{work}}\left(\widehat{\mathrm{cpO}}_{\mathrm{edge}}\mathrm{cpO}^{\mathrm{for}}_{\mathrm{lab}}\widehat{\mathrm{cpO}}_{\mathrm{edge}}-\mathrm{pC}^{\prime}_{v,\alpha}P_{\mathrm{edge}}\mathrm{cpO}^{\mathrm{for}}_{\mathrm{lab}}P_{\mathrm{edge}}\mathrm{pC}^{\prime}_{v,\alpha}\right)\Pi_b^{\mathrm{work}}, Δ b = Π b work ( cpO edge cpO lab for cpO edge − pC v , α ′ P edge cpO lab for P edge pC v , α ′ ) Π b work ,
T b d i f f = I Z i n v P l a b i n v Δ b P l a b i n v I Z . T_b^{\mathrm{diff}}=I_Z^{\mathrm{inv}}P_{\mathrm{lab}}^{\mathrm{inv}}\Delta_bP_{\mathrm{lab}}^{\mathrm{inv}}I_Z. T b diff = I Z inv P lab inv Δ b P lab inv I Z .
Thus ∥ T b d i f f Π ≤ t ′ , I ∥ = O ( ∣ E b ∣ − 1 / 2 ) \|T_b^{\mathrm{diff}}\Pi_{\le t',I}\|=O(|E_b|^{-1/2}) ∥ T b diff Π ≤ t ′ , I ∥ = O ( ∣ E b ∣ − 1/2 ) . Notice that after removing these operators, each lookup in Z Z Z is equivalent to looking it up in the actual database. Furthermore, these values in Z Z Z are still always uncomputed. Therefore, suppressing the intermediate lookups, the remaining operators are
p C l a b , l i n v ⋅ p C v , α ′ ⋅ c p O l a b f o r ⋅ p C v , α ′ ⋅ p C l a b , l i n v . (45) \mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab},l}\cdot\mathrm{pC}^{\prime}_{v,\alpha}\cdot\mathrm{cpO}^{\mathrm{for}}_{\mathrm{lab}}\cdot\mathrm{pC}^{\prime}_{v,\alpha}\cdot\mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab},l}. \tag*{(45)} pC lab , l inv ⋅ pC v , α ′ ⋅ cpO lab for ⋅ pC v , α ′ ⋅ pC lab , l inv . (45)
The operations in Eq. (45) , now controlled by the corresponding database entries, are exactly cpWT by Eq. (40) . Therefore, subtracting p C l a b i n v ( ∑ b T b d i f f ) p C l a b i n v \mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab}}\left(\sum_b T_b^{\mathrm{diff}}\right)\mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab}} pC lab inv ( ∑ b T b diff ) pC lab inv from cpWT leaves cpWT and the O ( 1 / N ) O(1/N) O ( 1/ N ) label error. Eq. (43) follows from the orthogonality of the query register.
It remains to check the properties of T d i f f T^{\mathrm{diff}} T diff . First, the number of records in the database after T d i f f T^{\mathrm{diff}} T diff changes by at most 3. This is because each product in the brackets in Δ b \Delta_b Δ b has only three operations that can change the number of records, each by one due to Theorems 2.7 and 2.8. Furthermore, the XOR copies the recorded source without affecting the database, meaning that
Π b w o r k P l a b i n v I Z = P l a b i n v I Z Π b s r c . \Pi_b^{\mathrm{work}}P_{\mathrm{lab}}^{\mathrm{inv}}I_Z=P_{\mathrm{lab}}^{\mathrm{inv}}I_Z\Pi_b^{\mathrm{src}}. Π b work P lab inv I Z = P lab inv I Z Π b src .
Combined with the fact that Δ b \Delta_b Δ b is self-adjoint, we have that T b d i f f T_b^{\mathrm{diff}} T b diff is self-adjoint and T b d i f f = Π b s r c T b d i f f Π b s r c T_b^{\mathrm{diff}}=\Pi_b^{\mathrm{src}}T_b^{\mathrm{diff}}\Pi_b^{\mathrm{src}} T b diff = Π b src T b diff Π b src .
Finally, let us prove the final paragraph of the statement. In the range of Π b s r c \Pi_b^{\mathrm{src}} Π b src , the vertex v = L − 1 ( l ) v=L^{-1}(l) v = L − 1 ( l ) is in V c l a s s ( b ) V_{\mathrm{class}}(b) V class ( b ) and determined by I b I_b I b . Both c p O e d g e \mathrm{cpO}_{\mathrm{edge}} cpO edge and p C v , α ′ \mathrm{pC}^{\prime}_{v,\alpha} pC v , α ′ only change C b C_b C b . When c p O l a b f o r \mathrm{cpO}^{\mathrm{for}}_{\mathrm{lab}} cpO lab for is applied, the input w w w must be in V c l a s s ( b ) V_{\mathrm{class}}(b) V class ( b ) and only affects L ( w ) L(w) L ( w ) . Therefore ⟨ a ′ , J ∣ T b d i f f ∣ a , I ⟩ = 0 \langle a',J|T_b^{\mathrm{diff}}|a,I\rangle=0 ⟨ a ′ , J ∣ T b diff ∣ a , I ⟩ = 0 when J b ≠ I b J_b\ne I_b J b = I b . In ∣ + w , L ⟩ |+_w,L\rangle ∣ + w , L ⟩ , the available labels are [ M ] ∖ Im ( L ) [M]\setminus\operatorname{Im}(L) [ M ] ∖ Im ( L ) each with equal amplitude. Hence the dependence on I b I_b I b is only based on the labels used and their number. □ \square □
Next, we relate the probability an algorithm A \mathcal{A} A with O ( w t ) O^{(\mathrm{wt})} O ( wt ) succeeds with the probability that running A \mathcal{A} A with cpWT records the path in the database. A candidate path is the list x p a t h = ( z 0 , α 1 , z 1 , … , α m , z m ) x_{\mathrm{path}}=(z_0,\alpha_1,z_1,\ldots,\alpha_m,z_m) x path = ( z 0 , α 1 , z 1 , … , α m , z m ) where z 0 = 0 z_0=0 z 0 = 0 , the labels z i ∈ [ 0 , M ] z_i\in[0,M] z i ∈ [ 0 , M ] are pairwise distinct, α i ∈ C \alpha_i\in C α i ∈ C and m ≥ n m\ge n m ≥ n . Without loss of generality, we may assume there are no loops as they may be removed without making any queries. The following algorithm describes the verification process of A \mathcal{A} A using O ( w t ) O^{(\mathrm{wt})} O ( wt ) .
Algorithm 3.9 Standard Oracle Pathfinding
Sample some σ = ( σ l a b e l , σ e d g e ) ∼ D p r o d \sigma= (\sigma_{\mathrm{label}}, \sigma_{\mathrm{edge}}) \sim D_{\mathrm{prod}} σ = ( σ label , σ edge ) ∼ D prod to construct O σ ( w t ) O_{\sigma}^{(\mathrm{wt})} O σ ( wt ) .
Run A \mathcal{A} A with q q q queries to O σ ( w t ) O_{\sigma}^{(\mathrm{wt})} O σ ( wt ) , obtaining some x p a t h \mathbf{x}_{\mathrm{path}} x path . Reject if it does not satisfy the conditions we described above.
If m ≤ 2 q + 1 m \le2q + 1 m ≤ 2 q + 1 , verify the entire path as follows: (a) For each i ∈ [ m ] i \in[m] i ∈ [ m ] , query O σ ( w t ) O_{\sigma}^{(\mathrm{wt})} O σ ( wt ) at ( z i − 1 , α i ) (z_{i-1}, \alpha_i) ( z i − 1 , α i ) . Reject if the answer is not z i z_i z i . (b) For each α ∈ C \alpha\in\mathcal{C} α ∈ C , query O σ ( w t ) O_{\sigma}^{(\mathrm{wt})} O σ ( wt ) at ( z m , α ) (z_m, \alpha) ( z m , α ) . Accept if and only if exactly two answers differ from z m z_m z m .
Otherwise, if m > 2 q + 1 m > 2q + 1 m > 2 q + 1 , only test the first 2 q + 1 2q + 1 2 q + 1 labels. For each i ∈ [ 2 q + 1 ] i \in[2q + 1] i ∈ [ 2 q + 1 ] and α ∈ C \alpha\in\mathcal{C} α ∈ C , query O σ ( w t ) O_{\sigma}^{(\mathrm{wt})} O σ ( wt ) at ( z i , α ) (z_i, \alpha) ( z i , α ) . Accept if and only if for all i i i , at least one answer differs from z i z_i z i .
Notice that when m > 2 q + 1 m > 2q + 1 m > 2 q + 1 , we are simply testing whether the outputted path contains valid labels, which does not decrease the probability of successfully outputting an entrance to exit path. Otherwise, when m ≤ 2 q + 1 m \le2q + 1 m ≤ 2 q + 1 , we test whether the path is valid and actually exits.2
Let p w t p_{\mathrm{wt}} p wt denote the probability that Algorithm 3.9 succeeds. We compare this probability with a test on the database when A \mathcal{A} A queries cpWT instead. Notice that we may represent the graph formed by the recorded edges as G ^ ( I ) = ( V ^ ( I ) , E ^ ( I ) ) \widehat{G}(I) = (\widehat{V}(I), \widehat{E}(I)) G ( I ) = ( V ( I ) , E ( I )) where,
E ^ ( I ) = { { tail ( e ) , head ( f ) } : C b ( e ) = f for some b ∈ B e d g e } , \widehat{E}(I) = \{\{\operatorname{tail}(e), \operatorname{head}(f)\} : C_b(e) = f \text{ for some } b \in B_{\mathrm{edge}}\}, E ( I ) = {{ tail ( e ) , head ( f )} : C b ( e ) = f for some b ∈ B edge } ,
V ^ ( I ) = ⋃ g ∈ E ^ ( I ) g . \widehat{V}(I) = \bigcup_{g \in\widehat{E}(I)} g. V ( I ) = g ∈ E ( I ) ⋃ g .
We say that G ^ ( I ) \widehat{G}(I) G ( I ) contains a crossing if it contains a path from col ( n − l − 1 ) \operatorname{col}(n-l-1) col ( n − l − 1 ) to col ( n + l + 1 ) \operatorname{col}(n+l+1) col ( n + l + 1 ) . The projector on such crossing is defined as,
Π C r o s s ∣ I ⟩ = { ∣ I ⟩ if G ^ ( I ) contains a crossing , 0 otherwise . \Pi_{\mathrm{Cross}}|I\rangle=
\begin{cases}
|I\rangle& \text{if } \widehat{G}(I) \text{ contains a crossing},\\
0 & \text{otherwise}.
\end{cases} Π Cross ∣ I ⟩ = { ∣ I ⟩ 0 if G ( I ) contains a crossing , otherwise .
Note that this only tests the edge database C C C .
Algorithm 3.10 Pathfinding using Exact Compressed Oracle
Initialize the databases I = ( L , C ) I = (L, C) I = ( L , C ) to ∣ ⊥ ⟩ I |\perp\rangle_I ∣ ⊥ ⟩ I .
Run A \mathcal{A} A with q q q queries to cpWT.
Measure { Π C r o s s , 1 − Π C r o s s } \{\Pi_{\mathrm{Cross}}, 1-\Pi_{\mathrm{Cross}}\} { Π Cross , 1 − Π Cross } on I I I , accepting if and only if the first outcome occurs.
Let p c r o s s p_{\mathrm{cross}} p cross be the success probability of Algorithm 3.10. Unlike Algorithm 3.9, this algorithm tests the records already present after A \mathcal{A} A finishes without making any additional queries. Next we compare projectors on values present in a database in the standard and exact compressed way.
For j ∈ [ m ] j \in[m] j ∈ [ m ] , let P j P_j P j be a permutation register of size s j s_j s j with database register I j I_j I j . Note that P j P_j P j need not be distinct. Choose x j ∈ [ s j ] x_j \in[s_j] x j ∈ [ s j ] and Y j ⊆ [ s j ] Y_j \subseteq[s_j] Y j ⊆ [ s j ] and define
Π x → Y , P : = ∏ j = 1 m ∑ y ∈ Y j Π ⪰ { ( x j , y ) } , P j , Π x → Y , I : = ∏ j = 1 m ∑ y ∈ Y j Π ⪰ { ( x j , y ) } , I j . \Pi_{x \to Y,P} := \prod_{j=1}^{m} \sum_{y \in Y_j} \Pi_{\succeq\{(x_j,y)\},P_j},
\qquad
\Pi_{x \to Y,I} := \prod_{j=1}^{m} \sum_{y \in Y_j} \Pi_{\succeq\{(x_j,y)\},I_j}. Π x → Y , P := j = 1 ∏ m y ∈ Y j ∑ Π ⪰ {( x j , y )} , P j , Π x → Y , I := j = 1 ∏ m y ∈ Y j ∑ Π ⪰ {( x j , y )} , I j .
These projectors represent the presence of some desired information in the P and I registers respectively.
Lemma 3.11. Let ξ \xi ξ be a possibly unnormalized state on P \mathrm{P} P and any additional registers such that for all j ∈ [ m ] j \in[m] j ∈ [ m ] , ( Π s j , ≤ t ) P j ξ = ξ (\Pi_{s_j,\leq t})_{P_j}\xi= \xi ( Π s j , ≤ t ) P j ξ = ξ . Furthermore, assume 4 ( t + m + 4 ) ≤ s ≤ min j ∈ [ m ] s j 4(t+m+4) \leq s \leq\min_{j\in[m]} s_j 4 ( t + m + 4 ) ≤ s ≤ min j ∈ [ m ] s j . Then for I P \mathcal{I}_{P} I P as in Eq. (41) , there exists some constant C C C such that,
∥ Π x → Y , P ξ ∥ ≤ ∥ Π x → Y , I I P ξ ∥ + C 1 s ∑ j = 1 m ∣ Y j ∣ ∥ ξ ∥ . \left\|\Pi_{x\to Y,P}\xi\right\| \leq\left\|\Pi_{x\to Y,I}\mathcal{I}_{P}\xi\right\|+C\sqrt{\frac{1}{s}\sum_{j=1}^{m}|Y_j|}\|\xi\|. ∥ Π x → Y , P ξ ∥ ≤ ∥ Π x → Y , I I P ξ ∥ + C s 1 j = 1 ∑ m ∣ Y j ∣ ∥ ξ ∥. The same bound holds for the projectors controlled by an additional register assuming the hypotheses and error bound hold uniformly over the control values. It also holds for inverse assignment tests ∏ j = 1 m ∏ x ∈ X j Π ⪰ { ( x , y j ) } \prod_{j=1}^{m}\prod_{x\in X_j}\Pi_{\succeq\{(x,y_j)\}} ∏ j = 1 m ∏ x ∈ X j Π ⪰ {( x , y j )} , with ∣ X j ∣ |X_j| ∣ X j ∣ in place of ∣ Y j ∣ |Y_j| ∣ Y j ∣ .
Proof. Fix some j ∈ [ m ] j \in[m] j ∈ [ m ] and y ∈ Y j y \in Y_j y ∈ Y j . Let s ′ ≥ s s' \geq s s ′ ≥ s be the size of the corresponding permutation. Initialize the answer register Y Y Y to ∣ 0 ⟩ |0\rangle ∣0 ⟩ and project the output of a query O x j O_{x_j} O x j to ∣ y ⟩ |y\rangle ∣ y ⟩ . Notice that ⟨ y ∣ O x j ∣ 0 ⟩ Y = Π ⪰ { ( x j , y ) } , P j \langle y|O_{x_j}|0\rangle_Y=\Pi_{\succeq\{(x_j,y)\},P_j} ⟨ y ∣ O x j ∣0 ⟩ Y = Π ⪰ {( x j , y )} , P j , so this turns a query into the projector testing the mapping [ x j → y ] [x_j\to y] [ x j → y ] . Combining Eq. (13) and Theorem 2.8 with the compression estimate in the proof of Lemma 5.1 of [21 ] , the triangle inequality gives us,
∥ ( Π ⪰ { ( x j , y ) } , I j I s ′ − I s ′ Π ⪰ { ( x j , y ) } , P j ) Π s ′ , ≤ t + m ∥ ≤ C s . (46) \left\|\left(\Pi_{\succeq\{(x_j,y)\},I_j}\mathcal{I}_{s'}-\mathcal{I}_{s'}\Pi_{\succeq\{(x_j,y)\},P_j}\right)\Pi_{s',\leq t+m}\right\|\leq\frac{C}{\sqrt{s}}. \tag*{(46)} ( Π ⪰ {( x j , y )} , I j I s ′ − I s ′ Π ⪰ {( x j , y )} , P j ) Π s ′ , ≤ t + m ≤ s C . (46)
for some constant C C C . For y ∈ Y j y \in Y_j y ∈ Y j , define the following vectors,
η = Π x → Y , P ξ , η j , y = Π ⪰ { ( x j , y ) } , P j η . \eta=\Pi_{x\to Y,P}\xi,\qquad\eta_{j,y}=\Pi_{\succeq\{(x_j,y)\},P_j}\eta. η = Π x → Y , P ξ , η j , y = Π ⪰ {( x j , y )} , P j η .
Under a fixed j j j , η j , y \eta_{j,y} η j , y are orthogonal and sum to η \eta η . By Theorem 2.7, imposing these m m m assignment conditions raises the level by at most m m m . Notice that the database projectors commute. Therefore by a union-bound, Cauchy–Schwarz and Eq. (46) ,
∥ ( 1 − Π x → Y , I ) I P η ∥ 2 ≤ ∑ j = 1 m ∣ Y j ∣ ∑ y ∈ Y j ∥ ( 1 − Π ⪰ { ( x j , y ) } , I j ) I P η j , y ∥ 2 ≤ C 2 s ∑ j = 1 m ∣ Y j ∣ ∥ η j ∥ 2 . \begin{aligned}
\left\|(1-\Pi_{x\to Y,I})\mathcal{I}_{P}\eta\right\|^{2}\leq\sum_{j=1}^{m}|Y_j|\sum_{y\in Y_j}\left\|(1-\Pi_{\succeq\{(x_j,y)\},I_j})\mathcal{I}_{P}\eta_{j,y}\right\|^{2} \\
&\leq\frac{C^{2}}{s}\sum_{j=1}^{m}|Y_j|\|\eta_j\|^{2}.
\end{aligned} ∥ ( 1 − Π x → Y , I ) I P η ∥ 2 ≤ j = 1 ∑ m ∣ Y j ∣ y ∈ Y j ∑ ( 1 − Π ⪰ {( x j , y )} , I j ) I P η j , y 2 ≤ s C 2 j = 1 ∑ m ∣ Y j ∣∥ η j ∥ 2 .
Using the fact that I P \mathcal{I}_{P} I P is an isometry,
∥ η ∥ 2 = ⟨ I P η ∣ I P ξ ⟩ ≤ ∥ η ∥ ∥ Π x → Y , I I P ξ ∥ + ∥ ( 1 − Π x → Y , I ) I P η ∥ ∥ ξ ∥ . \begin{aligned}
\|\eta\|^{2}=\langle\mathcal{I}_{P}\eta|\mathcal{I}_{P}\xi\rangle\\
&\leq\|\eta\|\|\Pi_{x\to Y,I}\mathcal{I}_{P}\xi\|+\|(1-\Pi_{x\to Y,I})\mathcal{I}_{P}\eta\|\|\xi\|.
\end{aligned} ∥ η ∥ 2 = ⟨ I P η ∣ I P ξ ⟩ ≤ ∥ η ∥∥ Π x → Y , I I P ξ ∥ + ∥ ( 1 − Π x → Y , I ) I P η ∥∥ ξ ∥.
Hence the equation in the statement follows. For controlled tests, expand the state as ξ = ∑ c ∣ c ⟩ ⊗ ξ c \xi=\sum_c|c\rangle\otimes\xi_c ξ = ∑ c ∣ c ⟩ ⊗ ξ c where c c c is the control register and apply the same procedure along with the fact that the vectors are orthogonal. For inverse assignment tests, observe that I s \mathcal{I}_s I s intertwines inversion of permutations with the flip F F F of databases (both preserve levels and send ∣ T I ⟩ |T_I\rangle ∣ T I ⟩ and ∣ I ⟩ |I\rangle ∣ I ⟩ to ∣ T I − 1 ⟩ |T_{I^{-1}}\rangle ∣ T I − 1 ⟩ and ∣ I − 1 ⟩ |I^{-1}\rangle ∣ I − 1 ⟩ , respectively).
:::
Theorem 3.12. For any algorithm A \mathcal{A} A making q q q queries where N l ≥ 80 ( q + 1 ) N_l\geq80(q+1) N l ≥ 80 ( q + 1 ) ,
p w t = O ( p c r o s s + q N l ) . (47) p_{\mathrm{wt}}=O\left(p_{\mathrm{cross}}+\frac{q}{N_l}\right). \tag*{(47)} p wt = O ( p cross + N l q ) . (47) Proof. Let ∣ ψ A , q ( ⋅ ) ⟩ |\psi_{\mathcal{A},q}^{(\cdot)}\rangle ∣ ψ A , q ( ⋅ ) ⟩ be the final states running A \mathcal{A} A with some oracle ⋅ \cdot ⋅ , either O ( w t ) O^{(\mathrm{wt})} O ( wt ) or c p W T ^ \widehat{\mathrm{cpWT}} cpWT . By Theorem 3.7,
I P ∣ ψ A , q ( O ( w t ) ) ⟩ = ∣ ψ A , q ( c p W T ) ⟩ , \mathcal{I}_{P}|\psi_{\mathcal{A},q}^{(O^{(\mathrm{wt})})}\rangle=|\psi_{\mathcal{A},q}^{(\mathrm{cpWT})}\rangle, I P ∣ ψ A , q ( O ( wt ) ) ⟩ = ∣ ψ A , q ( cpWT ) ⟩ , p c r o s s = ∥ Π C r o s s ∣ ψ A , q ( c p W T ) ⟩ ∥ 2 . p_{\mathrm{cross}}=\left\|\Pi_{\mathrm{Cross}}|\psi_{\mathcal{A},q}^{(\mathrm{cpWT})}\rangle\right\|^{2}. p cross = Π Cross ∣ ψ A , q ( cpWT ) ⟩ 2 . Furthermore, ∣ ψ A , q ( c p W T ) ⟩ |\psi_{\mathcal{A},q}^{(\mathrm{cpWT})}\rangle ∣ ψ A , q ( cpWT ) ⟩ is supported on databases with ∣ L ∣ ≤ 2 q |L|\leq2q ∣ L ∣ ≤ 2 q and ∣ C ∣ ≤ q |C|\leq q ∣ C ∣ ≤ q . By Eq. (13) , the corresponding permutation state has label level at most 2 q 2q 2 q and edge level at most q q q in each edge class. Let p ^ w t \widehat{p}_{\mathrm{wt}} p wt and p ~ w t \widetilde{p}_{\mathrm{wt}} p wt be the probability contributions to p w t p_{\mathrm{wt}} p wt from outputs of length at most 2 q + 1 2q+1 2 q + 1 or greater, as in Algorithm 3.9.
Let us consider the case when m ≤ 2 q + 1 m \le2q+1 m ≤ 2 q + 1 . First, we recover the structural vertices from the output labels z 1 , … , z m z_1,\ldots,z_m z 1 , … , z m . Starting with ∣ ψ A , q ( O ( w t ) ) ⟩ \lvert\psi^{(O(w_t))}_{A,q}\rangle ∣ ψ A , q ( O ( w t )) ⟩ , for all i ∈ [ m ] i \in[m] i ∈ [ m ] copy the value v i = σ l a b e l − 1 ( z i ) v_i=\sigma_{\mathrm{label}}^{-1}(z_i) v i = σ label − 1 ( z i ) into some register, retaining only those in V n ∖ { 0 } V_n\setminus\{0\} V n ∖ { 0 } . Let ∣ Ψ ( O ( w t ) ) ⟩ \lvert\Psi^{(O(w_t))}\rangle ∣ Ψ ( O ( w t )) ⟩ be the resulting unnormalized state of this process. We leave σ l a b e l \sigma_{\mathrm{label}} σ label uncompressed and only apply I C : = ⨂ b ∈ B e d g e I ∣ E b ∣ I_C:=\bigotimes_{b\in B_{\mathrm{edge}}} I_{|E_b|} I C := ⨂ b ∈ B edge I ∣ E b ∣ to the middle edge permutations.
Next, we check whether x p a t h x_{\mathrm{path}} x path is a valid path. Check whether v m = r ( T 2 ) v_m=r(T_2) v m = r ( T 2 ) , rejecting if not. Otherwise, let ω = ( x p a t h , v 1 , … , v m ) \omega=(x_{\mathrm{path}},v_1,\ldots,v_m) ω = ( x path , v 1 , … , v m ) be some output list, the proposed edges e i = e α i ( v i − 1 ) e_i=e_{\alpha_i}(v_{i-1}) e i = e α i ( v i − 1 ) , h i = e α i ( v i ) h_i=e_{\alpha_i}(v_i) h i = e α i ( v i ) and b i = b e d g e ( e i ) b_i=b_{\mathrm{edge}}(e_i) b i = b edge ( e i ) . Reject if either e i e_i e i or h i h_i h i are not valid edges, b i ≠ b e d g e ( h i ) b_i\ne b_{\mathrm{edge}}(h_i) b i = b edge ( h i ) , col ( v i ) = col ( v i − 1 ) \operatorname{col}(v_i)=\operatorname{col}(v_{i-1}) col ( v i ) = col ( v i − 1 ) or if b i = ⊥ b_i=\bot b i = ⊥ and e i ≠ h i e_i\ne h_i e i = h i . This covers all unpermuted edges. When b i ≠ ⊥ b_i\ne\bot b i = ⊥ , we still need to check the edge permutation. For each edge class b b b , let
f ω , b : = { ( e i , h i ) : b i = b , v i − 1 = tail ( e i ) } ∪ { ( h i , e i ) : b i = b , v i − 1 = head ( e i ) } . f_{\omega,b}:=\{(e_i,h_i):b_i=b,\ v_{i-1}=\operatorname{tail}(e_i)\}\cup\{(h_i,e_i):b_i=b,\ v_{i-1}=\operatorname{head}(e_i)\}. f ω , b := {( e i , h i ) : b i = b , v i − 1 = tail ( e i )} ∪ {( h i , e i ) : b i = b , v i − 1 = head ( e i )} .
We have that the edges are present exactly when σ b ⪰ f ω , b \sigma_b\succeq f_{\omega,b} σ b ⪰ f ω , b for all b b b . Let f ω = ( f ω , b ) b f_\omega=(f_{\omega,b})_b f ω = ( f ω , b ) b . Using the assignment projectors from Theorem 3.11, let
Π A P ( O ( w t ) ) = ∑ ω ∣ ω ⟩ ⟨ ω ∣ ⊗ Π ⪰ f ω , P , \Pi_{\mathrm{AP}}^{(O(w_t))}=\sum_\omega\lvert\omega\rangle\langle\omega\rvert\otimes\Pi_{\succeq f_\omega,P}, Π AP ( O ( w t )) = ω ∑ ∣ ω ⟩ ⟨ ω ∣ ⊗ Π ⪰ f ω , P ,
Π A C ( c p W T ) = ∑ ω ∣ ω ⟩ ⟨ ω ∣ ⊗ Π ⪰ f ω , C . \Pi_{\mathrm{AC}}^{(\mathrm{cpWT})}=\sum_\omega\lvert\omega\rangle\langle\omega\rvert\otimes\Pi_{\succeq f_\omega,C}. Π AC ( cpWT ) = ω ∑ ∣ ω ⟩ ⟨ ω ∣ ⊗ Π ⪰ f ω , C .
where we are only summing over ω \omega ω that satisfy the previous checks. These projectors check whether the correct assignments are in σ \sigma σ and C C C , respectively. As the test in Item 3 of Algorithm 3.9 is exactly this verification,
p w t ≤ = ∥ Π A P ( O ( w t ) ) ∣ Ψ ( O ( w t ) ) ⟩ ∥ 2 . p_{\mathrm{wt}}^{\le}=\left\|\Pi_{\mathrm{AP}}^{(O(w_t))}\lvert\Psi^{(O(w_t))}\rangle\right\|^2. p wt ≤ = Π AP ( O ( w t )) ∣ Ψ ( O ( w t )) ⟩ 2 .
Obtaining v i = σ l a b e l − 1 ( z i ) v_i=\sigma_{\mathrm{label}}^{-1}(z_i) v i = σ label − 1 ( z i ) and checking if v i ∈ V n ∖ { 0 } v_i\in V_n\setminus\{0\} v i ∈ V n ∖ { 0 } leaves the edge level at most q q q . The edge-assignment checks in Π A P ( O ( w t ) ) \Pi_{\mathrm{AP}}^{(O(w_t))} Π AP ( O ( w t )) raise the edge level by at most m ≤ 2 q + 1 m\le2q+1 m ≤ 2 q + 1 , as in Theorem 3.11, giving a level of at most q + m ≤ 3 q + 1 q+m\le3q+1 q + m ≤ 3 q + 1 . Therefore, by Theorem 3.3 and our assumption, ∣ E b ∣ ≥ 4 ( 3 q + 5 ) \lvert E_b\rvert\ge4(3q+5) ∣ E b ∣ ≥ 4 ( 3 q + 5 ) , meaning that the size condition in Theorem 3.11 holds. Therefore, the norm of the error is O ( q / N l ) O(\sqrt{q/N_l}) O ( q / N l ) . Therefore,
p w t ≤ ≤ ∥ Π A C ( c p W T ) T C ∣ Ψ ( O ( w t ) ) ⟩ ∥ + O ( q N l ) . \sqrt{p_{\mathrm{wt}}^{\le}}\le\left\|\Pi_{\mathrm{AC}}^{(\mathrm{cpWT})}\mathcal{T}_C\lvert\Psi^{(O(w_t))}\rangle\right\|+O\left(\sqrt{\frac{q}{N_l}}\right). p wt ≤ ≤ Π AC ( cpWT ) T C ∣ Ψ ( O ( w t )) ⟩ + O ( N l q ) .
Notice that any path from the entrance to exit must cross from col ( n − l − 1 ) \operatorname{col}(n-l-1) col ( n − l − 1 ) to col ( n + l + 1 ) \operatorname{col}(n+l+1) col ( n + l + 1 ) . Therefore,
∥ Π A C ( c p W T ) T C ∣ Ψ ( O ( w t ) ) ⟩ ∥ ≤ ∥ Π C r o s s T C ∣ ψ A , q ( O ( w t ) ) ⟩ ∥ = ∥ Π C r o s s ∣ ψ A , q ( c p W T ) ⟩ ∥ = p c r o s s . \begin{aligned}
\left\|\Pi_{\mathrm{AC}}^{(\mathrm{cpWT})}\mathcal{T}_C\lvert\Psi^{(O(w_t))}\rangle\right\|\le\left\|\Pi_{\mathrm{Cross}}\mathcal{T}_C\lvert\psi_{A,q}^{(O(w_t))}\rangle\right\| \\
&=\left\|\Pi_{\mathrm{Cross}}\lvert\psi_{A,q}^{(\mathrm{cpWT})}\rangle\right\|=\sqrt{p_{\mathrm{cross}}}.
\end{aligned} Π AC ( cpWT ) T C ∣ Ψ ( O ( w t )) ⟩ ≤ Π Cross T C ∣ ψ A , q ( O ( w t )) ⟩ = Π Cross ∣ ψ A , q ( cpWT ) ⟩ = p cross .
On the other hand, in the long output case when m > 2 q + 1 m>2q+1 m > 2 q + 1 , the verifier only tests whether the first 2 q + 1 2q+1 2 q + 1 labels point to valid vertices. Define the projectors
Π A P ( O ( w t ) , > ) : = ∏ i = 1 2 q + 1 [ σ l a b e l − 1 ( z i ) ∈ V n ∖ { 0 } ] , \Pi_{\mathrm{AP}}^{(O(w_t),>)}:=\prod_{i=1}^{2q+1}[\sigma_{\mathrm{label}}^{-1}(z_i)\in V_n\setminus\{0\}], Π AP ( O ( w t ) , > ) := i = 1 ∏ 2 q + 1 [ σ label − 1 ( z i ) ∈ V n ∖ { 0 }] ,
Π A L ( c p W T , > ) : = ∏ i = 1 2 q + 1 ∑ v ∈ V n ∖ { 0 } Π ⪰ { ( v , z i ) } , L . \Pi_{\mathrm{AL}}^{(\mathrm{cpWT},>)}:=\prod_{i=1}^{2q+1}\sum_{v\in V_n\setminus\{0\}}\Pi_{\succeq\{(v,z_i)\},L}. Π AL ( cpWT , > ) := i = 1 ∏ 2 q + 1 v ∈ V n ∖ { 0 } ∑ Π ⪰ {( v , z i )} , L .
These operators are controlled by the output list. Let ∣ ψ > ⟩ \lvert\psi^>\rangle ∣ ψ > ⟩ be the component of ∣ ψ A , q ( O ( w t ) ) ⟩ \lvert\psi_{A,q}^{(O(w_t))}\rangle ∣ ψ A , q ( O ( w t )) ⟩ with m > 2 q + 1 m>2q+1 m > 2 q + 1 . By Theorem 3.7, all databases L L L in the support of I P ∣ ψ > ⟩ I_P\lvert\psi^>\rangle I P ∣ ψ > ⟩ have ∣ L ∣ ≤ 2 q \lvert L\rvert\le2q ∣ L ∣ ≤ 2 q . As acceptance requires a label database with at least 2 q + 1 2q+1 2 q + 1 records, the recorded test annihilates the final state. Applying Theorem 3.11 to these 2 q + 1 2q+1 2 q + 1 inverse-label tests with M ≥ 4 ( 4 q + 5 ) M\ge4(4q+5) M ≥ 4 ( 4 q + 5 ) gives,
p w t > = ∥ Π A P ( O ( w t ) , > ) ∣ ψ > ⟩ ∥ ≤ ∥ Π A L ( c p W T , > ) I P ∣ ψ > ⟩ ∥ + C ( 2 q + 1 ) ∣ V n ∖ { 0 } ∣ M ∥ ∣ ψ > ⟩ ∥ = O ( q N ) . \sqrt{p_{\mathrm{wt}}^{>}}=\left\|\Pi_{\mathrm{AP}}^{(O(w_t),>)}\lvert\psi^>\rangle\right\|\le\left\|\Pi_{\mathrm{AL}}^{(\mathrm{cpWT},>)}I_P\lvert\psi^>\rangle\right\|+C\sqrt{\frac{(2q+1)\lvert V_n\setminus\{0\}\rvert}{M}}\left\|\lvert\psi^>\rangle\right\|=O\left(\sqrt{\frac{q}{N}}\right). p wt > = Π AP ( O ( w t ) , > ) ∣ ψ > ⟩ ≤ Π AL ( cpWT , > ) I P ∣ ψ > ⟩ + C M ( 2 q + 1 ) ∣ V n ∖ { 0 }∣ ∥ ∣ ψ > ⟩ ∥ = O ( N q ) .
Hence p w t > = O ( q / N ) p_{\mathrm{wt}}^{>}=O(q/N) p wt > = O ( q / N ) , which combined with the bound on p w t ≤ p_{\mathrm{wt}}^{\le} p wt ≤ implies Eq. (47) , since N l ≤ N N_l\le N N l ≤ N .
Hardness of pathfinding
The goal of this section is proving the following theorem.
Theorem 4.1. Assume that n ≥ 16 n \ge16 n ≥ 16 is even and l ∈ [ 2 , n − 4 ] l \in[2,n-4] l ∈ [ 2 , n − 4 ] . Any quantum algorithm A A A making q q q queries to the welded trees oracle O σ ( w t ) O_{\sigma}^{(\mathrm{wt})} O σ ( wt ) with σ ∼ D s i n g \sigma\sim\mathcal{D}_{\mathrm{sing}} σ ∼ D sing satisfies
Pr [ A outputs a path from entrance to exit ] = O ( q N l + q 2 ⋅ ϵ l + n ⋅ q 3 N ) , (48) \Pr[A\text{ outputs a path from entrance to exit}] = O\left(\frac{q}{N_l}+q^2\cdot\epsilon_l+\frac{n\cdot q^3}{N}\right), \tag*{(48)} Pr [ A outputs a path from entrance to exit ] = O ( N l q + q 2 ⋅ ϵ l + N n ⋅ q 3 ) , (48) where the probability is over σ \sigma σ and the measurement outcomes of A A A . For a suitable choice of l l l , constant success probability requires Ω ( ( N / ( n + 1 ) ) 1 / 3 ) \Omega((N/(n+1))^{1/3}) Ω (( N / ( n + 1 ) ) 1/3 ) queries.
In particular, the lower bound for σ ∼ D s i n g \sigma\sim\mathcal{D}_{\mathrm{sing}} σ ∼ D sing implies a lower bound in the worst case. Throughout the rest of the section we assume that for some constant C 0 C_0 C 0 ,
N l ≥ C 0 ( q + 1 ) , C 0 ( ( q + 1 ) ϵ l + ( n + 1 ) ( q + 1 ) 3 N ) ≤ 1 2 . (49) N_l \ge C_0(q+1),\qquad C_0\left((q+1)\epsilon_l+\frac{(n+1)(q+1)^3}{N}\right)\le\frac{1}{2}. \tag*{(49)} N l ≥ C 0 ( q + 1 ) , C 0 ( ( q + 1 ) ϵ l + N ( n + 1 ) ( q + 1 ) 3 ) ≤ 2 1 . (49)
Good space
We now introduce the good space. Intuitively, it corresponds to the space where assignments to vertices that are not fixed behave similarly to a random walk. We define the following sets of vertices:
V m i d : = { v ∈ V n : n − l < col ( v ) < n + l } , V_{\mathrm{mid}}:=\{v\in V_n:n-l<\operatorname{col}(v)<n+l\}, V mid := { v ∈ V n : n − l < col ( v ) < n + l } ,
V b d : = col ( n − l − 1 ) ∪ col ( n − l ) ∪ col ( n + l ) ∪ col ( n + l + 1 ) , V_{\mathrm{bd}}:=\operatorname{col}(n-l-1)\cup\operatorname{col}(n-l)\cup\operatorname{col}(n+l)\cup\operatorname{col}(n+l+1), V bd := col ( n − l − 1 ) ∪ col ( n − l ) ∪ col ( n + l ) ∪ col ( n + l + 1 ) ,
V w e l d : = col ( n ) ∪ col ( n + 1 ) . V_{\mathrm{weld}}:=\operatorname{col}(n)\cup\operatorname{col}(n+1). V weld := col ( n ) ∪ col ( n + 1 ) .
For some u ∈ V m i d ∪ V b d u\in V_{\mathrm{mid}}\cup V_{\mathrm{bd}} u ∈ V mid ∪ V bd , e = e α ( u ) e=e_\alpha(u) e = e α ( u ) and b = b e d g e ( e ) b=b_{\mathrm{edge}}(e) b = b edge ( e ) , we let κ α ( u , v ) \kappa_\alpha(u,v) κ α ( u , v ) be the probability that an edge is randomly assigned to go between u u u and v v v when it is permuted,
κ α ( u , v ) : = { 1 ∣ E b ∣ if b ∈ B e d g e , u = tail ( e ) and v ∈ { head ( g ) : g ∈ E b } , 1 ∣ E b ∣ if b ∈ B e d g e , u = head ( e ) and v ∈ { tail ( g ) : g ∈ E b } , 0 otherwise. (50) \kappa_\alpha(u,v):=
\begin{cases}
\frac{1}{|E_b|} & \text{if } b\in B_{\mathrm{edge}},\ u=\operatorname{tail}(e)\text{ and }v\in\{\operatorname{head}(g):g\in E_b\},\\
\frac{1}{|E_b|} & \text{if } b\in B_{\mathrm{edge}},\ u=\operatorname{head}(e)\text{ and }v\in\{\operatorname{tail}(g):g\in E_b\},\\
0 & \text{otherwise.}
\end{cases} \tag*{(50)} κ α ( u , v ) := ⎩ ⎨ ⎧ ∣ E b ∣ 1 ∣ E b ∣ 1 0 if b ∈ B edge , u = tail ( e ) and v ∈ { head ( g ) : g ∈ E b } , if b ∈ B edge , u = head ( e ) and v ∈ { tail ( g ) : g ∈ E b } , otherwise. (50)
The endpoints are on the opposite side of the same class, so κ β ( u , v ) = κ β ( v , u ) \kappa_\beta(u,v)=\kappa_\beta(v,u) κ β ( u , v ) = κ β ( v , u ) and ∑ κ β ( u , v ) ≤ 1 \sum\kappa_\beta(u,v)\le1 ∑ κ β ( u , v ) ≤ 1 , with equality when b e d g e ( e β ( v ) ) ∈ B e d g e b_{\mathrm{edge}}(e_\beta(v))\in B_{\mathrm{edge}} b edge ( e β ( v )) ∈ B edge .
An abstract forest H = ( U , E ( H ) , Color H , λ H ) H=(U,E(H),\operatorname{Color}_H,\lambda_H) H = ( U , E ( H ) , Color H , λ H ) consists of a vertex set U U U , an edge set E ( H ) E(H) E ( H ) that forms a forest, a proper edge-coloring Color H : E ( H ) → C \operatorname{Color}_H:E(H)\to C Color H : E ( H ) → C and an injective labeling λ H : U ⇀ [ M ] \lambda_H:U\rightharpoonup[M] λ H : U ⇀ [ M ] . Without loss of generality, assume that each connected component in H H H has at least one label or edge. Intuitively, this represents what the algorithm A A A “knows” as H H H does not assign the labels to structural vertices, so we call U U U and E ( H ) E(H) E ( H ) the abstract vertices and edges, respectively. This is handled using the assignment ϕ : U → [ M ] \phi:U\to[M] ϕ : U → [ M ] which places each abstract vertex u u u to some structural vertex.
An abstract edge e ∈ E ( H ) e\in E(H) e ∈ E ( H ) is a weld when both of its endpoints under ϕ \phi ϕ are in V w e l d V_{\mathrm{weld}} V weld . For some u ∈ U u\in U u ∈ U , we let the tree component C u t r e e C_u^{\mathrm{tree}} C u tree be the connected component containing u u u of H H H if we remove all the weld edges. Hence C u t r e e C_u^{\mathrm{tree}} C u tree is entirely in one of T 1 T_1 T 1 or T 2 T_2 T 2 , except when it consists of a single isolated vertex assigned outside V n V_n V n , and one tree in H H H may contain multiple tree components joined by weld edges. This depends entirely on ϕ \phi ϕ . Let the fixed set S u f i x S_u^{\mathrm{fix}} S u fix consist of C u t r e e C_u^{\mathrm{tree}} C u tree and the vertices immediately across the welds incident to C u t r e e C_u^{\mathrm{tree}} C u tree . The fixed data on u u u is defined as
W u f i x ( ϕ ) : = ( C u t r e e , ϕ ∣ C u t r e e , ( v , ϕ ( v ) ) v ∈ S u f i x ∖ C u t r e e ) . W_u^{\mathrm{fix}}(\phi):=\left(C_u^{\mathrm{tree}},\phi|_{C_u^{\mathrm{tree}}},(v,\phi(v))_{v\in S_u^{\mathrm{fix}}\setminus C_u^{\mathrm{tree}}}\right). W u fix ( ϕ ) := ( C u tree , ϕ ∣ C u tree , ( v , ϕ ( v ) ) v ∈ S u fix ∖ C u tree ) .
While W u f i x W_u^{\mathrm{fix}} W u fix is a function of ϕ \phi ϕ as it specifies the entire tree component and adjacent points, we will omit ϕ \phi ϕ when it is implicit. The role of the fixed data is as a “starter” from which the rest of the database develops randomly. For example, if under ϕ \phi ϕ we have C 1 , ρ 1 , C 2 , ρ 2 , C 3 C_1,\rho_1,C_2,\rho_2,C_3 C 1 , ρ 1 , C 2 , ρ 2 , C 3 where C i C_i C i are tree components joined by the weld edges ρ 1 , ρ 2 \rho_1,\rho_2 ρ 1 , ρ 2 and u ∈ C 2 u\in C_2 u ∈ C 2 , W u f i x W_u^{\mathrm{fix}} W u fix fixes ρ 1 , C 2 , ρ 2 \rho_1,C_2,\rho_2 ρ 1 , C 2 , ρ 2 . On the other hand, apart from their fixed endpoints adjacent to C 2 C_2 C 2 , assignments in C 1 C_1 C 1 and C 3 C_3 C 3 are averaged according to the reference distribution we define below.
Next we define the weight distribution on all possible placements of the forest. Let H 1 , … , H k H_1,\ldots,H_k H 1 , … , H k be connected components of H H H , with vertex sets U 1 , … , U k U_1,\ldots,U_k U 1 , … , U k . Intuitively, for each recorded component H i H_i H i in the forest H H H , choose some root node, assign its location uniformly in V m i d ∪ V b d V_{\mathrm{mid}} \cup V_{\mathrm{bd}} V mid ∪ V bd and assign their children independently using Eq. (50) . Formally, the reference distribution μ i r e f ( ϕ ) \mu_i^{\mathrm{ref}}(\phi) μ i ref ( ϕ ) is defined as
μ i r e f ( ϕ ) : = 1 Z i r e f ∣ V m i d ∪ V b d ∣ ∏ u v ∈ E ( H i ) κ Color H ( u v ) ( ϕ ( u ) , ϕ ( v ) ) , (51) \mu_i^{\mathrm{ref}}(\phi) := \frac{1}{Z_i^{\mathrm{ref}} \lvert V_{\mathrm{mid}} \cup V_{\mathrm{bd}} \rvert} \prod_{uv \in E(H_i)} \kappa_{\operatorname{Color}_H(uv)}(\phi(u),\phi(v)), \tag*{(51)} μ i ref ( ϕ ) := Z i ref ∣ V mid ∪ V bd ∣ 1 uv ∈ E ( H i ) ∏ κ Color H ( uv ) ( ϕ ( u ) , ϕ ( v )) , (51)
where
Z i r e f : = 1 ∣ V m i d ∪ V b d ∣ ∑ ϕ : U i → V m i d ∪ V b d ∏ u v ∈ E ( H i ) κ Color H ( u v ) ( ϕ ( u ) , ϕ ( v ) ) Z_i^{\mathrm{ref}} := \frac{1}{\lvert V_{\mathrm{mid}} \cup V_{\mathrm{bd}} \rvert} \sum_{\phi:U_i \to V_{\mathrm{mid}} \cup V_{\mathrm{bd}}} \prod_{uv \in E(H_i)} \kappa_{\operatorname{Color}_H(uv)}(\phi(u),\phi(v)) Z i ref := ∣ V mid ∪ V bd ∣ 1 ϕ : U i → V mid ∪ V bd ∑ uv ∈ E ( H i ) ∏ κ Color H ( uv ) ( ϕ ( u ) , ϕ ( v ))
is the probability that every requested edge is permuted. When H i H_i H i consists of a single vertex, use the uniform distribution on [ M ] [M] [ M ] . Let μ r e f \mu^{\mathrm{ref}} μ ref be the product of these distributions over the trees in H H H . Next, we define restrictions on the assignments ϕ \phi ϕ .
Good space. Next we define good assignments ϕ \phi ϕ and the good space associated with them. Fix some set of boundary vertices B B B such that V b d ⊆ B ⊆ ( V m i d ∪ V b d ) ∖ V w e l d V_{\mathrm{bd}} \subseteq B \subseteq(V_{\mathrm{mid}} \cup V_{\mathrm{bd}}) \setminus V_{\mathrm{weld}} V bd ⊆ B ⊆ ( V mid ∪ V bd ) ∖ V weld . In each connected component H i H_i H i , only some chosen tree component may be assigned to vertices in B B B , meaning that it is the only way the connected component escapes.
For each connected component H i H_i H i in H H H , choose a vertex u i u_i u i and fix the data w i = W u i f i x ( ϕ ) w_i = W^{\mathrm{fix}}_{u_i}(\phi) w i = W u i fix ( ϕ ) . Their collection over H H H with k k k connected components forms a description D D D ,
D : = ( B , H , ( u i , w i ) i ∈ [ k ] ) . D := (B,H,(u_i,w_i)_{i\in[k]}). D := ( B , H , ( u i , w i ) i ∈ [ k ] ) .
The assignments to the remaining vertices are free. We say an assignment is good for D D D , denoted by G D ( ϕ ) G_D(\phi) G D ( ϕ ) , if it satisfies the following conditions:
G D ( ϕ ) : = 1 [ μ r e f ( ϕ ) > 0 , W u i f i x ( ϕ ) = w i for every i ϕ ( U i ∖ C u i t r e e ) ∩ B = ∅ for every i ϕ ( u ) ≠ ϕ ( v ) for all distinct u , v ∈ U ] . (52) G_D(\phi) := \mathbf{1}\left[
\begin{aligned}
&\mu^{\mathrm{ref}}(\phi)>0,\\
&W^{\mathrm{fix}}_{u_i}(\phi)=w_i &&\text{for every }i\\
&\phi(U_i\setminus C^{\mathrm{tree}}_{u_i})\cap B=\varnothing&&\text{for every }i\\
&\phi(u)\ne\phi(v) &&\text{for all distinct }u,v\in U
\end{aligned}
\right]. \tag*{(52)} G D ( ϕ ) := 1 μ ref ( ϕ ) > 0 , W u i fix ( ϕ ) = w i ϕ ( U i ∖ C u i tree ) ∩ B = ∅ ϕ ( u ) = ϕ ( v ) for every i for every i for all distinct u , v ∈ U . (52)
Each good assignment can be mapped to a unique database I ϕ = ( L ϕ , C ϕ ) I_\phi=(L_\phi,C_\phi) I ϕ = ( L ϕ , C ϕ ) . Specifically, every labeled vertex u u u has L ϕ ( ϕ ( u ) ) = λ H ( u ) L_\phi(\phi(u))=\lambda_H(u) L ϕ ( ϕ ( u )) = λ H ( u ) , while every abstract edge u v uv uv of color α \alpha α contributes to C ϕ C_\phi C ϕ with values in e α ( ϕ ( u ) ) e_\alpha(\phi(u)) e α ( ϕ ( u )) and e α ( ϕ ( v ) ) e_\alpha(\phi(v)) e α ( ϕ ( v )) going from tail to head. Furthermore, the empty database ∣ ⊥ ⟩ I \lvert\perp\rangle_I ∣ ⊥ ⟩ I is good and any database I I I such that ∣ I ∣ ≤ t \lvert I\rvert\le t ∣ I ∣ ≤ t and does not contain a cycle or a parallel edge can be represented by an abstract forest with ∣ U ∣ ≤ 2 t \lvert U\rvert\le2t ∣ U ∣ ≤ 2 t .
The canonical good vector for D D D is a sum over its good assignments weighted using the reference probability,
∣ g D ⟩ : = ∑ ϕ : G D ( ϕ ) = 1 μ r e f ( ϕ ) ∣ L ϕ , C ϕ ⟩ L C . \lvert g_D\rangle:= \sum_{\phi:G_D(\phi)=1} \sqrt{\mu^{\mathrm{ref}}(\phi)}\lvert L_\phi,C_\phi\rangle_{\mathrm{LC}}. ∣ g D ⟩ := ϕ : G D ( ϕ ) = 1 ∑ μ ref ( ϕ ) ∣ L ϕ , C ϕ ⟩ LC .
Here, the fixed data remains fixed, while the rest of the assignments vary. For databases I I I such that ∣ I ∣ ≤ t \lvert I\rvert\le t ∣ I ∣ ≤ t , the good space is the span of ∣ g D ⟩ \lvert g_D\rangle ∣ g D ⟩ with some specified boundary B B B and ∣ E ( H ) ∣ + ∣ Dom ( λ H ) ∣ ≤ t \lvert E(H)\rvert+\lvert\operatorname{Dom}(\lambda_H)\rvert\le t ∣ E ( H )∣ + ∣ Dom ( λ H )∣ ≤ t . The projector on this space Π t g o o d ( B ) \Pi_t^{\mathrm{good}}(B) Π t good ( B ) is the orthogonal projector onto this span and Π t g o o d : = Π t g o o d ( V b d ) \Pi_t^{\mathrm{good}}:=\Pi_t^{\mathrm{good}}(V_{\mathrm{bd}}) Π t good := Π t good ( V bd ) . Note that different descriptions may have overlapping good vectors, so the good vectors are not necessarily orthogonal. Notice that good assignments cannot cross from col ( n − l − 1 ) \operatorname{col}(n-l-1) col ( n − l − 1 ) to col ( n + l + 1 ) \operatorname{col}(n+l+1) col ( n + l + 1 ) , implying that,
Π C r o s s Π t g o o d = 0. (53) \Pi_{\mathrm{Cross}}\Pi_t^{\mathrm{good}}=0. \tag*{(53)} Π Cross Π t good = 0. (53)
Next, we describe the linear combinations of the canonical good vectors using functions of the assignments. First, partition assignments by the set F i b d = { u ∈ U i : ϕ ( u ) ∈ B } F_i^{\mathrm{bd}}=\{u\in U_i:\phi(u)\in B\} F i bd = { u ∈ U i : ϕ ( u ) ∈ B } placed in the boundary B B B . Let μ i , F i b d r e f \mu_{i,F_i^{\mathrm{bd}}}^{\mathrm{ref}} μ i , F i bd ref be μ i r e f \mu_i^{\mathrm{ref}} μ i ref conditioned on F i b d F_i^{\mathrm{bd}} F i bd . Fix some recorded component H i H_i H i and F = F i b d F=F_i^{\mathrm{bd}} F = F i bd . A coefficient function f f f assigns a complex coefficient f ( ϕ ) f(\phi) f ( ϕ ) to each assignment ϕ \phi ϕ of H i H_i H i . We measure f f f using the squared norm,
∥ f ∥ 2 = E μ i , F r e f ∥ f ( ϕ ) ∥ 2 . (54) \lVert f\rVert^2=\mathbb{E}_{\mu_{i,F}^{\mathrm{ref}}}\lVert f(\phi)\rVert^2. \tag*{(54)} ∥ f ∥ 2 = E μ i , F ref ∥ f ( ϕ ) ∥ 2 . (54)
These functions describe how the canonical good vectors are combined. We define S i , F S_{i,F} S i , F to be the space of allowed coefficient functions,
S i , ∅ = { ∑ u ∈ U i h u ( W u f i x ) : h u arbitrary complex-valued function } S i , F = { 1 [ F ⊆ C c t r e e ] h ( W c f i x ) : h arbitrary complex-valued function } ( c ∈ F ) . (55) \begin{aligned}
S_{i,\varnothing}&=\left\{\sum_{u\in U_i}h_u(W_u^{\mathrm{fix}}):h_u\text{ arbitrary complex-valued function}\right\}\\
S_{i,F}&=\left\{\mathbb{1}[F\subseteq C_c^{\mathrm{tree}}]h(W_c^{\mathrm{fix}}):h\text{ arbitrary complex-valued function}\right\}\quad(c\in F). \tag*{(55)}
\end{aligned} S i , ∅ S i , F = { u ∈ U i ∑ h u ( W u fix ) : h u arbitrary complex-valued function } = { 1 [ F ⊆ C c tree ] h ( W c fix ) : h arbitrary complex-valued function } ( c ∈ F ) . (55)
The key point is that each h h h depends only on its fixed data. The indicator in the second expression requires all of F F F to lie in one tree component, so it does not depend on which c ∈ F c\in F c ∈ F is used. For the entire forest H H H , let S = ⨂ i S i , F i b d S=\bigotimes_i S_{i,F_i^{\mathrm{bd}}} S = ⨂ i S i , F i bd . This allows arbitrary coefficients in the fixed data of recorded components and algorithm registers.
For some fixed sets F i b d F_i^{\mathrm{bd}} F i bd , let μ = ⨂ i μ i , F i b d r e f \mu=\bigotimes_i\mu_{i,F_i^{\mathrm{bd}}}^{\mathrm{ref}} μ = ⨂ i μ i , F i bd ref . In order to remove assignments that do not keep the database injective, we use the following projector Π i n j \Pi^{\mathrm{inj}} Π inj
( Π i n j f ) ( ϕ ) : = 1 [ ϕ is injective on U ] f ( ϕ ) . (\Pi^{\mathrm{inj}}f)(\phi):=\mathbb{1}[\phi\text{ is injective on }U]f(\phi). ( Π inj f ) ( ϕ ) := 1 [ ϕ is injective on U ] f ( ϕ ) .
The corresponding vector z z z related to this assignment would be written as,
z = ∑ ϕ i n j e c t i v e μ ( ϕ ) f ( ϕ ) ∣ ϕ ⟩ z=\sum_{\phi\ \mathrm{injective}}\sqrt{\mu(\phi)}f(\phi)|\phi\rangle z = ϕ injective ∑ μ ( ϕ ) f ( ϕ ) ∣ ϕ ⟩
Writing ∥ f ∥ μ 2 : = ∑ ϕ μ ( ϕ ) ∣ f ( ϕ ) ∣ 2 \lVert f\rVert_\mu^2:=\sum_\phi\mu(\phi)|f(\phi)|^2 ∥ f ∥ μ 2 := ∑ ϕ μ ( ϕ ) ∣ f ( ϕ ) ∣ 2 for the coefficient norm, we have ∥ z ∥ 2 = ∥ Π i n j f ∥ μ 2 ≤ ∥ f ∥ μ 2 \lVert z\rVert^2=\lVert\Pi^{\mathrm{inj}}f\rVert_\mu^2\le\lVert f\rVert_\mu^2 ∥ z ∥ 2 = ∥ Π inj f ∥ μ 2 ≤ ∥ f ∥ μ 2 . The span of these vectors over all forests with at most t t t records and all choices of vertices assigned to some fixed boundary set B B B represents the good space. Equivalently, the good space G B G_B G B defined above may be written as
G B ( t ) = Span { ∑ ϕ i n j e c t i v e ∀ i , { u ∈ U i : ϕ ( u ) ∈ B } = F i μ ( ϕ ) f ( ϕ ) ∣ I ϕ ⟩ : ∣ E ( H ) ∣ + ∣ Dom ( λ H ) ∣ ≤ t , f ∈ S } . G_B(t)=\operatorname{Span}\left\{\sum_{\substack{\phi\ \mathrm{injective}\\\forall i,\{u\in U_i:\phi(u)\in B\}=F_i}}\sqrt{\mu(\phi)}f(\phi)|I_\phi\rangle:\lvert E(H)\rvert+\lvert\operatorname{Dom}(\lambda_H)\rvert\le t,\ f\in S\right\}. G B ( t ) = Span ⎩ ⎨ ⎧ ϕ injective ∀ i , { u ∈ U i : ϕ ( u ) ∈ B } = F i ∑ μ ( ϕ ) f ( ϕ ) ∣ I ϕ ⟩ : ∣ E ( H )∣ + ∣ Dom ( λ H )∣ ≤ t , f ∈ S ⎭ ⎬ ⎫ .
The remainder of the section is concerned with useful statements about the good space. We may notice that the same good state can be described using vertex assignments ϕ \phi ϕ or a database without changing its norm.
Observation 4.2. Let Aut ( H ) \operatorname{Aut}(H) Aut ( H ) be the color and label preserving automorphism group of H H H . The subspace of good assignment vectors fixed by every element of Aut ( H ) \operatorname{Aut}(H) Aut ( H ) is isometric to the corresponding good database space.
Proof. Injective assignments give the same database exactly when they differ by an automorphism of H H H . Thus the map
1 ∣ Aut ( H ) ∣ ∑ γ ∈ Aut ( H ) ∣ γ ϕ ⟩ ⟼ ∣ I ϕ ⟩ \frac{1}{\sqrt{|\operatorname{Aut}(H)|}}\sum_{\gamma\in\operatorname{Aut}(H)}|\gamma\phi\rangle\longmapsto|I_\phi\rangle ∣ Aut ( H ) ∣ 1 γ ∈ Aut ( H ) ∑ ∣ γ ϕ ⟩ ⟼ ∣ I ϕ ⟩
is an isometry on invariant vectors. Renaming preserves the reference weights and permutes the good generators, so this map identifies the good spaces. Distinct isomorphism classes of H H H have disjoint database supports.
Next, we bound the probability that an averaged branch reaches the boundary or repeats a vertex, meaning that the assignment stops being good. Let m i = ∣ U i ∣ m_i = |U_i| m i = ∣ U i ∣ and m = ∑ i m i m = \sum_i m_i m = ∑ i m i . We may assume that m = O ( q ) m = O(q) m = O ( q ) . We use X u X_u X u to be the random variable representing the assignment ϕ ( u ) \phi(u) ϕ ( u ) . For A ⊆ U A \subseteq U A ⊆ U , write X A = ( X u ) u ∈ A X_A = (X_u)_{u \in A} X A = ( X u ) u ∈ A . Additionally, for the rest of the section, we assume that
4 m ∣ B ∣ N ≤ 1 2 . (56) \frac{4m|B|}{N} \le\frac{1}{2}. \tag*{(56)} N 4 m ∣ B ∣ ≤ 2 1 . (56)
Lemma 4.3. Fix some W u f i x W_u^{\mathrm{fix}} W u fix and suppose that all boundary vertices belong to C u t r e e C_u^{\mathrm{tree}} C u tree . Then every free vertex a ∈ U a \in U a ∈ U and structural vertex x x x satisfy
Pr [ X a = x ∣ W u f i x ] = O ( 1 N ) . \Pr[X_a = x \mid W_u^{\mathrm{fix}}] = O\left(\frac{1}{N}\right). Pr [ X a = x ∣ W u fix ] = O ( N 1 ) . For distinct a , b ∈ U a,b \in U a , b ∈ U with at least one outside of S u f i x S_u^{\mathrm{fix}} S u fix ,
Pr [ X a = X b ∣ W u f i x ] = O ( n N ) . \Pr[X_a = X_b \mid W_u^{\mathrm{fix}}] = O\left(\frac{n}{N}\right). Pr [ X a = X b ∣ W u fix ] = O ( N n ) . If one of the two vertices is fixed or they lie in different connected components of H ∖ C u t r e e H \setminus C_u^{\mathrm{tree}} H ∖ C u tree , the bound is O ( 1 / N ) O(1/N) O ( 1/ N ) .
Proof. Fix W u f i x W_u^{\mathrm{fix}} W u fix throughout and condition all probabilities below on it. Until the final paragraph, ignore the requirement that free vertices avoid B B B and count only vertices that have been assigned. By Eq. (51) , the connected components of H i ∖ C u t r e e H_i \setminus C_u^{\mathrm{tree}} H i ∖ C u tree are independent. Root each connected component at its fixed weld endpoint and assign each child independently using Eq. (50) , stopping the assignment beyond an edge if it is not permuted. Other connected components start from uniform roots, as in the reference distribution.
By Theorem 3.2 and Eq. (22) , the first step from each fixed root is uniform on at least N / 4 N/4 N /4 vertices. This bound is preserved by every later step. Specifically, if w w w is a child of v v v along an edge of color β \beta β , then
Pr [ X w = y ] = ∑ x Pr [ X v = x ] κ β ( x , y ) ≤ 4 N ∑ x κ β ( x , y ) ≤ 4 N . \Pr[X_w = y] = \sum_x \Pr[X_v = x]\kappa_\beta(x,y) \le\frac{4}{N}\sum_x \kappa_\beta(x,y) \le\frac{4}{N}. Pr [ X w = y ] = x ∑ Pr [ X v = x ] κ β ( x , y ) ≤ N 4 x ∑ κ β ( x , y ) ≤ N 4 .
Hence every free vertex has point probabilities at most 4 / N 4/N 4/ N .
Next, suppose that a , b a,b a , b lie in the same connected component of H ∖ C u t r e e H \setminus C_u^{\mathrm{tree}} H ∖ C u tree and let d d d be their nearest common ancestor. Without loss of generality assume a ≠ d a \ne d a = d . Given X d = x X_d = x X d = x , let c c c be the class of the first edge towards a a a . If this edge is not permuted, a a a is not assigned. Otherwise, the point-bound argument gives
max y Pr [ X a = y ∣ X d = x ] ≤ 1 ∣ E c ∣ . \max_y \Pr[X_a = y \mid X_d = x] \le\frac{1}{|E_c|}. y max Pr [ X a = y ∣ X d = x ] ≤ ∣ E c ∣ 1 .
The two paths are independent given X d X_d X d , with X b X_b X b fixed when b = d b=d b = d . Hence
Pr [ X a = X b ∣ X d = x ] = ∑ y Pr [ X a = y ∣ X d = x ] Pr [ X b = y ∣ X d = x ] ≤ max y Pr [ X a = y ∣ X d = x ] ≤ 1 ∣ E c ∣ . \Pr[X_a = X_b \mid X_d = x] = \sum_y \Pr[X_a = y \mid X_d = x]\Pr[X_b = y \mid X_d = x]
\le\max_y \Pr[X_a = y \mid X_d = x] \le\frac{1}{|E_c|}. Pr [ X a = X b ∣ X d = x ] = y ∑ Pr [ X a = y ∣ X d = x ] Pr [ X b = y ∣ X d = x ] ≤ y max Pr [ X a = y ∣ X d = x ] ≤ ∣ E c ∣ 1 .
If d d d is free, its point probabilities are at most 4 / N 4/N 4/ N by the argument above. For the color of the first edge, each class c c c has at most 2 ∣ E c ∣ 2|E_c| 2∣ E c ∣ possible locations for X d X_d X d . Grouping these locations by class gives
Pr [ X a = X b ] = ∑ x Pr [ X d = x ] Pr [ X a = X b ∣ X d = x ] ≤ 4 N ∑ c ∈ B e d g e 2 ∣ E c ∣ ∣ E c ∣ = O ( n N ) . \Pr[X_a = X_b] = \sum_x \Pr[X_d = x]\Pr[X_a = X_b \mid X_d = x]
\le\frac{4}{N}\sum_{c \in B_{\mathrm{edge}}}\frac{2|E_c|}{|E_c|} = O\left(\frac{n}{N}\right). Pr [ X a = X b ] = x ∑ Pr [ X d = x ] Pr [ X a = X b ∣ X d = x ] ≤ N 4 c ∈ B edge ∑ ∣ E c ∣ 2∣ E c ∣ = O ( N n ) .
If d d d is the fixed root, then ∣ E c ∣ ≥ N / 4 |E_c| \ge N/4 ∣ E c ∣ ≥ N /4 , giving O ( 1 / N ) O(1/N) O ( 1/ N ) . The point bound also gives O ( 1 / N ) O(1/N) O ( 1/ N ) when one vertex is fixed, or when the two vertices lie in different connected components of H ∖ C u t r e e H \setminus C_u^{\mathrm{tree}} H ∖ C u tree .
Finally, let E \mathcal{E} E be the event that all free vertices are assigned and avoid B B B . Assignment can fail only after a visit to V b d ⊆ B V_{\mathrm{bd}} \subseteq B V bd ⊆ B , so the union bound combined with Eq. (56) gives
Pr [ E ] ≥ 1 − 4 m ∣ B ∣ N ≥ 1 2 . \Pr[\mathcal{E}] \ge1-\frac{4m|B|}{N} \ge\frac{1}{2}. Pr [ E ] ≥ 1 − N 4 m ∣ B ∣ ≥ 2 1 .
The required distribution is obtained by conditioning on E \mathcal{E} E . Therefore,
Pr [ X a = x ∣ E ] ≤ 2 Pr [ X a = x ] ≤ 8 N , \Pr[X_a=x\mid\mathcal{E}] \le2\Pr[X_a=x] \le\frac{8}{N}, Pr [ X a = x ∣ E ] ≤ 2 Pr [ X a = x ] ≤ N 8 ,
Pr [ X a = X b ∣ E ] ≤ 2 Pr [ X a = X b ] = O ( n N ) , \Pr[X_a=X_b\mid\mathcal{E}] \le2\Pr[X_a=X_b] = O\left(\frac{n}{N}\right), Pr [ X a = X b ∣ E ] ≤ 2 Pr [ X a = X b ] = O ( N n ) ,
and the sharper O ( 1 / N ) O(1/N) O ( 1/ N ) bounds are preserved as well.
The bounds in Theorem 4.3 also apply to the coefficients depending on the fixed data. For some coefficient function f f f that depends only on W u f i x W_u^{\mathrm{fix}} W u fix and an event E \mathcal{E} E such that Pr [ E ∣ W u f i x ] ≤ ϵ \Pr[\mathcal{E}\mid W_u^{\mathrm{fix}}]\le\epsilon Pr [ E ∣ W u fix ] ≤ ϵ for every W u f i x W_u^{\mathrm{fix}} W u fix with nonzero probability,
E [ 1 [ E ] ∥ f ∥ 2 ] ≤ ϵ ∥ f ∥ 2 . \mathbb{E}[\mathbb{1}[\mathcal{E}]\|f\|^2]\le\epsilon\|f\|^2. E [ 1 [ E ] ∥ f ∥ 2 ] ≤ ϵ ∥ f ∥ 2 .
Next we show how the coefficient functions behave across a single recorded component. In the next statement, given a vertex v v v in a tree, we will use par ( v ) \operatorname{par}(v) par ( v ) to denote the parent of v v v and U v d e s c U_v^{\mathrm{desc}} U v desc to denote the descendants of v v v , inclusive.
Lemma 4.4. Fix some H i H_i H i whose root is the vertex a a a and suppose that F i b d = ∅ F_i^{\mathrm{bd}}=\varnothing F i bd = ∅ . Then every f ∈ S i , ∅ f\in S_{i,\varnothing} f ∈ S i , ∅ has a unique decomposition f = ∑ v ∈ U i f v f=\sum_{v\in U_i}f_v f = ∑ v ∈ U i f v where each f v f_v f v depends only on W v f i x W_v^{\mathrm{fix}} W v fix . Moreover, for every v ≠ a v\ne a v = a , f v = 0 f_v=0 f v = 0 unless the edge ( par ( v ) , v ) (\operatorname{par}(v),v) ( par ( v ) , v ) crosses the weld and
E [ f v ∣ X par ( v ) , X v ] = 0 , E [ f v ∣ X U i ∖ U v d e s c , X v ] = 0. (57) \mathbb{E}[f_v\mid X_{\operatorname{par}(v)},X_v]=0,
\qquad
\mathbb{E}[f_v\mid X_{U_i\setminus U_v^{\mathrm{desc}}},X_v]=0. \tag*{(57)} E [ f v ∣ X par ( v ) , X v ] = 0 , E [ f v ∣ X U i ∖ U v desc , X v ] = 0. (57) The terms are pairwise orthogonal and remain so after multiplication by any function of W a f i x W_a^{\mathrm{fix}} W a fix . The statement also holds for vector-valued coefficients.
Proof. All expectations are with respect to μ i r e f \mu_i^{\mathrm{ref}} μ i ref . By Eq. (51) , fixing the endpoints of a weld edge makes the assignments on its two sides independent. Conditioning on F i b d = ∅ F_i^{\mathrm{bd}}=\varnothing F i bd = ∅ preserves this independence, since it requires the vertices on each side to avoid B B B separately.
By the definition of S i , ∅ S_{i,\varnothing} S i , ∅ in Eq. (55) , it suffices to decompose a function h ( W u f i x ) h(W_u^{\mathrm{fix}}) h ( W u fix ) . Split this function according to the vertex of C u t r e e C_u^{\mathrm{tree}} C u tree closest to a a a as h ( W u f i x ) = ∑ v ∈ U i g v h(W_u^{\mathrm{fix}})=\sum_{v\in U_i}g_v h ( W u fix ) = ∑ v ∈ U i g v with
g v : = 1 [ v is the vertex of C u t r e e closest to a ] h ( W u f i x ) . g_v:=\mathbb{1}[v\text{ is the vertex of }C_u^{\mathrm{tree}}\text{ closest to }a]h(W_u^{\mathrm{fix}}). g v := 1 [ v is the vertex of C u tree closest to a ] h ( W u fix ) .
Fix v v v and write g = g v g=g_v g = g v . This function depends only on W v f i x W_v^{\mathrm{fix}} W v fix , since W u f i x = W v f i x W_u^{\mathrm{fix}}=W_v^{\mathrm{fix}} W u fix = W v fix on this part. If v = a v=a v = a , add g g g to f a f_a f a . Otherwise, g g g is zero unless ( par ( v ) , v ) (\operatorname{par}(v),v) ( par ( v ) , v ) is a weld edge. Let
g ˉ : = 1 [ ( par ( v ) , v ) is a weld edge ] E [ g ∣ X par ( v ) , X v , ( par ( v ) , v ) is a weld edge ] . \bar{g}:=\mathbb{1}[(\operatorname{par}(v),v)\text{ is a weld edge}]\mathbb{E}[g\mid X_{\operatorname{par}(v)},X_v,(\operatorname{par}(v),v)\text{ is a weld edge}]. g ˉ := 1 [( par ( v ) , v ) is a weld edge ] E [ g ∣ X par ( v ) , X v , ( par ( v ) , v ) is a weld edge ] .
Add g − g ˉ g-\bar{g} g − g ˉ to f v f_v f v . This difference depends only on W v f i x W_v^{\mathrm{fix}} W v fix and has the required conditional mean zero. The remaining function g ˉ \bar{g} g ˉ depends only on W par ( v ) f i x W_{\operatorname{par}(v)}^{\mathrm{fix}} W par ( v ) fix , which determines whether the edge is a weld edge and, when it is, both endpoints. Repeat the splitting and subtraction with g ˉ \bar{g} g ˉ . Each new index lies strictly closer to a a a , so the procedure terminates at a a a . Adding the resulting terms gives the decomposition and the first conditional expectation identity.
For the second identity, suppose that ( par ( v ) , v ) (\operatorname{par}(v),v) ( par ( v ) , v ) is a weld edge. Then C v t r e e ⊆ U v d e s c C_v^{\mathrm{tree}}\subseteq U_v^{\mathrm{desc}} C v tree ⊆ U v desc , and the only assignment outside U v d e s c U_v^{\mathrm{desc}} U v desc included in W v f i x W_v^{\mathrm{fix}} W v fix is X par ( v ) X_{\operatorname{par}(v)} X par ( v ) . By the independence above,
E [ f v ∣ X U i ∖ U v d e s c , X v ] = E [ f v ∣ X par ( v ) , X v , ( par ( v ) , v ) is a weld edge ] = 0. \mathbb{E}[f_v\mid X_{U_i\setminus U_v^{\mathrm{desc}}},X_v]
=\mathbb{E}[f_v\mid X_{\operatorname{par}(v)},X_v,(\operatorname{par}(v),v)\text{ is a weld edge}]=0. E [ f v ∣ X U i ∖ U v desc , X v ] = E [ f v ∣ X par ( v ) , X v , ( par ( v ) , v ) is a weld edge ] = 0.
This quantity also vanishes when the edge is not a weld edge, since f v = 0 f_v=0 f v = 0 there.
Finally, take distinct v , w v,w v , w , with v v v at least as far from a a a as w w w . When ( par ( v ) , v ) (\operatorname{par}(v),v) ( par ( v ) , v ) is a weld edge, w w w lies outside U v d e s c U_v^{\mathrm{desc}} U v desc , so f v f_v f v and W a f i x W_a^{\mathrm{fix}} W a fix depend only on X U i ∖ U v d e s c X_{U_i\setminus U_v^{\mathrm{desc}}} X U i ∖ U v desc and X v X_v X v . Since f v f_v f v is zero otherwise, every function ψ ( W a f i x ) \psi(W_a^{\mathrm{fix}}) ψ ( W a fix ) satisfies
E [ ∣ ψ ( W a f i x ) ∣ 2 ⟨ f v , f w ⟩ ] = E [ ∣ ψ ( W a f i x ) ∣ 2 ⟨ E [ f v ∣ X U i ∖ U v d e s c , X v ] , f w ⟩ ] = 0. \mathbb{E}\left[\left|\psi(W_a^{\mathrm{fix}})\right|^2\langle f_v,f_w\rangle\right]=\mathbb{E}\left[\left|\psi(W_a^{\mathrm{fix}})\right|^2\left\langle\mathbb{E}\left[f_v\mid X_{U_i\setminus U_v^{\mathrm{desc}}},X_v\right],f_w\right\rangle\right]=0. E [ ψ ( W a fix ) 2 ⟨ f v , f w ⟩ ] = E [ ψ ( W a fix ) 2 ⟨ E [ f v ∣ X U i ∖ U v desc , X v ] , f w ⟩ ] = 0.
Taking ψ = 1 \psi=1 ψ = 1 gives orthogonality, and arbitrary ψ \psi ψ gives the claimed orthogonality after multiplication by any function of W a f i x W_a^{\mathrm{fix}} W a fix . Applying orthogonality to the difference of two such decompositions proves uniqueness. The same argument applies to vector-valued coefficients, using their inner product in the last calculation. □
In order to analyze a query at an abstract vertex a a a , we need to know whether its location is in a term’s fixed data W u f i x W_u^{\mathrm{fix}} W u fix . If it is not, Theorem 4.3 bounds its distribution. If it is, the orthogonal decomposition in Theorem 4.4 lets us analyze the terms separately and combine their estimate without introducing a factor for the number of terms.
For some distinct abstract vertices a , b a,b a , b , let ( Π a b c o i n f ) ( ϕ ) : = 1 [ ϕ ( a ) = ϕ ( b ) ] f ( ϕ ) (\Pi_{ab}^{\mathrm{coin}}f)(\phi):=\mathbf{1}[\phi(a)=\phi(b)]f(\phi) ( Π ab coin f ) ( ϕ ) := 1 [ ϕ ( a ) = ϕ ( b )] f ( ϕ ) be the coincidence projector on coefficient functions. If some ϕ \phi ϕ is not injective, it must have a coincidence, meaning that
1 − Π i n j ⪯ ∑ { a , b } Π a b c o i n . (58) 1-\Pi^{\mathrm{inj}}\preceq\sum_{\{a,b\}}\Pi_{ab}^{\mathrm{coin}}. \tag*{(58)} 1 − Π inj ⪯ { a , b } ∑ Π ab coin . (58)
Notice that since f f f is an arbitrary coefficient function, it may imply collisions ϕ ( a ) = ϕ ( b ) \phi(a)=\phi(b) ϕ ( a ) = ϕ ( b ) , meaning that it may be annihilated by Π i n j \Pi^{\mathrm{inj}} Π inj . To distinguish from this possibility, we will be concerned with the orthogonal complement of ker ( Π i n j ∣ S ) = { h ∈ S : Π i n j h = 0 } \ker(\Pi^{\mathrm{inj}}|_S)=\{h\in S:\Pi^{\mathrm{inj}}h=0\} ker ( Π inj ∣ S ) = { h ∈ S : Π inj h = 0 } .
Lemma 4.5. Let ∣ U ∣ = m |U|=m ∣ U ∣ = m and f ∈ S ∩ ( ker ( Π i n j ∣ S ) ) ⊥ f\in S\cap(\ker(\Pi^{\mathrm{inj}}|_S))^\perp f ∈ S ∩ ( ker ( Π inj ∣ S ) ) ⊥ . Then,
∥ ( 1 − Π i n j ) f ∥ 2 = O ( ( n + 1 ) m 3 N ) ∥ f ∥ 2 ≤ 1 2 ∥ f ∥ 2 \left\|(1-\Pi^{\mathrm{inj}})f\right\|^2=O\left(\frac{(n+1)m^3}{N}\right)\|f\|^2\leq\frac{1}{2}\|f\|^2 ( 1 − Π inj ) f 2 = O ( N ( n + 1 ) m 3 ) ∥ f ∥ 2 ≤ 2 1 ∥ f ∥ 2 for sufficiently large n n n . Furthermore, every coefficient function h ∈ Π i n j S h\in\Pi^{\mathrm{inj}}S h ∈ Π inj S has a unique f ∈ S ∩ ( ker ( Π i n j ∣ S ) ) ⊥ f\in S\cap(\ker(\Pi^{\mathrm{inj}}|_S))^\perp f ∈ S ∩ ( ker ( Π inj ∣ S ) ) ⊥ such that Π i n j f = h \Pi^{\mathrm{inj}}f=h Π inj f = h and ∥ f ∥ 2 ≤ 2 ∥ h ∥ 2 \|f\|^2\leq2\|h\|^2 ∥ f ∥ 2 ≤ 2∥ h ∥ 2 .
Proof. First we prove the following bounds for distinct abstract vertices a , b a,b a , b ,
∥ Π a b c o i n f ∥ 2 = O ( ( n + 1 ) m i N ) ∥ f ∥ 2 ( a , b ∈ U i ) , (59) \left\|\Pi_{ab}^{\mathrm{coin}}f\right\|^2=O\left(\frac{(n+1)m_i}{N}\right)\|f\|^2\qquad(a,b\in U_i), \tag*{(59)} Π ab coin f 2 = O ( N ( n + 1 ) m i ) ∥ f ∥ 2 ( a , b ∈ U i ) , (59) ∥ Π a b c o i n f ∥ 2 = O ( 1 N ) ∥ f ∥ 2 ( a ∈ U i , b ∈ U j , i ≠ j ) . (60) \left\|\Pi_{ab}^{\mathrm{coin}}f\right\|^2=O\left(\frac{1}{N}\right)\|f\|^2\qquad(a\in U_i,\ b\in U_j,\ i\ne j). \tag*{(60)} Π ab coin f 2 = O ( N 1 ) ∥ f ∥ 2 ( a ∈ U i , b ∈ U j , i = j ) . (60) Afterwards, we sum these bounds over all pairs using Eq. (58) . First consider the case when a , b ∈ U i a,b\in U_i a , b ∈ U i . If F i b d = ∅ F_i^{\mathrm{bd}}=\varnothing F i bd = ∅ , apply Theorem 4.4 with root a a a , keeping the assignments in the other connected components in the coefficients. This gives f = ∑ v f v f=\sum_v f_v f = ∑ v f v with at most m i m_i m i orthogonal terms, each depending on the assignments in H i H_i H i only through W v f i x W_v^{\mathrm{fix}} W v fix . If F i b d ≠ ∅ F_i^{\mathrm{bd}}\ne\varnothing F i bd = ∅ , use the single term f c = f f_c=f f c = f for some c ∈ F i b d c\in F_i^{\mathrm{bd}} c ∈ F i bd , as in Eq. (55) .
When both a , b ∈ S v f i x a,b\in S_v^{\mathrm{fix}} a , b ∈ S v fix , their coincidence is determined by W v f i x W_v^{\mathrm{fix}} W v fix . Therefore, Π a b c o i n 1 [ a , b ∈ S v f i x ] f v \Pi_{ab}^{\mathrm{coin}}\mathbf{1}[a,b\in S_v^{\mathrm{fix}}]f_v Π ab coin 1 [ a , b ∈ S v fix ] f v still belongs to S S S and is annihilated by Π i n j \Pi^{\mathrm{inj}} Π inj . It lies in ker ( Π i n j ∣ S ) \ker(\Pi^{\mathrm{inj}}|_S) ker ( Π inj ∣ S ) , so it is orthogonal to f f f . In the remaining part, at most one vertex is free, and Theorem 4.3 bounds the conditional probability of a coincidence by O ( ( n + 1 ) / N ) O((n+1)/N) O (( n + 1 ) / N ) . Thus, by Cauchy–Schwarz,
∥ Π a b c o i n f ∥ 2 = ⟨ Π a b c o i n f , ∑ v Π a b c o i n 1 [ { a , b } ⊈ S v f i x ] f v ⟩ \left\|\Pi_{ab}^{\mathrm{coin}}f\right\|^2
=
\left\langle\Pi_{ab}^{\mathrm{coin}}f,\sum_v\Pi_{ab}^{\mathrm{coin}}\mathbf{1}[\{a,b\}\not\subseteq S_v^{\mathrm{fix}}]f_v\right\rangle Π ab coin f 2 = ⟨ Π ab coin f , v ∑ Π ab coin 1 [{ a , b } ⊆ S v fix ] f v ⟩ ≤ ∥ Π a b c o i n f ∥ ( m i ∑ v ∥ Π a b c o i n 1 [ { a , b } ⊈ S v f i x ] f v ∥ 2 ) 1 / 2 \leq
\left\|\Pi_{ab}^{\mathrm{coin}}f\right\|
\left(m_i\sum_v\left\|\Pi_{ab}^{\mathrm{coin}}\mathbf{1}[\{a,b\}\not\subseteq S_v^{\mathrm{fix}}]f_v\right\|^2\right)^{1/2} ≤ Π ab coin f ( m i v ∑ Π ab coin 1 [{ a , b } ⊆ S v fix ] f v 2 ) 1/2 ≤ O ( ( n + 1 ) m i N ) ∥ Π a b c o i n f ∥ ∥ f ∥ . \leq O\left(\sqrt{\frac{(n+1)m_i}{N}}\right)\left\|\Pi_{ab}^{\mathrm{coin}}f\right\|\|f\|. ≤ O ( N ( n + 1 ) m i ) Π ab coin f ∥ f ∥.
where we used ∑ v ∥ f v ∥ 2 = ∥ f ∥ 2 \sum_v \lVert f_v\rVert^2=\lVert f\rVert^2 ∑ v ∥ f v ∥ 2 = ∥ f ∥ 2 . This implies Eq. (59) .
Next, suppose that a ∈ U i a\in U_i a ∈ U i and b ∈ U j b\in U_j b ∈ U j with i ≠ j i\ne j i = j . Decompose in both connected components, using roots a a a and b b b . By Theorem 4.4 and independence of the connected components, the resulting terms g g g are orthogonal and remain so after multiplication by any function of X a , X b X_a,X_b X a , X b . In particular, their images under Π a b c o i n \Pi^{\mathrm{coin}}_{ab} Π ab coin are orthogonal.
If both tested vertices are fixed in a term g g g , then Π a b c o i n g ∈ ker ( Π i n j ∣ S ) \Pi^{\mathrm{coin}}_{ab}g\in\ker(\Pi^{\mathrm{inj}}|_S) Π ab coin g ∈ ker ( Π inj ∣ S ) , so ∥ Π a b c o i n g ∥ 2 = 0 \lVert\Pi^{\mathrm{coin}}_{ab}g\rVert^2=0 ∥ Π ab coin g ∥ 2 = 0 . Otherwise, condition on the fixed data in both components. Independence and the point probability bound in Theorem 4.3 give ∥ Π a b c o i n g ∥ 2 = O ( 1 / N ) ∥ g ∥ 2 \lVert\Pi^{\mathrm{coin}}_{ab}g\rVert^2=O(1/N)\lVert g\rVert^2 ∥ Π ab coin g ∥ 2 = O ( 1/ N ) ∥ g ∥ 2 . Summing over the orthogonal terms gives Eq. (60) .
There are at most m 2 m^2 m 2 pairs and m i ≤ m m_i\le m m i ≤ m , so Eq. (58) gives
∥ ( 1 − Π i n j ) f ∥ 2 ≤ ∑ { a , b } ∥ Π a b c o i n f ∥ 2 = O ( ( n + 1 ) m 3 N ) ∥ f ∥ 2 . \lVert(1-\Pi^{\mathrm{inj}})f\rVert^2\le\sum_{\{a,b\}}\lVert\Pi^{\mathrm{coin}}_{ab}f\rVert^2=O\left(\frac{(n+1)m^3}{N}\right)\lVert f\rVert^2. ∥( 1 − Π inj ) f ∥ 2 ≤ { a , b } ∑ ∥ Π ab coin f ∥ 2 = O ( N ( n + 1 ) m 3 ) ∥ f ∥ 2 .
Since m = O ( q ) m=O(q) m = O ( q ) , Eq. (49) makes this at most 1 2 ∥ f ∥ 2 \frac{1}{2}\lVert f\rVert^2 2 1 ∥ f ∥ 2 for sufficiently large C 0 C_0 C 0 .
Finally, for h ∈ Π i n j S h\in\Pi^{\mathrm{inj}}S h ∈ Π inj S , choose f 0 ∈ S f_0\in S f 0 ∈ S with Π i n j f 0 = h \Pi^{\mathrm{inj}}f_0=h Π inj f 0 = h and let f f f be f 0 f_0 f 0 minus its orthogonal projection onto ker ( Π i n j ∣ S ) \ker(\Pi^{\mathrm{inj}}|_S) ker ( Π inj ∣ S ) . Then f ∈ S ∩ ( ker ( Π i n j ∣ S ) ) ⊥ f\in S\cap(\ker(\Pi^{\mathrm{inj}}|_S))^\perp f ∈ S ∩ ( ker ( Π inj ∣ S ) ) ⊥ and Π i n j f = h \Pi^{\mathrm{inj}}f=h Π inj f = h . The bound above implies
∥ h ∥ 2 = ∥ Π i n j f ∥ 2 = ∥ f ∥ 2 − ∥ ( 1 − Π i n j ) f ∥ 2 ≥ 1 2 ∥ f ∥ 2 . \lVert h\rVert^2=\lVert\Pi^{\mathrm{inj}}f\rVert^2=\lVert f\rVert^2-\lVert(1-\Pi^{\mathrm{inj}})f\rVert^2\ge\frac{1}{2}\lVert f\rVert^2. ∥ h ∥ 2 = ∥ Π inj f ∥ 2 = ∥ f ∥ 2 − ∥( 1 − Π inj ) f ∥ 2 ≥ 2 1 ∥ f ∥ 2 .
Two such coefficient functions differ by an element of ker ( Π i n j ∣ S ) \ker(\Pi^{\mathrm{inj}}|_S) ker ( Π inj ∣ S ) that is also orthogonal to ker ( Π i n j ∣ S ) \ker(\Pi^{\mathrm{inj}}|_S) ker ( Π inj ∣ S ) , so they are equal.
Compressed queries preserve goodness
The goal of this subsection is showing that cpWT does not alter goodness. Let η t s t e p \eta_t^{\mathrm{step}} η t step be,
( η t s t e p ) 2 = ϵ l + n ⋅ ( t + 1 ) N . (61) \left(\eta_t^{\mathrm{step}}\right)^2=\epsilon_l+\frac{n\cdot(t+1)}{N}. \tag*{(61)} ( η t step ) 2 = ϵ l + N n ⋅ ( t + 1 ) . (61)
We use t t t as the count of pC operators used. As cpWT uses 6 pC operators, we have that t = O ( q ) t=O(q) t = O ( q ) . The key step of the goodness result is a bound on the effect of pCe d g e _{\mathrm{edge}} edge .
Lemma 4.6. Let t ≤ 6 q + 6 t\le6q+6 t ≤ 6 q + 6 and suppose Eq. (49) holds. Then
∥ ( 1 − Π t + 1 g o o d ) p C e d g e Π t g o o d ∥ = O ( η t s t e p ) . (62) \lVert(1-\Pi_{t+1}^{\mathrm{good}})\mathrm{pC}_{\mathrm{edge}}\Pi_t^{\mathrm{good}}\rVert=O(\eta_t^{\mathrm{step}}). \tag*{(62)} ∥( 1 − Π t + 1 good ) pC edge Π t good ∥ = O ( η t step ) . (62)
Proof. Assume that t ≥ 1 t\ge1 t ≥ 1 as when t = 0 t=0 t = 0 , the database I = ∣ ⊥ ⟩ L C I=|\perp\rangle_{\mathrm{LC}} I = ∣ ⊥ ⟩ LC and hence p C e d g e \mathrm{pC}_{\mathrm{edge}} pC edge acts as the identity. Fix some query input ∣ l , α ⟩ X |l,\alpha\rangle_X ∣ l , α ⟩ X with l ∈ [ M ] l\in[M] l ∈ [ M ] and α ∈ C \alpha\in\mathcal{C} α ∈ C . If l ∉ Im ( L ) l\notin\operatorname{Im}(L) l ∈ / Im ( L ) or the requested edge is not permuted, p C e d g e \mathrm{pC}_{\mathrm{edge}} pC edge acts again as the identity. Hence we may assume this is not the case.
For a database I = ( L , C ) I=(L,C) I = ( L , C ) with l ∈ Im ( L ) l\in\operatorname{Im}(L) l ∈ Im ( L ) , let x I = L − 1 ( l ) x_I=L^{-1}(l) x I = L − 1 ( l ) , b ( x ) = b e d g e ( e α ( x ) ) b(x)=b_{\mathrm{edge}}(e_\alpha(x)) b ( x ) = b edge ( e α ( x )) and s ( x ) = ∣ E b ( x ) ∣ s(x)=|E_{b(x)}| s ( x ) = ∣ E b ( x ) ∣ . For some abstract forest H H H , let a = λ H − 1 ( l ) ∈ U a=\lambda_H^{-1}(l)\in U a = λ H − 1 ( l ) ∈ U . Notice that x I ϕ = ϕ ( a ) x_{I_\phi}=\phi(a) x I ϕ = ϕ ( a ) .
Fix r ∈ [ 0 , t ] r\in[0,t] r ∈ [ 0 , t ] . For I I I such that ∣ I ∣ ≤ r |I|\le r ∣ I ∣ ≤ r and the queried edge is absent, define its extension as,
A ( I ) : = { ( L , C ′ ) : C ′ ⪰ C , ∣ C ′ ∣ = ∣ C ∣ + 1 , N b C ′ ( x I , α ) ≠ ⊥ } . A(I):=\{(L,C'):C'\succeq C,\ |C'|=|C|+1,\ N_{bC'}(x_I,\alpha)\ne\perp\}. A ( I ) := {( L , C ′ ) : C ′ ⪰ C , ∣ C ′ ∣ = ∣ C ∣ + 1 , N b C ′ ( x I , α ) = ⊥ } .
The database spaces based on this assignment are
H 0 : = Span { ∣ I ⟩ : ∣ I ∣ = r , l ∈ Im ( L ) , b ( x I ) ∈ B e d g e , N b C ( x I , α ) = ⊥ } , H 1 : = Span { ∣ I ′ ⟩ : ∣ I ⟩ ∈ H 0 , I ′ ∈ A ( I ) } . \begin{aligned}
\mathcal{H}_0&:=\operatorname{Span}\{|I\rangle:|I|=r,\ l\in\operatorname{Im}(L),\ b(x_I)\in B_{\mathrm{edge}},\ N_{bC}(x_I,\alpha)=\perp\},\\
\mathcal{H}_1&:=\operatorname{Span}\{|I'\rangle:|I\rangle\in\mathcal{H}_0,\ I'\in A(I)\}.
\end{aligned} H 0 H 1 := Span { ∣ I ⟩ : ∣ I ∣ = r , l ∈ Im ( L ) , b ( x I ) ∈ B edge , N b C ( x I , α ) =⊥ } , := Span { ∣ I ′ ⟩ : ∣ I ⟩ ∈ H 0 , I ′ ∈ A ( I )} .
For some canonical good vector ∣ g D ⟩ |g_D\rangle ∣ g D ⟩ , H H H fixes the database size ∣ I ∣ |I| ∣ I ∣ and whether the queried label l l l and its edge with color α \alpha α are recorded. If l l l is recorded, x I = ϕ ( a ) x_I=\phi(a) x I = ϕ ( a ) is either fixed by D D D or in V m i d V_{\mathrm{mid}} V mid where every edge is permuted. Hence projecting on one of H 0 \mathcal{H}_0 H 0 or H 1 \mathcal{H}_1 H 1 either sends the good vector ∣ g D ⟩ |g_D\rangle ∣ g D ⟩ to itself or 0 0 0 , meaning that it preserves the good space. For j ∈ { 0 , 1 } j\in\{0,1\} j ∈ { 0 , 1 } , Π j \Pi_j Π j is the orthogonal projector onto H j ∩ Ran ( Π t + 1 g o o d ) \mathcal{H}_j\cap\operatorname{Ran}(\Pi_{t+1}^{\mathrm{good}}) H j ∩ Ran ( Π t + 1 good ) . Define the operator J : H 0 → H 1 J:\mathcal{H}_0\to\mathcal{H}_1 J : H 0 → H 1 as
J ∣ I ⟩ : = 1 s ( x I ) ∑ I ′ ∈ A ( I ) ∣ I ′ ⟩ . J|I\rangle:=\frac{1}{\sqrt{s(x_I)}}\sum_{I'\in A(I)}|I'\rangle. J ∣ I ⟩ := s ( x I ) 1 I ′ ∈ A ( I ) ∑ ∣ I ′ ⟩ .
J † ∣ I ′ ⟩ = 1 s ( x I ) ∣ I ⟩ , J^{\dagger}|I'\rangle= \frac{1}{\sqrt{s(x_I)}}|I\rangle, J † ∣ I ′ ⟩ = s ( x I ) 1 ∣ I ⟩ ,
where I ′ ∈ A ( I ) I' \in A(I) I ′ ∈ A ( I ) . For now, assume that the following bound holds,
∥ ( 1 − Π 1 ) J Π 0 ∥ + ∥ ( 1 − Π 0 ) J † Π 1 ∥ = O ( η t s t e p ) . (63) \left\|(1-\Pi_1)J\Pi_0\right\|+\left\|(1-\Pi_0)J^\dagger\Pi_1\right\|=O\left(\eta_t^{\mathrm{step}}\right). \tag*{(63)} ∥ ( 1 − Π 1 ) J Π 0 ∥ + ( 1 − Π 0 ) J † Π 1 = O ( η t step ) . (63)
Notice that by Eq. (49) and Theorem 3.3, ∣ A ( I ) ∣ ∈ [ s ( x I ) − t , s ( x I ) ] |A(I)|\in[s(x_I)-t,s(x_I)] ∣ A ( I ) ∣ ∈ [ s ( x I ) − t , s ( x I )] . Therefore,
J † J ∣ I ⟩ = ∣ A ( I ) ∣ s ( x I ) ∣ I ⟩ , J^\dagger J|I\rangle=\frac{|A(I)|}{s(x_I)}|I\rangle, J † J ∣ I ⟩ = s ( x I ) ∣ A ( I ) ∣ ∣ I ⟩ ,
so 1 2 1 ⪯ J † J ⪯ 1 \frac{1}{2}\mathbb{1}\preceq J^\dagger J\preceq\mathbb{1} 2 1 1 ⪯ J † J ⪯ 1 . Let V = J ( J † J ) − 1 / 2 V=J(J^\dagger J)^{-1/2} V = J ( J † J ) − 1/2 . By Eq. (63) ,
δ : = Π 1 J − J Π 0 , ∥ δ ∥ = O ( η t s t e p ) . \delta:=\Pi_1J-J\Pi_0,\qquad\|\delta\|=O\left(\eta_t^{\mathrm{step}}\right). δ := Π 1 J − J Π 0 , ∥ δ ∥ = O ( η t step ) .
Next, apply Theorem 2.4 with V = J V=J V = J , T = Π 1 T=\Pi_1 T = Π 1 , U = Π 0 U=\Pi_0 U = Π 0 , Π = Π ′ = 1 \Pi=\Pi'=\mathbb{1} Π = Π ′ = 1 and κ = 1 / 2 \kappa=1/2 κ = 1/2 ,
∥ Π 1 V − V Π 0 ∥ ≤ 2 ∥ δ ∥ + 2 ∥ δ † J − J † δ ∥ ≤ 3 2 ∥ δ ∥ = O ( η t s t e p ) , \begin{aligned}
\|\Pi_1V-V\Pi_0\|&\leq\sqrt{2}\|\delta\|+\sqrt{2}\|\delta^\dagger J-J^\dagger\delta\|\\
&\leq3\sqrt{2}\|\delta\|=O\left(\eta_t^{\mathrm{step}}\right),
\end{aligned} ∥ Π 1 V − V Π 0 ∥ ≤ 2 ∥ δ ∥ + 2 ∥ δ † J − J † δ ∥ ≤ 3 2 ∥ δ ∥ = O ( η t step ) ,
where we used the fact that ∥ J ∥ ≤ 1 \|J\|\leq1 ∥ J ∥ ≤ 1 . Hence the insertion and deletion errors satisfy,
δ + : = ∥ ( 1 − Π 1 ) V Π 0 ∥ = O ( η t s t e p ) , δ − : = ∥ ( 1 − Π 0 ) V † Π 1 ∥ = O ( η t s t e p ) . \delta_+:=\|(1-\Pi_1)V\Pi_0\|=O\left(\eta_t^{\mathrm{step}}\right),\qquad
\delta_-:=\|(1-\Pi_0)V^\dagger\Pi_1\|=O\left(\eta_t^{\mathrm{step}}\right). δ + := ∥ ( 1 − Π 1 ) V Π 0 ∥ = O ( η t step ) , δ − := ∥ ( 1 − Π 0 ) V † Π 1 ∥ = O ( η t step ) .
By Eq. (4) , the compression p C e d g e \mathrm{pC}_{\mathrm{edge}} pC edge and good projector Π \Pi Π on H 0 ⊕ H 1 \mathcal{H}_0\oplus\mathcal{H}_1 H 0 ⊕ H 1 are
p C e d g e = ( 0 V † V 1 − V V † ) , Π = ( Π 0 0 0 Π 1 ) . \mathrm{pC}_{\mathrm{edge}}=
\begin{pmatrix}
0 & V^\dagger\\
V & \mathbb{1}-VV^\dagger
\end{pmatrix},
\qquad
\Pi=
\begin{pmatrix}
\Pi_0 & 0\\
0 & \Pi_1
\end{pmatrix}. pC edge = ( 0 V V † 1 − V V † ) , Π = ( Π 0 0 0 Π 1 ) .
Notice that for V V † VV^\dagger V V † , we have,
∥ ( 1 − Π 1 ) V V † Π 1 ∥ = ∥ ( 1 − Π 1 ) V Π 0 V † Π 1 + ( 1 − Π 1 ) V ( 1 − Π 0 ) V † Π 1 ∥ ≤ δ + + δ − . \begin{aligned}
\|(1-\Pi_1)VV^\dagger\Pi_1\|
&=\|(1-\Pi_1)V\Pi_0V^\dagger\Pi_1+(1-\Pi_1)V(1-\Pi_0)V^\dagger\Pi_1\|\\
&\leq\delta_++\delta_-.
\end{aligned} ∥ ( 1 − Π 1 ) V V † Π 1 ∥ = ∥ ( 1 − Π 1 ) V Π 0 V † Π 1 + ( 1 − Π 1 ) V ( 1 − Π 0 ) V † Π 1 ∥ ≤ δ + + δ − .
Therefore, using the fact that query inputs and different records are orthogonal,
∥ ( 1 − Π ) p C e d g e Π ∥ ≤ 2 ( δ + + δ − ) = O ( η t s t e p ) . (64) \|(1-\Pi)\mathrm{pC}_{\mathrm{edge}}\Pi\|\leq2(\delta_++\delta_-)=O\left(\eta_t^{\mathrm{step}}\right). \tag*{(64)} ∥ ( 1 − Π ) pC edge Π∥ ≤ 2 ( δ + + δ − ) = O ( η t step ) . (64)
Hence the remainder of the proof is concerned with showing that Eq. (63) holds. We will show each statement in Eq. (63) by considering a vector z ∈ Ran ( Π 0 ) z\in\operatorname{Ran}(\Pi_0) z ∈ Ran ( Π 0 ) and z ∈ Ran ( Π 1 ) z\in\operatorname{Ran}(\Pi_1) z ∈ Ran ( Π 1 ) respectively. Suppose that z z z is supported by databases represented by a fixed abstract forest H H H . By Theorem 4.2, we may write this in terms of the assignment coordinates. Consider the following reference weights:
μ H ( ϕ ) : = ∏ u v ∈ E ( H ) κ Color H ( u v ) ( ϕ ( u ) , ϕ ( v ) ) , ∥ f ∥ H 2 : = ∑ ϕ μ H ( ϕ ) ∥ f ( ϕ ) ∥ 2 . \mu_H(\phi):=\prod_{uv\in E(H)}\kappa_{\operatorname{Color}_H(uv)}(\phi(u),\phi(v)),\qquad
\|f\|_H^2:=\sum_\phi\mu_H(\phi)\|f(\phi)\|^2. μ H ( ϕ ) := uv ∈ E ( H ) ∏ κ Color H ( uv ) ( ϕ ( u ) , ϕ ( v )) , ∥ f ∥ H 2 := ϕ ∑ μ H ( ϕ ) ∥ f ( ϕ ) ∥ 2 .
These definitions omit the normalization factor and coefficient function norm, but otherwise behave the same way as in Eq. (51) . For each choice of the sets F i b d F_i^{\mathrm{bd}} F i bd , set their coefficients using Theorem 4.5 and let f f f be their sum. The vector and its coefficient function satisfy,
z = ∑ ϕ i n j e c t i v e μ H ( ϕ ) f ( ϕ ) ∣ ϕ ⟩ , z=\sum_{\phi\ \mathrm{injective}}\sqrt{\mu_H(\phi)}f(\phi)|\phi\rangle, z = ϕ injective ∑ μ H ( ϕ ) f ( ϕ ) ∣ ϕ ⟩ ,
∥ z ∥ 2 = ∑ ϕ i n j e c t i v e μ H ( ϕ ) ∥ f ( ϕ ) ∥ 2 , ∥ f ∥ H 2 ≤ 2 ∥ z ∥ 2 . \|z\|^2=\sum_{\phi\ \mathrm{injective}}\mu_H(\phi)\|f(\phi)\|^2,\qquad
\|f\|_H^2\leq2\|z\|^2. ∥ z ∥ 2 = ϕ injective ∑ μ H ( ϕ ) ∥ f ( ϕ ) ∥ 2 , ∥ f ∥ H 2 ≤ 2∥ z ∥ 2 .
Note that the norm ∥ f ∥ H \|f\|_H ∥ f ∥ H sums over all assignments, while ∥ z ∥ \|z\| ∥ z ∥ only includes injective assignments due to the application of Π i n j \Pi^{\mathrm{inj}} Π inj in Theorem 4.5. Furthermore, for each choice of F i b d F_i^{\mathrm{bd}} F i bd , the coefficient f f f is in S ∩ ( ker ( Π i n j ∣ S ) ) ⊥ \mathcal{S} \cap\left(\ker(\Pi^{\mathrm{inj}}|_{\mathcal{S}})\right)^\perp S ∩ ( ker ( Π inj ∣ S ) ) ⊥ .
Next, we separate the terms in f f f based on the fixed data W a f i x W_a^{\mathrm{fix}} W a fix . Specifically, let H i H_i H i be the connected component containing a a a . For each F i b d F_i^{\mathrm{bd}} F i bd , write f = f a + g f=f_a+g f = f a + g where,
f a : = { E [ f ∣ W a f i x , X U ∖ U i ] , F i b d = ∅ , 1 [ a ∈ C c t r e e ] f , F i b d ≠ ∅ ( c ∈ F i b d ) , g : = f − f a . (65) f_a := \begin{cases}
\mathbb{E}[f \mid W_a^{\mathrm{fix}},X_{U\setminus U_i}], & F_i^{\mathrm{bd}}=\varnothing,\\
\mathbf{1}[a\in C_c^{\mathrm{tree}}]f, & F_i^{\mathrm{bd}}\ne\varnothing\ (c\in F_i^{\mathrm{bd}}),
\end{cases}
\qquad
g:=f-f_a. \tag*{(65)} f a := { E [ f ∣ W a fix , X U ∖ U i ] , 1 [ a ∈ C c tree ] f , F i bd = ∅ , F i bd = ∅ ( c ∈ F i bd ) , g := f − f a . (65)
If F i b d = ∅ F_i^{\mathrm{bd}}=\varnothing F i bd = ∅ , then we may consider the unique decompositions f = ∑ v ∈ U i f v f=\sum_{v\in U_i}f_v f = ∑ v ∈ U i f v and g = ∑ v ∈ U i ∖ { a } f v g=\sum_{v\in U_i\setminus\{a\}}f_v g = ∑ v ∈ U i ∖ { a } f v from Theorem 4.4. Otherwise, f a f_a f a and g g g have disjoint supports. Thus in both cases, f a f_a f a depends on the component H i H_i H i only through the fixed part W a f i x W_a^{\mathrm{fix}} W a fix , each summand in g g g depends on a tree component different from C a t r e e C_a^{\mathrm{tree}} C a tree , and
∥ f a ∥ H 2 + ∥ g ∥ H 2 = ∥ f ∥ H 2 ≤ 2 ∥ z ∥ 2 . (66) \|f_a\|_H^2+\|g\|_H^2=\|f\|_H^2\le2\|z\|^2. \tag*{(66)} ∥ f a ∥ H 2 + ∥ g ∥ H 2 = ∥ f ∥ H 2 ≤ 2∥ z ∥ 2 . (66)
We may write z = z a + z g z=z_a+z_g z = z a + z g where
z a : = ∑ ϕ i n j e c t i v e μ H ( ϕ ) f a ( ϕ ) ∣ ϕ ⟩ , z_a:=\sum_{\phi\ \mathrm{injective}}\sqrt{\mu_H(\phi)}f_a(\phi)|\phi\rangle, z a := ϕ injective ∑ μ H ( ϕ ) f a ( ϕ ) ∣ ϕ ⟩ ,
z g : = ∑ ϕ i n j e c t i v e μ H ( ϕ ) g ( ϕ ) ∣ ϕ ⟩ . z_g:=\sum_{\phi\ \mathrm{injective}}\sqrt{\mu_H(\phi)}g(\phi)|\phi\rangle. z g := ϕ injective ∑ μ H ( ϕ ) g ( ϕ ) ∣ ϕ ⟩ .
Hence the goal is to bound how much J , J † J,J^\dagger J , J † move z a , z g z_a,z_g z a , z g away from the good space. Let us consider the insertion J J J first. For a structural vertex x x x with b ( x ) ∈ B e d g e b(x)\in B_{\mathrm{edge}} b ( x ) ∈ B edge , we let p ( x ) p(x) p ( x ) be the bound on the probability that querying at x x x returns a boundary vertex or a vertex already in the forest,
p ( x ) : = ∑ u ∈ V b d κ α ( x , u ) + 2 ( t + 1 ) s ( x ) . p(x):=\sum_{u\in V_{\mathrm{bd}}}\kappa_\alpha(x,u)+\frac{2(t+1)}{s(x)}. p ( x ) := u ∈ V bd ∑ κ α ( x , u ) + s ( x ) 2 ( t + 1 ) .
The second term bounds the probability of hitting a vertex in the forest as ∣ U ∣ ≤ 2 ( t + 1 ) |U|\le2(t+1) ∣ U ∣ ≤ 2 ( t + 1 ) . By Eq. (50) ,
∑ x : b ( x ) ∈ B e d g e p ( x ) ≤ ∣ V b d ∣ + 2 ( t + 1 ) ∑ x : b ( x ) ∈ B e d g e 1 s ( x ) = O ( N ϵ l + n t ) . \sum_{x:b(x)\in B_{\mathrm{edge}}}p(x)\le|V_{\mathrm{bd}}|+2(t+1)\sum_{x:b(x)\in B_{\mathrm{edge}}}\frac{1}{s(x)}=O(N\epsilon_l+nt). x : b ( x ) ∈ B edge ∑ p ( x ) ≤ ∣ V bd ∣ + 2 ( t + 1 ) x : b ( x ) ∈ B edge ∑ s ( x ) 1 = O ( N ϵ l + n t ) .
We are interested in the probability that an assignment contributing to g g g incurs any of these bad events. Hence, considering the random variable X a X_a X a that assigns ϕ ( a ) \phi(a) ϕ ( a ) , let us bound p ( X a ) p(X_a) p ( X a ) . There are two possibilities for the location a a a .
If a ∉ S v f i x a\notin S_v^{\mathrm{fix}} a ∈ / S v fix , its location is not fixed. By Theorem 4.3 , each possible location has the conditional probability O ( 1 / N ) O(1/N) O ( 1/ N ) . Therefore,
E [ p ( X a ) ∣ W v f i x ] = ∑ x : b ( x ) ∈ B e d g e p ( x ) Pr [ X a = x ∣ W v f i x ] ≤ O ( 1 ) N ∑ x : b ( x ) ∈ B e d g e p ( x ) = O ( ϵ l + n t N ) . \mathbb{E}[p(X_a)\mid W_v^{\mathrm{fix}}]
=\sum_{x:b(x)\in B_{\mathrm{edge}}}p(x)\Pr[X_a=x\mid W_v^{\mathrm{fix}}]
\le\frac{O(1)}{N}\sum_{x:b(x)\in B_{\mathrm{edge}}}p(x)
=O\left(\epsilon_l+\frac{nt}{N}\right). E [ p ( X a ) ∣ W v fix ] = x : b ( x ) ∈ B edge ∑ p ( x ) Pr [ X a = x ∣ W v fix ] ≤ N O ( 1 ) x : b ( x ) ∈ B edge ∑ p ( x ) = O ( ϵ l + N n t ) .
On the other hand, if a ∈ S v f i x a\in S_v^{\mathrm{fix}} a ∈ S v fix , then a ∉ C v t r e e a\notin C_v^{\mathrm{tree}} a ∈ / C v tree implies that a a a is immediately across the weld, which means that it can hit an already represented vertex, so
p ( ϕ ( a ) ) ≤ ∣ V b d ∣ + 2 ( t + 1 ) s ( ϕ ( a ) ) = O ( ϵ l + t N ) . p(\phi(a))\le\frac{|V_{\mathrm{bd}}|+2(t+1)}{s(\phi(a))}=O\left(\epsilon_l+\frac{t}{N}\right). p ( ϕ ( a )) ≤ s ( ϕ ( a )) ∣ V bd ∣ + 2 ( t + 1 ) = O ( ϵ l + N t ) .
In both cases, the average p ( X a ) p(X_a) p ( X a ) is O ( ( η t s t e p ) 2 ) O((\eta_t^{\mathrm{step}})^2) O (( η t step ) 2 ) . By Theorem 4.4, the summands in g g g remain orthogonal after multiplication by p ( X a ) \sqrt{p(X_a)} p ( X a ) . Hence,
∥ p ( ϕ ( a ) ) g ∥ H 2 = ∑ ϕ μ H ( ϕ ) p ( ϕ ( a ) ) ∥ g ( ϕ ) ∥ 2 = O ( ( η t s t e p ) 2 ) ∥ g ∥ H 2 . (67) \|\sqrt{p(\phi(a))}g\|_H^2
=\sum_{\phi}\mu_H(\phi)p(\phi(a))\|g(\phi)\|^2
=O((\eta_t^{\mathrm{step}})^2)\|g\|_H^2. \tag*{(67)} ∥ p ( ϕ ( a )) g ∥ H 2 = ϕ ∑ μ H ( ϕ ) p ( ϕ ( a )) ∥ g ( ϕ ) ∥ 2 = O (( η t step ) 2 ) ∥ g ∥ H 2 . (67)
Adding a new vertex outside the boundary preserves goodness as it does not create a collision, does not introduce a boundary vertex and does not change the fixed data. The remaining bad additions have total weight at most p ( ϕ ( a ) ) p(\phi(a)) p ( ϕ ( a )) , so,
∥ ( 1 − Π 1 ) J z g ∥ 2 = O ( ( η t s t e p ) 2 ) ∥ g ∥ H 2 . \left\lVert(1-\Pi_1)Jz_g\right\rVert^2=O\left((\eta_t^{\mathrm{step}})^2\right)\lVert g\rVert_H^2. ∥ ( 1 − Π 1 ) J z g ∥ 2 = O ( ( η t step ) 2 ) ∥ g ∥ H 2 .
Next, consider applying the insertion operator J J J on z a z_a z a . Notice that adding an edge from a a a to a new vertex preserves goodness. Hence the only bad event can be if we connect to a previously explored vertex. If a tree edge a y ay a y joins two recorded components, the coefficient depending on W a f i x W_a^{\mathrm{fix}} W a fix and W y f i x W_y^{\mathrm{fix}} W y fix remains good because the merged tree component contains both sets of fixed data.
We must therefore bound additions that create a cycle, cross a weld, or connect another recorded component outside the fixed data. A cycle inside C a t r e e C_a^{\mathrm{tree}} C a tree would require two parent-color edges at its deepest vertex, contradicting proper edge-coloring. If a y ay a y is a weld edge, its edge class has size Ω ( N ) \Omega(N) Ω ( N ) . If a y ay a y is a tree edge and y ∈ U j y\in U_j y ∈ U j such that j ≠ i j\ne i j = i , apply the same coefficient split to f a f_a f a at y y y . The part depending on W y f i x W_y^{\mathrm{fix}} W y fix preserves goodness as above. For the remaining cases where the edge is on a tree, y y y is either free or fixed immediately across a weld. If y y y is free, Theorem 4.3 bounds the probability that X y = x X_y=x X y = x for every structural vertex x x x by O ( 1 / N ) O(1/N) O ( 1/ N ) , conditional on the fixed data. If y y y is fixed across the weld, the edge class has size Ω ( N ) \Omega(N) Ω ( N ) , giving the same bound. Hence Theorem 4.4 gives the squared error O ( 1 / N ) ∥ f a ∥ H 2 O(1/N)\lVert f_a\rVert_H^2 O ( 1/ N ) ∥ f a ∥ H 2 for every y y y .
The query ( l , α ) (l,\alpha) ( l , α ) identifies some edge a y ay a y , so the automorphisms over H + a y H+ay H + a y are those of H H H which fix y y y . By Theorem 4.2, the squared normalization factor is ∣ Aut ( H ) ∣ / ∣ Aut ( H + a y ) ∣ |\operatorname{Aut}(H)|/|\operatorname{Aut}(H+ay)| ∣ Aut ( H ) ∣/∣ Aut ( H + a y ) ∣ , which counts the number of possible images of y y y under Aut ( H ) \operatorname{Aut}(H) Aut ( H ) . These endpoints are already counted in the sum over U U U . Summing over at most ∣ U ∣ ≤ 2 ( t + 1 ) |U|\le2(t+1) ∣ U ∣ ≤ 2 ( t + 1 ) endpoints gives us
∥ ( 1 − Π 1 ) J z a ∥ 2 = O ( t + 1 N ) ∥ f a ∥ H 2 . \left\lVert(1-\Pi_1)Jz_a\right\rVert^2=O\left(\frac{t+1}{N}\right)\lVert f_a\rVert_H^2. ∥ ( 1 − Π 1 ) J z a ∥ 2 = O ( N t + 1 ) ∥ f a ∥ H 2 .
For J † J^\dagger J † and z ∈ Ran ( Π 1 ) z\in\operatorname{Ran}(\Pi_1) z ∈ Ran ( Π 1 ) , use the same decomposition of f f f and z z z from Eq. (65) and let a y ay a y be the queried edge in the abstract forest H H H . Suppose that after deleting the edge a y ay a y , the endpoint y y y remains in the new H H H . For z a z_a z a , the fixed data around a a a and y y y in the two resulting components contain all the data needed by f a f_a f a and determine the factor 1 / s ( X a ) 1/s(X_a) 1/ s ( X a ) introduced by deletion. The boundary vertices of the original component still lie in these fixed tree components, so ( 1 − Π 0 ) J † z a = 0 (1-\Pi_0)J^\dagger z_a=0 ( 1 − Π 0 ) J † z a = 0 . Hence it suffices to focus on z g z_g z g . For this vector, notice that there are at most 2 ( t + 1 ) 2(t+1) 2 ( t + 1 ) database instances that lead to the same database I I I after applying J † J^\dagger J † . Applying Cauchy-Schwarz and Eq. (67) ,
∥ J † z g ∥ 2 ≤ 2 ( t + 1 ) ∑ ϕ i n j e c t i v e μ H ( ϕ ) ∥ g ( ϕ ) ∥ 2 s ( X a ) ≤ ∥ p ( X a ) g ∥ H 2 = O ( ( η t s t e p ) 2 ) ∥ g ∥ H 2 , (68) \begin{aligned}
\left\lVert J^\dagger z_g\right\rVert^2\le2(t+1)\sum_{\phi\ \mathrm{injective}}\frac{\mu_H(\phi)\lVert g(\phi)\rVert^2}{s(X_a)} \\
&\le\left\lVert\sqrt{p(X_a)}g\right\rVert_H^2=O\left((\eta_t^{\mathrm{step}})^2\right)\lVert g\rVert_H^2, \tag*{(68)}
\end{aligned} J † z g 2 ≤ 2 ( t + 1 ) ϕ injective ∑ s ( X a ) μ H ( ϕ ) ∥ g ( ϕ ) ∥ 2 ≤ p ( X a ) g H 2 = O ( ( η t step ) 2 ) ∥ g ∥ H 2 , (68)
since the deleted edge must connect a a a to a vertex still represented in I I I .
Instead, assume that J † J^\dagger J † deletes y y y . This means that it is an unlabeled leaf in H H H . Notice that deleting y y y combines all the databases I I I that differ only in where y y y is located. Let H − : = H − y H^-:=H-y H − := H − y and U − : = U ∖ { y } U^-:=U\setminus\{y\} U − := U ∖ { y } be the instances. When F i b d = ∅ F_i^{\mathrm{bd}}=\varnothing F i bd = ∅ , as y y y is a leaf, the only summand in g g g that depends on the assignment X y X_y X y is f y f_y f y , which is 0 0 0 due to Theorem 4.4. When F i b d ≠ ∅ F_i^{\mathrm{bd}}\ne\varnothing F i bd = ∅ , y ∉ S i f i x y\notin S_i^{\mathrm{fix}} y ∈ / S i fix on the support of g g g . Therefore,
g ( ϕ ) = 1 [ X y ∉ V b d ] g − ( ϕ − ) . g(\phi)=\mathbf{1}[X_y\notin V_{\mathrm{bd}}]g^-(\phi^-). g ( ϕ ) = 1 [ X y ∈ / V bd ] g − ( ϕ − ) .
Removing y y y does not change the fixed data. The terms remain orthogonal by independence across welds, so the bound in Eq. (67) also applies to g − g^- g − . Summing over X y X_y X y and using Eqs. (49) and (67) gives us ∥ g − ∥ H − 2 ≤ 2 ∥ g ∥ H 2 \lVert g^-\rVert_{H^-}^2\le2\lVert g\rVert_H^2 ∥ g − ∥ H − 2 ≤ 2 ∥ g ∥ H 2 . Let z − z^- z − be the vector on H − H^- H − with the coefficient h ( ϕ − ) h(\phi^-) h ( ϕ − )
h ( ϕ − ) : = g − ( ϕ − ) + ∑ x ∈ [ M ] κ a ( X a , x ) f a ( ϕ − ∪ { y ↦ x } ) . h(\phi^-):=g^-(\phi^-)+\sum_{x\in[M]}\kappa_a(X_a,x)f_a(\phi^-\cup\{y\mapsto x\}). h ( ϕ − ) := g − ( ϕ − ) + x ∈ [ M ] ∑ κ a ( X a , x ) f a ( ϕ − ∪ { y ↦ x }) .
Notice that both terms are good. Therefore by Cauchy-Schwarz, Eq. (67) and Theorem 4.5,
∥ J † z − z − ∥ 2 ≤ 2 ∥ p ( X a ) g − ∥ H − 2 + 2 ∑ v ∈ U − ∥ Π y v c o i n f a ∥ H 2 = O ( ( η s t e p ) 2 ) ∥ f ∥ H 2 \begin{aligned}
\left\lVert J^\dagger z-z^-\right\rVert^2\le2\left\lVert\sqrt{p(X_a)}g^-\right\rVert_{H^-}^2+2\sum_{v\in U^-}\left\lVert\Pi_{yv}^{\mathrm{coin}}f_a\right\rVert_H^2 \\
&= O\left((\eta_{\mathrm{step}})^2\right)\|f\|_H^2
\end{aligned} J † z − z − 2 ≤ 2 p ( X a ) g − H − 2 + 2 v ∈ U − ∑ Π y v coin f a H 2 = O ( ( η step ) 2 ) ∥ f ∥ H 2
Since y y y is fixed, the collision argument in the proof of Theorem 4.5 gives ∥ Π y v c o i n f a ∥ H 2 = O ( 1 / N ) ∥ f a ∥ H 2 \|\Pi^{\mathrm{coin}}_{yv}f_a\|_H^2 = O(1/N)\|f_a\|_H^2 ∥ Π y v coin f a ∥ H 2 = O ( 1/ N ) ∥ f a ∥ H 2 for each v ∈ U − v \in U^- v ∈ U − .
For insertion and leaf deletion, the resulting database determines the abstract forest H H H , so the errors for different H H H are orthogonal. Otherwise, if y y y remains after deletion, the bound of 2 ( t + 1 ) 2(t+1) 2 ( t + 1 ) database instances leading to the same database I I I in Eq. (68) applies across all forests, so the same estimate holds for their sum. Therefore, combining these estimates and taking the supremum over the unit vectors z z z in Ran ( Π 0 ) \operatorname{Ran}(\Pi_0) Ran ( Π 0 ) and Ran ( Π 1 ) \operatorname{Ran}(\Pi_1) Ran ( Π 1 ) proves Eq. (63) .
Next we handle the p l a b c i n v p^{\mathrm{cinv}}_{\mathrm{lab}} p lab cinv operator.
Lemma 4.7. Let t ≤ 6 q + 6 t \le6q+6 t ≤ 6 q + 6 and suppose Eq. (49) holds. Then
∥ ( 1 − Π t + 1 g o o d ) p l a b c i n v Π t g o o d ∥ = O ( t M ) . \left\|(1-\Pi^{\mathrm{good}}_{t+1})p^{\mathrm{cinv}}_{\mathrm{lab}}\Pi^{\mathrm{good}}_t\right\| = O\left(\sqrt{\frac{t}{M}}\right). ( 1 − Π t + 1 good ) p lab cinv Π t good = O ( M t ) .
Proof. Fix a query label l ∈ [ M ] l \in[M] l ∈ [ M ] and r ∈ [ 0 , t ] r \in[0,t] r ∈ [ 0 , t ] . For ∣ L ∣ = r |L|=r ∣ L ∣ = r and l ∉ Im ( L ) l \notin\operatorname{Im}(L) l ∈ / Im ( L ) , define
V ∣ L , C ⟩ : = 1 M − r ∑ x ∈ [ M ] ∖ Dom ( L ) ∣ L [ x → l ] , C ⟩ , \mathcal{V}|L,C\rangle:= \frac{1}{\sqrt{M-r}}\sum_{x\in[M]\setminus\operatorname{Dom}(L)} |L[x\to l],C\rangle, V ∣ L , C ⟩ := M − r 1 x ∈ [ M ] ∖ Dom ( L ) ∑ ∣ L [ x → l ] , C ⟩ ,
V † ∣ L [ x → l ] , C ⟩ = 1 M − r ∣ L , C ⟩ . \mathcal{V}^{\dagger}|L[x\to l],C\rangle= \frac{1}{\sqrt{M-r}}|L,C\rangle. V † ∣ L [ x → l ] , C ⟩ = M − r 1 ∣ L , C ⟩ .
Distinct databases have disjoint sets of extensions, and each has M − r M-r M − r extensions, so V † V = 1 \mathcal{V}^{\dagger}\mathcal{V}=1 V † V = 1 . By Eq. (49) , M − r ≥ M / 2 M-r \ge M/2 M − r ≥ M /2 .
Inserting the label at a vertex already in H H H changes only λ H \lambda_H λ H . Inserting it at a new location adds an isolated vertex y y y , whose fixed data W y f i x W_y^{\mathrm{fix}} W y fix specify its location ϕ ( y ) \phi(y) ϕ ( y ) . Both operations map into the good space with one additional record. Likewise, deleting the label from a vertex with an incident edge changes only λ H \lambda_H λ H and preserves the good space.
Hence the only case we must consider is when we delete an abstract vertex y y y without any adjacent edges such that λ H ( y ) = l \lambda_H(y)=l λ H ( y ) = l . Let z ∈ Ran ( Π t + 1 g o o d ) z \in\operatorname{Ran}(\Pi^{\mathrm{good}}_{t+1}) z ∈ Ran ( Π t + 1 good ) be represented by such a forest H H H , and set H − : = H − y H^- := H-y H − := H − y , U − : = U ∖ { y } U^- := U\setminus\{y\} U − := U ∖ { y } , ϕ − : = ϕ ∣ U − \phi^- := \phi|_{U^-} ϕ − := ϕ ∣ U − and m : = ∣ U − ∣ ≤ 2 t m:=|U^-|\le2t m := ∣ U − ∣ ≤ 2 t .
For the connected components H i H_i H i of H − H^- H − , fix the sets F i b d F_i^{\mathrm{bd}} F i bd and let μ − : = ⨂ i μ i , F i b d r e f \mu^- := \bigotimes_i \mu^{\mathrm{ref}}_{i,F_i^{\mathrm{bd}}} μ − := ⨂ i μ i , F i bd ref . For y y y , include both cases ϕ ( y ) ∈ V b d \phi(y)\in V_{\mathrm{bd}} ϕ ( y ) ∈ V bd and ϕ ( y ) ∉ V b d \phi(y)\notin V_{\mathrm{bd}} ϕ ( y ) ∈ / V bd . Replacing the uniform distribution on either set A ∈ { V b d , [ M ] ∖ V b d } A\in\{V_{\mathrm{bd}},[M]\setminus V_{\mathrm{bd}}\} A ∈ { V bd , [ M ] ∖ V bd } by the uniform distribution on [ M ] [M] [ M ] multiplies the corresponding coefficient by M / ∣ A ∣ \sqrt{M/|A|} M /∣ A ∣ and extends it by zero outside A A A . Thus we use the reference distribution
μ ( ϕ − , x ) = μ − ( ϕ − ) M , x = ϕ ( y ) ∈ [ M ] . \mu(\phi^-,x)=\frac{\mu^-(\phi^-)}{M},\qquad x=\phi(y)\in[M]. μ ( ϕ − , x ) = M μ − ( ϕ − ) , x = ϕ ( y ) ∈ [ M ] .
Using the isometry in Theorem 4.2, we may describe the vectors using ϕ \phi ϕ without changing their norms. By Theorem 4.5, choose a unique coefficient function f f f as in Eq. (55) such that
z = ∑ ϕ i n j e c t i v e μ ( ϕ ) f ( ϕ ) ∣ ϕ ⟩ , ∥ f ∥ μ 2 ≤ 2 ∥ z ∥ 2 . z=\sum_{\phi\ \mathrm{injective}}\sqrt{\mu(\phi)}f(\phi)|\phi\rangle,\qquad\|f\|_\mu^2\le2\|z\|^2. z = ϕ injective ∑ μ ( ϕ ) f ( ϕ ) ∣ ϕ ⟩ , ∥ f ∥ μ 2 ≤ 2∥ z ∥ 2 .
Below f ( ϕ − , x ) f(\phi^-,x) f ( ϕ − , x ) denotes f ( ϕ − ∪ { y ↦ x } ) f(\phi^-\cup\{y\mapsto x\}) f ( ϕ − ∪ { y ↦ x }) . Define
h ( ϕ − ) : = 1 M ( M − r ) ∑ x ∈ [ M ] f ( ϕ − , x ) , h(\phi^-):=\frac{1}{\sqrt{M(M-r)}}\sum_{x\in[M]}f(\phi^-,x), h ( ϕ − ) := M ( M − r ) 1 x ∈ [ M ] ∑ f ( ϕ − , x ) ,
w : = ∑ ϕ − i n j e c t i v e μ − ( ϕ − ) h ( ϕ − ) ∣ ϕ − ⟩ . w:=\sum_{\phi^-\ \mathrm{injective}}\sqrt{\mu^-(\phi^-)}h(\phi^-)|\phi^-\rangle. w := ϕ − injective ∑ μ − ( ϕ − ) h ( ϕ − ) ∣ ϕ − ⟩ .
For every fixed x x x , f ( ⋅ , x ) ∈ ⨂ i S i , F i b d f(\cdot,x)\in\bigotimes_i S_{i,F_i^{\mathrm{bd}}} f ( ⋅ , x ) ∈ ⨂ i S i , F i bd by Eq. (55) , where i i i ranges over the connected components of H − H^- H − . Hence h h h belongs to the same space and w ∈ Ran ( Π t g o o d ) w\in\operatorname{Ran}(\Pi^{\mathrm{good}}_t) w ∈ Ran ( Π t good ) . The action of V † \mathcal{V}^{\dagger} V † sums only over x ∉ ϕ − ( U − ) x \notin\phi^{-}(U^{-}) x ∈ / ϕ − ( U − ) . By Cauchy–Schwarz,
∥ V † z − w ∥ 2 ≤ 1 M ( M − r ) E μ − [ ∥ ∑ x ∈ ϕ − ( U − ) f ( ϕ − , x ) ∥ 2 ] ≤ m M ( M − r ) E μ − [ ∑ x ∈ [ M ] ∥ f ( ϕ − , x ) ∥ 2 ] = m M − r ∥ f ∥ μ 2 = O ( t M ) ∥ z ∥ 2 . \begin{aligned}
\left\|\mathcal{V}^{\dagger}z-w\right\|^{2}
\leq\frac{1}{M(M-r)}\mathbb{E}_{\mu_{-}}\left[\left\|\sum_{x\in\phi^{-}(U^{-})} f(\phi^{-},x)\right\|^{2}\right] \\
&\leq\frac{m}{M(M-r)}\mathbb{E}_{\mu_{-}}\left[\sum_{x\in[M]}\left\|f(\phi^{-},x)\right\|^{2}\right] \\
&= \frac{m}{M-r}\|f\|_{\mu}^{2}=O\left(\frac{t}{M}\right)\|z\|^{2}.
\end{aligned} V † z − w 2 ≤ M ( M − r ) 1 E μ − x ∈ ϕ − ( U − ) ∑ f ( ϕ − , x ) 2 ≤ M ( M − r ) m E μ − x ∈ [ M ] ∑ f ( ϕ − , x ) 2 = M − r m ∥ f ∥ μ 2 = O ( M t ) ∥ z ∥ 2 .
The forest H H H is recovered from H − H^{-} H − by adding the isolated vertex labeled l l l . Different ( F i b d ) (F_i^{\mathrm{bd}}) ( F i bd ) have disjoint assignments, so their errors are orthogonal. Automorphisms over H H H simply rename the abstract vertices in H H H and permute over ( F i b d ) (F_i^{\mathrm{bd}}) ( F i bd ) ; so they preserve the properties of f f f in Theorem 4.5. As f f f is unique, summing over different F i b d F_i^{\mathrm{bd}} F i bd and x x x produces a vector w w w invariant under Aut ( H ) \operatorname{Aut}(H) Aut ( H ) . Therefore Theorem 4.2 gives us the same bound when using databases. Together with preservation of the good space when y y y has an incident edge, this gives w ∈ Ran ( Π t + 1 g o o d ) w\in\operatorname{Ran}(\Pi^{\mathrm{good}}_{t+1}) w ∈ Ran ( Π t + 1 good ) with the same bound for every z ∈ Ran ( Π t + 1 g o o d ) z\in\operatorname{Ran}(\Pi^{\mathrm{good}}_{t+1}) z ∈ Ran ( Π t + 1 good ) in the domain of V † \mathcal{V}^{\dagger} V † .
Finally, write z ∈ Ran ( Π t g o o d ) z\in\operatorname{Ran}(\Pi^{\mathrm{good}}_{t}) z ∈ Ran ( Π t good ) as z = z 0 + z 1 z=z_{0}+z_{1} z = z 0 + z 1 , where l ∉ Im ( L ) l\notin\operatorname{Im}(L) l ∈ / Im ( L ) on z 0 z_{0} z 0 and l ∈ Im ( L ) l\in\operatorname{Im}(L) l ∈ Im ( L ) on z 1 z_{1} z 1 , with ∣ L ∣ = r |L|=r ∣ L ∣ = r and ∣ L ∣ = r + 1 |L|=r+1 ∣ L ∣ = r + 1 , respectively. By Eqs. (4) and (30) ,
p C l a b i n v ( z 0 + z 1 ) = V † z 1 + V z 0 + z 1 − V V † z 1 . pC_{\mathrm{lab}}^{\mathrm{inv}}(z_{0}+z_{1})=\mathcal{V}^{\dagger}z_{1}+\mathcal{V}z_{0}+z_{1}-\mathcal{V}\mathcal{V}^{\dagger}z_{1}. p C lab inv ( z 0 + z 1 ) = V † z 1 + V z 0 + z 1 − V V † z 1 .
Choose w ∈ Ran ( Π t g o o d ) w\in\operatorname{Ran}(\Pi^{\mathrm{good}}_{t}) w ∈ Ran ( Π t good ) satisfying the bound above for V † z 1 \mathcal{V}^{\dagger}z_{1} V † z 1 . By the insertion argument,
z + = w + V z 0 + z 1 − V w ∈ Ran ( Π t + 1 g o o d ) . z^{+}=w+\mathcal{V}z_{0}+z_{1}-\mathcal{V}w\in\operatorname{Ran}(\Pi^{\mathrm{good}}_{t+1}). z + = w + V z 0 + z 1 − V w ∈ Ran ( Π t + 1 good ) .
The vectors V † z 1 − w \mathcal{V}^{\dagger}z_{1}-w V † z 1 − w and V ( V † z 1 − w ) \mathcal{V}(\mathcal{V}^{\dagger}z_{1}-w) V ( V † z 1 − w ) have the same norm and are orthogonal, since the label l l l is absent in the first and present in the second. Therefore,
∥ p C l a b i n v ( z 0 + z 1 ) − z + ∥ 2 = 2 ∥ V † z 1 − w ∥ 2 = O ( t M ) ∥ z 1 ∥ 2 ≤ O ( t M ) ∥ z 0 + z 1 ∥ 2 . \begin{aligned}
\left\|pC_{\mathrm{lab}}^{\mathrm{inv}}(z_{0}+z_{1})-z^{+}\right\|^{2}
=2\left\|\mathcal{V}^{\dagger}z_{1}-w\right\|^{2} \\
&=O\left(\frac{t}{M}\right)\|z_{1}\|^{2}
\leq O\left(\frac{t}{M}\right)\|z_{0}+z_{1}\|^{2}.
\end{aligned} p C lab inv ( z 0 + z 1 ) − z + 2 = 2 V † z 1 − w 2 = O ( M t ) ∥ z 1 ∥ 2 ≤ O ( M t ) ∥ z 0 + z 1 ∥ 2 .
The subspaces for different query labels and label counts r , r + 1 r,r+1 r , r + 1 are orthogonal, and l = 0 l=0 l = 0 is fixed by p C l a b i n v pC_{\mathrm{lab}}^{\mathrm{inv}} p C lab inv . This proves the claim, including t = 0 t=0 t = 0 , when U − = ∅ U^{-}=\varnothing U − = ∅ .
Finally, we find that p C l a b f o r pC_{\mathrm{lab}}^{\mathrm{for}} p C lab for and P P P cannot affect goodness.
Lemma 4.8. Let t ≤ 6 q + 6 t\leq6q+6 t ≤ 6 q + 6 and suppose Eq. (49) holds. Then
( 1 − Π t + 1 g o o d ) ⋅ p C l a b f o r ⋅ Π t g o o d = 0 , (\mathbb{1}-\Pi^{\mathrm{good}}_{t+1})\cdot pC_{\mathrm{lab}}^{\mathrm{for}}\cdot\Pi^{\mathrm{good}}_{t}=0, ( 1 − Π t + 1 good ) ⋅ p C lab for ⋅ Π t good = 0 , ( 1 − Π t g o o d ) ⋅ P ⋅ Π t g o o d = 0. (\mathbb{1}-\Pi^{\mathrm{good}}_{t})\cdot P\cdot\Pi^{\mathrm{good}}_{t}=0. ( 1 − Π t good ) ⋅ P ⋅ Π t good = 0.
Proof. Fix some query input ∣ l , α ⟩ X |l,\alpha\rangle_{X} ∣ l , α ⟩ X and a canonical good vector ∣ g D ⟩ |g_{D}\rangle ∣ g D ⟩ with ∣ E ( H ) ∣ + ∣ Dom ( λ H ) ∣ ≤ t |E(H)|+|\operatorname{Dom}(\lambda_{H})|\leq t ∣ E ( H ) ∣ + ∣ Dom ( λ H ) ∣ ≤ t . By Eqs. (51) and (52) , every assignment ϕ \phi ϕ in ∣ g D ⟩ |g_{D}\rangle ∣ g D ⟩ satisfies ϕ ( U i ∖ C u i t r e e ) ⊆ V m i d \phi(U_{i}\setminus C^{\mathrm{tree}}_{u_{i}})\subseteq V_{\mathrm{mid}} ϕ ( U i ∖ C u i tree ) ⊆ V mid . Therefore, any vertex assigned outside of V m i d V_{\mathrm{mid}} V mid must be in C u i t r e e C^{\mathrm{tree}}_{u_{i}} C u i tree with its location specified by w i = W u i f i x w_{i}=W^{\mathrm{fix}}_{u_{i}} w i = W u i fix .
If l ∉ Im ( λ H ) ∪ { 0 } l\notin\operatorname{Im}(\lambda_{H})\cup\{0\} l ∈ / Im ( λ H ) ∪ { 0 } , both p C l a b f o r pC_{\mathrm{lab}}^{\mathrm{for}} p C lab for and P P P act as the identity. Otherwise, let v : = L − 1 ( l ) v:=L^{-1}(l) v := L − 1 ( l ) and w : = s F ( l , α , L ϕ , C ϕ ) w:=s_{F}(l,\alpha,L_{\phi},C_{\phi}) w := s F ( l , α , L ϕ , C ϕ ) be the structural vertex and its neighbor according to I I I .
Consider p C l a b f o r pC_{\mathrm{lab}}^{\mathrm{for}} p C lab for . Assume that w ∉ { ⊥ , v , 0 } w\notin\{\bot,v,0\} w ∈ / { ⊥ , v , 0 } as otherwise p C l a b f o r pC_{\mathrm{lab}}^{\mathrm{for}} p C lab for acts as the identity. If w w w is from a recorded edge, then for u = λ H − 1 ( l ) u=\lambda_{H}^{-1}(l) u = λ H − 1 ( l ) , there exists some abstract vertex such that ( u , y ) ∈ E ( H ) (u,y)\in E(H) ( u , y ) ∈ E ( H ) , Color H ( u , y ) = α \operatorname{Color}_{H}(u,y)=\alpha Color H ( u , y ) = α and w = ϕ ( y ) w=\phi(y) w = ϕ ( y ) . Adding, deleting or replacing the label at w w w only changes λ H ( y ) \lambda_{H}(y) λ H ( y ) . Since y y y has an incident edge, these changes do not remove it from H H H . Therefore, the goodness conditions in Eq. (52) do not change. On the other hand, if w w w is from an unpermuted edge, then v , w ∉ V m i d v,w\notin V_{\mathrm{mid}} v , w ∈ / V mid . Thus D D D determines w w w and every equality w = ϕ ( y ) w=\phi(y) w = ϕ ( y ) . Adding or removing an isolated vertex at w w w does not impose any further injectivity constraints. Hence the identity on p C l a b f o r pC_{\mathrm{lab}}^{\mathrm{for}} p C lab for follows.
For P P P , notice that for all databases ∣ I ⟩ |I\rangle ∣ I ⟩ in ∣ g D ⟩ |g_{D}\rangle ∣ g D ⟩ , the value we XOR is the same. Hence we do not alter ∣ g D ⟩ |g_{D}\rangle ∣ g D ⟩ , showing the second equality.
Finally, applying Theorems 4.6 to 4.8 to the factors in Eq. (40) , we find that applying c p W T \mathrm{cpWT} cpWT approximately preserves the goodness property.
Theorem 4.9. Let t ≤ 6 q t \leq6q t ≤ 6 q and suppose Eq. (49) holds. Then
∥ ( 1 − Π t + 6 g o o d ) ⋅ c p W T ⋅ Π t g o o d ∥ = O ( n t s t e p ) . \left\lVert(1-\Pi^{\mathrm{good}}_{t+6})\cdot\mathrm{cpWT}\cdot\Pi^{\mathrm{good}}_{t}\right\rVert=O\left(n_{t}^{\mathrm{step}}\right). ( 1 − Π t + 6 good ) ⋅ cpWT ⋅ Π t good = O ( n t step ) .
Ordinary and exact queries
Next, we want to transfer the goodness estimate on c p W T \mathrm{cpWT} cpWT to c p W T ^ \widehat{\mathrm{cpWT}} cpWT . The only change we make to the goodness definitions is that the boundary set B B B is slightly expanded. Specifically, we take the class of endpoints V c l a s s ( b ) \mathrm{V}_{\mathrm{class}}(b) V class ( b ) defined just before Theorem 3.8 and use B b = V b d ∪ V c l a s s ( b ) B_b=V_{\mathrm{bd}}\cup V_{\mathrm{class}}(b) B b = V bd ∪ V class ( b ) as the boundary. First we show that this change does not greatly affect the good projector.
Lemma 4.10 (Boundary adjustment). Let R ⊆ ( V m i d ∪ V b d ) ∖ V w e l d R\subseteq(V_{\mathrm{mid}}\cup V_{\mathrm{bd}})\setminus V_{\mathrm{weld}} R ⊆ ( V mid ∪ V bd ) ∖ V weld and assume Eq. (56) holds with B B B replaced by B ∪ R B\cup R B ∪ R . Then,
∥ Π t g o o d ( B ) − Π t g o o d ( B ∪ R ) ∥ = O ( t ∣ R ∣ N ) . \left\lVert\Pi^{\mathrm{good}}_{t}(B)-\Pi^{\mathrm{good}}_{t}(B\cup R)\right\rVert=O\left(\sqrt{\frac{t|R|}{N}}\right). Π t good ( B ) − Π t good ( B ∪ R ) = O ( N t ∣ R ∣ ) .
Proof. Assume that t ≥ 1 t\geq1 t ≥ 1 . Fix some recorded component H i H_i H i and its set of boundary points F = F i b d F=F_i^{\mathrm{bd}} F = F i bd for B B B . Let S = S i , F S=S_{i,F} S = S i , F and S ′ S' S ′ be the coefficient space for B ∪ R B\cup R B ∪ R on the same assignments, before imposing the injectivity projector. We compare both spaces using the norm from μ i , F r e f \mu^{\mathrm{ref}}_{i,F} μ i , F ref by Eq. (54) . Let the error bound ϵ \epsilon ϵ be,
ϵ : = C m i ∣ R ∣ N , \epsilon:=\frac{Cm_i|R|}{N}, ϵ := N C m i ∣ R ∣ ,
where C C C is some constant. Assume that ϵ ≤ 1 / 16 \epsilon\leq1/16 ϵ ≤ 1/16 as otherwise the statement trivially follows. Let k k k be the number of tree components containing a vertex u u u such that ϕ ( u ) ∈ R \phi(u)\in R ϕ ( u ) ∈ R and
k ( ϕ ) : = ∣ { C v t r e e : v ∈ U i , ϕ ( C v t r e e ) ∩ R ≠ ∅ } ∣ Π j : = 1 [ k = j ] . k(\phi):=\left|\left\{C^{\mathrm{tree}}_v:v\in U_i,\ \phi(C^{\mathrm{tree}}_v)\cap R\neq\varnothing\right\}\right|
\qquad
\Pi_j:=\mathbb{1}[k=j]. k ( ϕ ) := { C v tree : v ∈ U i , ϕ ( C v tree ) ∩ R = ∅ } Π j := 1 [ k = j ] .
When F ⊆ C u t r e e F\subseteq C^{\mathrm{tree}}_u F ⊆ C u tree , Theorem 4.3 gives us,
E [ k − 1 [ ϕ ( C u t r e e ) ∩ R ≠ ∅ ] ∣ W u f i x ] ≤ ϵ . (69) \mathbb{E}\left[k-\mathbb{1}[\phi(C^{\mathrm{tree}}_u)\cap R\neq\varnothing]\mid W^{\mathrm{fix}}_u\right]\leq\epsilon. \tag*{(69)} E [ k − 1 [ ϕ ( C u tree ) ∩ R = ∅ ] ∣ W u fix ] ≤ ϵ . (69)
To see this, consider the following. Equivalently, Eq. (69) counts the number of components C v t r e e ≠ C u t r e e C^{\mathrm{tree}}_v\neq C^{\mathrm{tree}}_u C v tree = C u tree containing a vertex a a a such that ϕ ( a ) ∈ R \phi(a)\in R ϕ ( a ) ∈ R . Due to the fact that R ∩ V w e l d = ∅ R\cap V_{\mathrm{weld}}=\varnothing R ∩ V weld = ∅ , such a vertex satisfies a ∉ S u f i x a\notin S^{\mathrm{fix}}_u a ∈ / S u fix . For each a ∉ S u f i x a\notin S^{\mathrm{fix}}_u a ∈ / S u fix , Theorem 4.3 gives us,
Pr [ X a ∈ R ∣ W u f i x ] = O ( ∣ R ∣ N ) . \Pr[X_a\in R\mid W^{\mathrm{fix}}_u]=O\left(\frac{|R|}{N}\right). Pr [ X a ∈ R ∣ W u fix ] = O ( N ∣ R ∣ ) .
Summing over the m i m_i m i vertices gives us Eq. (69) . Root H i H_i H i at some abstract vertex r r r . Let K K K be the space of sums h = ∑ v ∈ U i h v ( W v f i x ) h=\sum_{v\in U_i}h_v(W^{\mathrm{fix}}_v) h = ∑ v ∈ U i h v ( W v fix ) , where h v h_v h v is 0 0 0 unless v v v is the vertex of C v t r e e C^{\mathrm{tree}}_v C v tree closest to r r r in H i H_i H i , F ⊆ C v t r e e F\subseteq C^{\mathrm{tree}}_v F ⊆ C v tree and ϕ ( C v t r e e ) ∩ R ≠ ∅ \phi(C^{\mathrm{tree}}_v)\cap R\neq\varnothing ϕ ( C v tree ) ∩ R = ∅ . Hence K ⊆ S K\subseteq S K ⊆ S and Π 0 K = 0 \Pi_0K=0 Π 0 K = 0 . By Eq. (52) ,
S ′ = Π 0 S ⊕ Π 1 K . S'=\Pi_0S\oplus\Pi_1K. S ′ = Π 0 S ⊕ Π 1 K .
To see this, consider the cases on k k k . When k = 0 k=0 k = 0 , ϕ ( U i ) ∩ R = ∅ \phi(U_i)\cap R=\varnothing ϕ ( U i ) ∩ R = ∅ and thus replacing B B B by B ∪ R B\cup R B ∪ R does not affect the goodness condition in Eq. (52) . When k = 1 k=1 k = 1 , then some specific component C u t r e e C^{\mathrm{tree}}_u C u tree must satisfy F ⊆ C u t r e e F\subseteq C^{\mathrm{tree}}_u F ⊆ C u tree and ϕ ( C u t r e e ) ∩ R ≠ ∅ \phi(C^{\mathrm{tree}}_u)\cap R\neq\varnothing ϕ ( C u tree ) ∩ R = ∅ . Lastly, when k ≥ 2 k\geq2 k ≥ 2 , at least two distinct tree components in H i H_i H i contain vertices mapped to R R R , which violates Eq. (52) .
Let us bound ∥ ( 1 − Π 0 ) f ∥ \lVert(1-\Pi_0)f\rVert ∥( 1 − Π 0 ) f ∥ for f ∈ S ∩ K ⊥ f\in S\cap K^\perp f ∈ S ∩ K ⊥ . Fix a ∈ U i a\in U_i a ∈ U i . If F = ∅ F=\varnothing F = ∅ , write f = f a + ∑ v ≠ a f v f=f_a+\sum_{v\neq a}f_v f = f a + ∑ v = a f v using Theorem 4.4 with root a a a . Otherwise, choose some c ∈ F c\in F c ∈ F and decompose f f f as,
f = f a + g , f a : = 1 [ a ∈ C c t r e e ] f , g : = 1 [ a ∉ C c t r e e ] f . f=f_a+g,\qquad f_a:=\mathbb{1}[a\in C^{\mathrm{tree}}_c]f,\qquad g:=\mathbb{1}[a\notin C^{\mathrm{tree}}_c]f. f = f a + g , f a := 1 [ a ∈ C c tree ] f , g := 1 [ a ∈ / C c tree ] f .
In both cases, f a f_a f a depends only on W f i x W^{\mathrm{fix}} W fix and the terms remain orthogonal after multiplication by Q a : = 1 [ X a ∈ R ] Q_a := \mathbb{1}[X_a \in R] Q a := 1 [ X a ∈ R ] . As Q a f a ∈ K Q_a f_a \in\mathcal{K} Q a f a ∈ K , ∥ Q a f a ∥ 2 = 0 \lVert Q_a f_a\rVert^2 = 0 ∥ Q a f a ∥ 2 = 0 . Otherwise for f v f_v f v such that v ≠ a v \ne a v = a , Theorems 4.3 and 4.4 imply that
∥ Q a f v ∥ 2 ≤ C ∣ R ∣ N ∥ f v ∥ 2 , \lVert Q_a f_v\rVert^2 \le\frac{C|R|}{N}\lVert f_v\rVert^2, ∥ Q a f v ∥ 2 ≤ N C ∣ R ∣ ∥ f v ∥ 2 ,
and a similar argument works for g g g . Therefore,
∥ ( 1 − Π 0 ) f ∥ 2 ≤ ∑ a ∈ U i ∥ Q a f ∥ 2 ≤ ϵ ∥ f ∥ 2 . (70) \lVert(1-\Pi_0)f\rVert^2 \le\sum_{a\in U_i}\lVert Q_a f\rVert^2 \le\epsilon\lVert f\rVert^2. \tag*{(70)} ∥( 1 − Π 0 ) f ∥ 2 ≤ a ∈ U i ∑ ∥ Q a f ∥ 2 ≤ ϵ ∥ f ∥ 2 . (70)
Next we consider the case when k = 1 k=1 k = 1 . Writing h = ∑ v h v ∈ K h=\sum_v h_v\in\mathcal{K} h = ∑ v h v ∈ K , the only summand that is not 0 0 0 is h v h_v h v for the closest v v v to r r r in the unique component such that ϕ ( C v t r e e ) ∩ R ≠ ∅ \phi(C^{\mathrm{tree}}_v)\cap R\ne\emptyset ϕ ( C v tree ) ∩ R = ∅ . By Eq. (69) ,
∥ h ∥ 2 ≥ ∥ Π 1 h ∥ 2 = ∑ v ∥ Π 1 h v ∥ 2 ≥ ( 1 − ϵ ) ∑ v ∥ h v ∥ 2 . \lVert h\rVert^2\ge\lVert\Pi_1h\rVert^2=\sum_v\lVert\Pi_1h_v\rVert^2\ge(1-\epsilon)\sum_v\lVert h_v\rVert^2. ∥ h ∥ 2 ≥ ∥ Π 1 h ∥ 2 = v ∑ ∥ Π 1 h v ∥ 2 ≥ ( 1 − ϵ ) v ∑ ∥ h v ∥ 2 .
For an arbitrary k k k , at most k k k terms are nonzero. Using Cauchy-Schwarz, we find that
∥ h − Π 1 h ∥ 2 ≤ 2 ∑ v E [ ( k − 1 ) ∣ h v ∣ 2 ] ≤ 2 ϵ 1 − ϵ ∥ h ∥ 2 . (71) \lVert h-\Pi_1h\rVert^2\le2\sum_v\mathbb{E}[(k-1)|h_v|^2]\le\frac{2\epsilon}{1-\epsilon}\lVert h\rVert^2. \tag*{(71)} ∥ h − Π 1 h ∥ 2 ≤ 2 v ∑ E [( k − 1 ) ∣ h v ∣ 2 ] ≤ 1 − ϵ 2 ϵ ∥ h ∥ 2 . (71)
Write any f ∈ S f\in S f ∈ S as f = g + h f=g+h f = g + h where g ∈ S ∩ K ⊥ g\in S\cap\mathcal{K}^{\perp} g ∈ S ∩ K ⊥ and h ∈ K h\in\mathcal{K} h ∈ K . Letting f ′ = Π 0 g + Π 1 h ∈ S ′ f'=\Pi_0g+\Pi_1h\in S' f ′ = Π 0 g + Π 1 h ∈ S ′ , Eqs. (70) and (71) imply
∥ f − f ′ ∥ ≤ 2 ϵ ∥ f ∥ , \lVert f-f'\rVert\le2\sqrt{\epsilon}\lVert f\rVert, ∥ f − f ′ ∥ ≤ 2 ϵ ∥ f ∥ ,
∥ f ′ ∥ ≥ ( 1 − 2 ϵ ) ∥ f ∥ . \lVert f'\rVert\ge(1-2\sqrt{\epsilon})\lVert f\rVert. ∥ f ′ ∥ ≥ ( 1 − 2 ϵ ) ∥ f ∥ .
Since Π 0 K = 0 \Pi_0\mathcal{K}=0 Π 0 K = 0 , this holds for every f ′ ∈ S ′ f'\in S' f ′ ∈ S ′ . Let P i , P i ′ P_i,P'_i P i , P i ′ be the orthogonal projectors for the coefficient spaces in H i H_i H i . Therefore, ∥ P i − P i ′ ∥ = O ( ϵ ) \lVert P_i-P'_i\rVert=O(\sqrt{\epsilon}) ∥ P i − P i ′ ∥ = O ( ϵ ) . Letting P = ⨂ i P i P=\bigotimes_iP_i P = ⨂ i P i and P ′ = ⨂ i P i ′ P'=\bigotimes_iP'_i P ′ = ⨂ i P i ′ be the projectors over the entire forest, we have,
∥ P − P ′ ∥ 2 ≤ ∑ i ∥ P i − P i ′ ∥ 2 = O ( t ∣ R ∣ N ) , \lVert P-P'\rVert^2\le\sum_i\lVert P_i-P'_i\rVert^2=O\left(\frac{t|R|}{N}\right), ∥ P − P ′ ∥ 2 ≤ i ∑ ∥ P i − P i ′ ∥ 2 = O ( N t ∣ R ∣ ) ,
since ∑ i m i ≤ 2 t \sum_i m_i\le2t ∑ i m i ≤ 2 t . Let Q , Q ′ Q,Q' Q , Q ′ project onto the coefficient spaces Π i n j Ran ( P ) \Pi^{\mathrm{inj}}\operatorname{Ran}(P) Π inj Ran ( P ) and Π i n j Ran ( P ′ ) \Pi^{\mathrm{inj}}\operatorname{Ran}(P') Π inj Ran ( P ′ ) , respectively. By Theorem 4.5, every coefficient function h ∈ Π i n j Ran ( P ) h\in\Pi^{\mathrm{inj}}\operatorname{Ran}(P) h ∈ Π inj Ran ( P ) has a representative f ∈ Ran ( P ) f\in\operatorname{Ran}(P) f ∈ Ran ( P ) with Π i n j f = h \Pi^{\mathrm{inj}}f=h Π inj f = h and ∥ f ∥ ≤ 2 ∥ h ∥ \lVert f\rVert\le\sqrt{2}\lVert h\rVert ∥ f ∥ ≤ 2 ∥ h ∥ . The same holds for P ′ P' P ′ . Thus Theorem 2.2 with G = Π i n j G=\Pi^{\mathrm{inj}} G = Π inj gives
∥ Q − Q ′ ∥ ≤ 2 ∥ P − P ′ ∥ = O ( t ∣ R ∣ N ) . (72) \lVert Q-Q'\rVert\le\sqrt{2}\lVert P-P'\rVert=O\left(\sqrt{\frac{t|R|}{N}}\right). \tag*{(72)} ∥ Q − Q ′ ∥ ≤ 2 ∥ P − P ′ ∥ = O ( N t ∣ R ∣ ) . (72)
Take the orthogonal sum of Eq. (72) over ( F i b d ) i (F_i^{\mathrm{bd}})_i ( F i bd ) i . The resulting projectors commute with Aut ( H ) \operatorname{Aut}(H) Aut ( H ) as renaming preserves both good spaces. Applying Theorem 4.2 completes the proof.
Next we use the T b d i f f T_b^{\mathrm{diff}} T b diff operator from Theorem 3.8.
Lemma 4.11. Suppose V c l a s s ( b ) ∩ V w e l d = ∅ V_{\mathrm{class}}(b)\cap V_{\mathrm{weld}}=\emptyset V class ( b ) ∩ V weld = ∅ . The operator T b d i f f T_b^{\mathrm{diff}} T b diff preserves the good space with the boundary set B b B_b B b .
Proof. Fix algorithm basis states a a a , a ′ a' a ′ and a canonical good vector ∣ g D ⟩ |g_D\rangle ∣ g D ⟩ with boundary B b B_b B b . Since V c l a s s ( b ) ⊆ B b V_{\mathrm{class}}(b)\subseteq B_b V class ( b ) ⊆ B b , Eq. (52) gives that for every i i i ,
ϕ ( U i ∖ C u i t r e e ) ∩ V c l a s s ( b ) = ∅ . \phi(U_i\setminus C^{\mathrm{tree}}_{u_i})\cap V_{\mathrm{class}}(b)=\emptyset. ϕ ( U i ∖ C u i tree ) ∩ V class ( b ) = ∅. Thus all vertices represented in V c l a s s ( b ) V_{\mathrm{class}}(b) V class ( b ) lie in the fixed tree components C u i t r e e C^{\mathrm{tree}}_{u_i} C u i tree , and I b I_b I b is determined by the fixed data. By Theorem 3.8, T b d i f f T_b^{\mathrm{diff}} T b diff changes only I b I_b I b . Its coefficients depend on I ¬ b I_{\neg b} I ¬ b only through label names and their number, which are fixed by D D D . Hence they do not depend on the remaining assignments.
As V c l a s s ( b ) ∩ V w e l d = ∅ V_{\mathrm{class}}(b) \cap V_{\mathrm{weld}} = \varnothing V class ( b ) ∩ V weld = ∅ , the changed edges are inside trees. Deleting them splits the tree components C u i t r e e C^{\mathrm{tree}}_{u_i} C u i tree , and inserting them joins such components. Since they are entirely in the tree components, this cannot create a cycle. Each connected component left after removing the tree components C u i t r e e C^{\mathrm{tree}}_{u_i} C u i tree is joined to them exactly by a single weld edge, otherwise we would already have a cycle in H H H . Since they are not altered, each remaining component stays connected to just one of the resulting fixed tree components. All vertices assigned to B b B_b B b therefore still belong to these fixed tree components.
The remaining assignments and their edge factors are unchanged. Their injectivity conditions are also unchanged, since every added or removed vertex lies in V c l a s s ( b ) V_{\mathrm{class}}(b) V class ( b ) , which they already avoid. For each resulting description D ′ D' D ′ , the changed edge factors, each equal to 1 / ∣ E b ∣ 1/|E_b| 1/∣ E b ∣ , and reference normalizing constants depend only on its fixed data and forest. The contribution is therefore a scalar multiple of ∣ g D ′ ⟩ |g_{D'}\rangle ∣ g D ′ ⟩ , giving
( ⟨ a ′ ∣ T b d i f f ∣ a ⟩ ) ∣ g D ⟩ ∈ Span { ∣ g D ′ ⟩ : D ′ has boundary B b } , (\langle a'|T_b^{\mathrm{diff}}|a\rangle)|g_D\rangle\in\operatorname{Span}\{|g_{D'}\rangle: D' \text{ has boundary } B_b\}, (⟨ a ′ ∣ T b diff ∣ a ⟩) ∣ g D ⟩ ∈ Span { ∣ g D ′ ⟩ : D ′ has boundary B b } ,
which proves the claim.
Proposition 4.12. Let t ≤ 6 q t \le6q t ≤ 6 q and suppose Eq. (49) holds. Then
∥ ( 1 − Π t + 6 g o o d ) ⋅ c p W T ⋅ Π t g o o d ∥ = O ( ϵ l + n ⋅ ( t + 1 ) N ) . \left\|(1-\Pi_{t+6}^{\mathrm{good}})\cdot\mathrm{cpWT}\cdot\Pi_t^{\mathrm{good}}\right\| = O\left(\sqrt{\epsilon_l}+\sqrt{\frac{n\cdot(t+1)}{N}}\right). ( 1 − Π t + 6 good ) ⋅ cpWT ⋅ Π t good = O ( ϵ l + N n ⋅ ( t + 1 ) ) . Proof. Let t ′ : = t + 6 t' := t+6 t ′ := t + 6 bound the number of records after the query c p W T \mathrm{cpWT} cpWT and
T b : = Π ≤ t ′ T b d i f f Π ≤ t ′ , I , T : = ∑ b T b . T_b := \Pi_{\leq t'}T_b^{\mathrm{diff}}\Pi_{\leq t',I}, \qquad T := \sum_b T_b. T b := Π ≤ t ′ T b diff Π ≤ t ′ , I , T := b ∑ T b . By Theorems 2.1 and 3.8, the operators T b T_b T b are self-adjoint, T b T c = 0 T_bT_c=0 T b T c = 0 for all b , c b,c b , c such that b ≠ c b\ne c b = c and ∥ T ∥ = max b ∥ T b ∥ = O ( 1 ) \|T\|=\max_b\|T_b\|=O(1) ∥ T ∥ = max b ∥ T b ∥ = O ( 1 ) . Let c > 0 c>0 c > 0 be some constant we will set later and define,
Π b : = { Π t ′ g o o d ( B b ) if t ′ ∣ E b ∣ ≤ c N , 0 otherwise. \Pi_b := \begin{cases}
\Pi_{t'}^{\mathrm{good}}(B_b) & \text{if }t'|E_b|\le cN,\\
0 & \text{otherwise.}
\end{cases} Π b := { Π t ′ good ( B b ) 0 if t ′ ∣ E b ∣ ≤ c N , otherwise. Choose c c c to be a sufficiently small constant so that the first condition only holds when V c l a s s ( b ) ∩ V w e l d = ∅ V_{\mathrm{class}}(b)\cap V_{\mathrm{weld}}=\varnothing V class ( b ) ∩ V weld = ∅ as all edge classes E b E_b E b with endpoints in V w e l d V_{\mathrm{weld}} V weld have ∣ E b ∣ = Ω ( N ) |E_b|=\Omega(N) ∣ E b ∣ = Ω ( N ) by Theorem 3.2 and Eq. (22) . First assume that b b b is such that Π b ≠ 0 \Pi_b\ne0 Π b = 0 . Every abstract forest with at most t ′ t' t ′ records has at most 2 t ′ 2t' 2 t ′ vertices, meaning that Eq. (49) gives,
8 t ′ ∣ B b ∣ N ≤ 8 t ′ ( ∣ V b d ∣ + 2 ∣ E b ∣ ) N = O ( ( q + 1 ) ϵ l + c ) ≤ 1 2 . \frac{8t'|B_b|}{N}\le\frac{8t'(|V_{\mathrm{bd}}|+2|E_b|)}{N}=O((q+1)\epsilon_l+c)\le\frac{1}{2}. N 8 t ′ ∣ B b ∣ ≤ N 8 t ′ ( ∣ V bd ∣ + 2∣ E b ∣ ) = O (( q + 1 ) ϵ l + c ) ≤ 2 1 . Thus Theorems 4.10 and 4.11 imply that [ Π b , T b ] = 0 [\Pi_b,T_b]=0 [ Π b , T b ] = 0 and
∥ T b ∥ ∥ Π t ′ g o o d − Π b ∥ = O ( ∣ E b ∣ − 1 / 2 t ′ ∣ E b ∣ N ) = O ( t ′ N ) . \|T_b\|\|\Pi_{t'}^{\mathrm{good}}-\Pi_b\|=O\left(|E_b|^{-1/2}\sqrt{\frac{t'|E_b|}{N}}\right)=O\left(\sqrt{\frac{t'}{N}}\right). ∥ T b ∥∥ Π t ′ good − Π b ∥ = O ( ∣ E b ∣ − 1/2 N t ′ ∣ E b ∣ ) = O ( N t ′ ) . In the other case when ∣ E b ∣ > c N / t ′ |E_b|>cN/t' ∣ E b ∣ > c N / t ′ , we have Π b = 0 \Pi_b=0 Π b = 0 and hence the same conclusions hold as well since ∥ T b ∥ ≤ ∥ T b d i f f Π ≤ t ′ , I ∥ = O ( ∣ E b ∣ − 1 / 2 ) \|T_b\|\le\|T_b^{\mathrm{diff}}\Pi_{\leq t',I}\|=O(|E_b|^{-1/2}) ∥ T b ∥ ≤ ∥ T b diff Π ≤ t ′ , I ∥ = O ( ∣ E b ∣ − 1/2 ) by Theorem 3.8. As there are O ( n ) O(n) O ( n ) classes, Theorem 2.3 gives us,
∥ [ Π t ′ g o o d , T ] ∥ ≤ 2 ∑ b ∥ T b ∥ 2 ∥ Π t ′ g o o d − Π b ∥ 2 = O ( n t ′ N ) . \left\|[\Pi_{t'}^{\mathrm{good}},T]\right\|\le2\sqrt{\sum_b\|T_b\|^2\|\Pi_{t'}^{\mathrm{good}}-\Pi_b\|^2}=O\left(\sqrt{\frac{nt'}{N}}\right). [ Π t ′ good , T ] ≤ 2 b ∑ ∥ T b ∥ 2 ∥ Π t ′ good − Π b ∥ 2 = O ( N n t ′ ) . Starting with at most t t t records, applications of p C l a b i n v \mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab}} pC lab inv , T T T , and p C l a b i n v \mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab}} pC lab inv from Eq. (43) leave at most t + 1 t+1 t + 1 , t + 4 t+4 t + 4 and t + 5 t+5 t + 5 records, respectively. The good state projectors preserve the number of records. Therefore,
∥ ( 1 − Π t ′ g o o d ) ⋅ c p W T ⋅ Π t g o o d ∥ ≤ O ( η t s t e p ) + ∥ ( 1 − Π t ′ g o o d ) ⋅ ( c p W T − c p W T ) ⋅ Π t g o o d ∥ (By citet‘Theorem 4.9‘) ≤ O ( η t s t e p + 1 N ) + ∥ ( 1 − Π t ′ g o o d ) ⋅ p C l a b i n v T p C l a b i n v ⋅ Π t g o o d ∥ (By citet‘Theorem 3.8‘) \begin{aligned}
\left\|(1-\Pi_{t'}^{\mathrm{good}})\cdot\mathrm{cpWT}\cdot\Pi_t^{\mathrm{good}}\right\|
&\le O(\eta_t^{\mathrm{step}})+\left\|(1-\Pi_{t'}^{\mathrm{good}})\cdot(\mathrm{cpWT}-\mathrm{cpWT})\cdot\Pi_t^{\mathrm{good}}\right\| && \text{(By {citet}`Theorem 4.9`)}\\
&\le O\left(\eta_t^{\mathrm{step}}+\frac{1}{N}\right)+\left\|(1-\Pi_{t'}^{\mathrm{good}})\cdot\mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab}}T\mathrm{pC}^{\mathrm{inv}}_{\mathrm{lab}}\cdot\Pi_t^{\mathrm{good}}\right\| && \text{(By {citet}`Theorem 3.8`)}
\end{aligned} ( 1 − Π t ′ good ) ⋅ cpWT ⋅ Π t good ≤ O ( η t step ) + ( 1 − Π t ′ good ) ⋅ ( cpWT − cpWT ) ⋅ Π t good ≤ O ( η t step + N 1 ) + ( 1 − Π t ′ good ) ⋅ pC lab inv T pC lab inv ⋅ Π t good (By citet ‘Theorem 4.9‘) (By citet ‘Theorem 3.8‘)
≤ O ( η t s t e p + 1 N + t + 1 M ) + ∥ [ Π t ′ g o o d , T ] ∥ ≤ O ( ϵ l + n ⋅ ( t + 1 ) N ) . \begin{aligned}
\le O\left(\eta_t^{\mathrm{step}}+\frac{1}{N}+\sqrt{\frac{t+1}{M}}\right)+\left\lVert\left[\Pi_{t'}^{\mathrm{good}},T\right]\right\rVert\\
&\le O\left(\sqrt{\epsilon_l}+\sqrt{\frac{n\cdot(t+1)}{N}}\right).
\end{aligned} ≤ O ( η t step + N 1 + M t + 1 ) + [ Π t ′ good , T ] ≤ O ( ϵ l + N n ⋅ ( t + 1 ) ) .
Finally, c p ‾ \overline{\mathrm{cp}} cp WT adds at most 5 records each round, meaning the databases have at most t + 5 t+5 t + 5 records.
Single-cycle distribution
Recall that D p r o d \mathcal{D}_{\mathrm{prod}} D prod is the product distribution we used over our graph instances and D s i n g \mathcal{D}_{\mathrm{sing}} D sing is D p r o d \mathcal{D}_{\mathrm{prod}} D prod conditioned on the case that the weld edges form a single cycle. Let us compare the acceptance probabilities under these distributions.
Lemma 4.13. Let p D ( A ) p_{\mathcal{D}}(\mathcal{A}) p D ( A ) be the acceptance probability of a quantum algorithm A \mathcal{A} A making q ≥ 1 q \ge1 q ≥ 1 queries to an oracle sampled from D \mathcal{D} D . Then,
p D s i n g ( A ) = O ( p D p r o d ( A ) + n ⋅ q 2 N ) . p_{\mathcal{D}_{\mathrm{sing}}}(\mathcal{A})=O\left(p_{\mathcal{D}_{\mathrm{prod}}}(\mathcal{A})+\frac{n\cdot q^2}{N}\right). p D sing ( A ) = O ( p D prod ( A ) + N n ⋅ q 2 ) .
Proof. For each color η ∈ C \eta\in\mathcal{C} η ∈ C , define the vertices at the ends of weld edges colored η \eta η as,
L η : = col ( n ) ∖ C n , η , R η : = col ( n + 1 ) ∖ C n + 1 , η L_\eta:= \operatorname{col}(n)\setminus C_{n,\eta}, \qquad R_\eta:= \operatorname{col}(n+1)\setminus C_{n+1,\eta} L η := col ( n ) ∖ C n , η , R η := col ( n + 1 ) ∖ C n + 1 , η
m η : = ∣ L η ∣ = ∣ R η ∣ = N − N n , η = Θ ( N ) , m_\eta:= \lvert L_\eta\rvert=\lvert R_\eta\rvert=N-N_{n,\eta}=\Theta(N), m η := ∣ L η ∣ = ∣ R η ∣ = N − N n , η = Θ ( N ) ,
where the estimate on the size of m η m_\eta m η is due to Theorem 3.2 . A color-η \eta η matching is some bijection s : L η → R η s:L_\eta\to R_\eta s : L η → R η which represents the edge set { { u , s ( u ) } : u ∈ L η } \{\{u,s(u)\}:u\in L_\eta\} {{ u , s ( u )} : u ∈ L η } .
Let h = ( h η ) η ∈ C h=(h_\eta)_{\eta\in\mathcal{C}} h = ( h η ) η ∈ C be the weld edges of a graph sampled from D s i n g \mathcal{D}_{\mathrm{sing}} D sing and B = ( B η ) η ∈ C B=(B_\eta)_{\eta\in\mathcal{C}} B = ( B η ) η ∈ C some set of recorded values that have been read, where B η ⊆ { ( u , h η ( u ) ) : u ∈ L η } B_\eta\subseteq\{(u,h_\eta(u)):u\in L_\eta\} B η ⊆ {( u , h η ( u )) : u ∈ L η } . Conditioning on the record B B B means that they are present. Let U η : = L η ∖ Dom ( B η ) U_\eta:=L_\eta\setminus\operatorname{Dom}(B_\eta) U η := L η ∖ Dom ( B η ) , V η : = R η ∖ Im ( B η ) V_\eta:=R_\eta\setminus\operatorname{Im}(B_\eta) V η := R η ∖ Im ( B η ) and r η : = ∣ U η ∣ = ∣ V η ∣ = m η − ∣ B η ∣ r_\eta:=\lvert U_\eta\rvert=\lvert V_\eta\rvert=m_\eta-\lvert B_\eta\rvert r η := ∣ U η ∣ = ∣ V η ∣ = m η − ∣ B η ∣ . Notice that for u ∈ U η u\in U_\eta u ∈ U η , v ∈ V η v\in V_\eta v ∈ V η and r η > 1 r_\eta>1 r η > 1 ,
p B η ( u , v ) : = Pr [ h η ( u ) = v ∣ B ] ≤ 1 r η − 1 . (73) p_B^\eta(u,v):=\Pr[h_\eta(u)=v\mid B]\le\frac{1}{r_\eta-1}. \tag*{(73)} p B η ( u , v ) := Pr [ h η ( u ) = v ∣ B ] ≤ r η − 1 1 . (73)
To see this, first condition on complete assignments of color edges for the other colors. These fixed edges along with B η B_\eta B η form paths with r η r_\eta r η free nodes on each side. Notice that both u u u and v v v must be endpoints of their respective paths connecting them. First, suppose that for one of u u u or v v v , the other endpoint on this path is on the opposite side. Deleting this path from a completed cycle and joining its connecting edges allows it to be reinserted exactly in one place for each of the r η − 1 r_\eta-1 r η − 1 possible partners. Hence { u , v } \{u,v\} { u , v } has probability 1 r η − 1 \frac{1}{r_\eta-1} r η − 1 1 , unless it joins the path’s endpoints, in which case it is 0.
Otherwise, u u u is part of a path both of whose endpoints are on the left. Each right endpoint on a path with opposite-side endpoints has probability 1 r η − 1 \frac{1}{r_\eta-1} r η − 1 1 by the argument above, while the rest have equal probability due to symmetry. Therefore, their common probability must be less than 1 r η − 1 \frac{1}{r_\eta-1} r η − 1 1 as otherwise the probabilities would sum over 1. Hence Eq. (73) follows by averaging. For r η ≥ 1 r_\eta\ge1 r η ≥ 1 , let,
t B η ( u , v ) : = 1 − ( r η − 1 ) p B η ( u , v ) . t_B^\eta(u,v):=1-(r_\eta-1)p_B^\eta(u,v). t B η ( u , v ) := 1 − ( r η − 1 ) p B η ( u , v ) .
Notice that by Eq. (73) , t B η ( u , v ) t_B^\eta(u,v) t B η ( u , v ) is nonnegative. Furthermore,
∑ v ∈ V η t B η ( u , v ) = ∑ u ∈ U η t B η ( u , v ) = r η − ( r η − 1 ) = 1. \sum_{v\in V_\eta}t_B^\eta(u,v)=\sum_{u\in U_\eta}t_B^\eta(u,v)=r_\eta-(r_\eta-1)=1. v ∈ V η ∑ t B η ( u , v ) = u ∈ U η ∑ t B η ( u , v ) = r η − ( r η − 1 ) = 1.
We create the assignment B B B using the following process. For every color η \eta η , start with B η = ∅ B_\eta=\varnothing B η = ∅ and let ϕ η : R η → R η \phi_\eta:R_\eta\to R_\eta ϕ η : R η → R η be the identity. One color at a time in some order, repeat the following process until U η U_\eta U η is empty.
Uniformly sample u ∼ U η u \sim U_\eta u ∼ U η and let y = h η ( u ) y = h_\eta(u) y = h η ( u ) .
With probability 1 − 1 r η 1-\frac{1}{r_\eta} 1 − r η 1 , set z = y z=y z = y . Otherwise, sample z ∼ V η z \sim V_\eta z ∼ V η with probability t B η ( u , ⋅ ) t_B^\eta(u,\cdot) t B η ( u , ⋅ ) .
Add ( u , y ) (u,y) ( u , y ) to B η B_\eta B η and exchange the mappings of ϕ η ( y ) \phi_\eta(y) ϕ η ( y ) and ϕ η ( z ) \phi_\eta(z) ϕ η ( z ) .
Afterwards, let g = ( g η ) η ∈ C g=(g_\eta)_{\eta\in C} g = ( g η ) η ∈ C where g η = ϕ η ∘ h η g_\eta=\phi_\eta\circ h_\eta g η = ϕ η ∘ h η . Notice that for each fixed u u u ,
Pr [ z = v ∣ B , u ] = ( 1 − 1 r η ) p B η ( u , v ) + 1 r η t B η ( u , v ) = 1 r η , \Pr[z=v\mid B,u]=\left(1-\frac{1}{r_\eta}\right)p_B^\eta(u,v)+\frac{1}{r_\eta}t_B^\eta(u,v)=\frac{1}{r_\eta}, Pr [ z = v ∣ B , u ] = ( 1 − r η 1 ) p B η ( u , v ) + r η 1 t B η ( u , v ) = r η 1 ,
where B B B is the record before the current u u u was handled. Notice that after swapping ϕ η ( y ) \phi_\eta(y) ϕ η ( y ) and ϕ η ( z ) \phi_\eta(z) ϕ η ( z ) , we have ϕ η ( h η ( u ) ) \phi_\eta(h_\eta(u)) ϕ η ( h η ( u )) is never changed again. Therefore each value of g η g_\eta g η is uniform over the right vertices that were not used beforehand. Therefore all g η g_\eta g η are independent and uniform. Note that this extends when conditioned on previous random choices as they depend on h h h through B B B . Therefore, g g g follows the distribution of weld edges under D p r o d D_{\mathrm{prod}} D prod and hence that from § 3.1 .
Fix some h h h and some records B B B . On the second case in step 2, y = h η ( u ) y=h_\eta(u) y = h η ( u ) is uniform over V η V_\eta V η as it is bijective and z z z is uniform as,
1 r η ∑ u ∈ U η t B η ( u , v ) = 1 r η . \frac{1}{r_\eta}\sum_{u\in U_\eta}t_B^\eta(u,v)=\frac{1}{r_\eta}. r η 1 u ∈ U η ∑ t B η ( u , v ) = r η 1 .
The fixed value of ϕ η ( v ) \phi_\eta(v) ϕ η ( v ) only changes in this branch when v ∈ { y , z } v\in\{y,z\} v ∈ { y , z } . Hence,
Pr [ ϕ η ( v ) changes ∣ h , B ] ≤ 1 r η ( 1 r η + 1 r η ) = 2 r η 2 . \Pr[\phi_\eta(v)\text{ changes}\mid h,B]\leq\frac{1}{r_\eta}\left(\frac{1}{r_\eta}+\frac{1}{r_\eta}\right)=\frac{2}{r_\eta^2}. Pr [ ϕ η ( v ) changes ∣ h , B ] ≤ r η 1 ( r η 1 + r η 1 ) = r η 2 2 .
For a fixed x ∈ L η x\in L_\eta x ∈ L η , we have that h η ( x ) h_\eta(x) h η ( x ) is in V η V_\eta V η when x x x has not been read yet. This has probability r m η \frac{r}{m_\eta} m η r as the order is uniformly random and independent of h h h . By union bounding,
Pr [ g η ( x ) ≠ h η ( x ) ∣ h ] ≤ ∑ r ∈ [ 2 , m η ] r m η 2 r 2 = O ( n N ) . (74) \Pr[g_\eta(x)\ne h_\eta(x)\mid h]\leq\sum_{r\in[2,m_\eta]}\frac{r}{m_\eta}\frac{2}{r^2}=O\left(\frac{n}{N}\right). \tag*{(74)} Pr [ g η ( x ) = h η ( x ) ∣ h ] ≤ r ∈ [ 2 , m η ] ∑ m η r r 2 2 = O ( N n ) . (74)
The inverse mappings have the same bound due to symmetry. Sample some permutations on other edges besides the weld and vertex labels independently of ( g , h ) (g,h) ( g , h ) and use them to obtain the instances of welded trees graph σ ∼ D p r o d \sigma\sim D_{\mathrm{prod}} σ ∼ D prod and σ ′ ∼ D s i n g \sigma'\sim D_{\mathrm{sing}} σ ′ ∼ D sing built from g g g and h h h respectively. By Eq. (74) ,
Pr [ F σ ( w t ) ( l , η ) ≠ F σ ′ ( w t ) ( l , η ) ∣ σ ′ ] = O ( n N ) . \Pr\left[F_\sigma^{(\mathrm{wt})}(l,\eta)\ne F_{\sigma'}^{(\mathrm{wt})}(l,\eta)\mid\sigma'\right]=O\left(\frac{n}{N}\right). Pr [ F σ ( wt ) ( l , η ) = F σ ′ ( wt ) ( l , η ) ∣ σ ′ ] = O ( N n ) .
Applying the hybrid argument of [5 ] , taking the expectation over ( σ , σ ′ ) (\sigma,\sigma') ( σ , σ ′ ) and applying Cauchy-Schwarz,
E ∥ ψ A , q σ , ( w t ) − ψ A , q σ ′ , ( w t ) ∥ 2 ≤ q ∑ j ∈ [ 0 , q − 1 ] E ∥ ( O σ ( w t ) − O σ ′ ( w t ) ) ψ A , j σ ′ , ( w t ) ∥ 2 = O ( n ⋅ q 2 N ) . \begin{aligned}
\mathbb{E}\left\|\psi_{\mathcal{A},q}^{\sigma,(\mathrm{wt})}-\psi_{\mathcal{A},q}^{\sigma',(\mathrm{wt})}\right\|^2
\leq q\sum_{j\in[0,q-1]}\mathbb{E}\left\|\left(O_\sigma^{(\mathrm{wt})}-O_{\sigma'}^{(\mathrm{wt})}\right)\psi_{\mathcal{A},j}^{\sigma',(\mathrm{wt})}\right\|^2 \\
&=O\left(\frac{n\cdot q^2}{N}\right).
\end{aligned} E ψ A , q σ , ( wt ) − ψ A , q σ ′ , ( wt ) 2 ≤ q j ∈ [ 0 , q − 1 ] ∑ E ( O σ ( wt ) − O σ ′ ( wt ) ) ψ A , j σ ′ , ( wt ) 2 = O ( N n ⋅ q 2 ) .
Therefore by the triangle inequality and projecting on the accepting output,
p D s i n g ( A ) = O ( p D p r o d ( A ) + n ⋅ q 2 N ) . p_{D_{\mathrm{sing}}}(\mathcal{A})=O\left(p_{D_{\mathrm{prod}}}(\mathcal{A})+\frac{n\cdot q^2}{N}\right). p D sing ( A ) = O ( p D prod ( A ) + N n ⋅ q 2 ) .
Putting it all together
Finally, we may compose all the statements together.
Proof of Theorem 4.1 . We may assume Eq. (49) as otherwise the statement is trivial. By Eq. (52) , the empty database ∣ ⊥ ⟩ I |\bot\rangle_I ∣⊥ ⟩ I is good. By Theorem 3.7, after q q q queries to c p W T ^ \widehat{\mathrm{cpWT}} cpWT , all databases in the support have ∣ I ∣ ≤ 3 q |I| \le3q ∣ I ∣ ≤ 3 q . Algorithm unitaries preserve goodness, so telescoping Theorem 4.12 over the q q q steps gives
∥ ( 1 − Π 6 q g o o d ) ∣ ψ A , q ( c p W T ^ ) ⟩ ∥ = O ( q ϵ l + q n ⋅ q N ) . (75) \left\|\left(1-\Pi_{6q}^{\mathrm{good}}\right)|\psi_{\mathcal{A},q}^{(\widehat{\mathrm{cpWT}})}\rangle\right\|=O\left(q\sqrt{\epsilon_l}+q\sqrt{\frac{n\cdot q}{N}}\right). \tag*{(75)} ( 1 − Π 6 q good ) ∣ ψ A , q ( cpWT ) ⟩ = O ( q ϵ l + q N n ⋅ q ) . (75)
Let A v e r \mathcal{A}_{\mathrm{ver}} A ver be the verification procedure in Algorithm 3.9, which uses O ( q ) O(q) O ( q ) queries and accepts every successful path under either distribution. Its acceptance probability under D p r o d \mathcal{D}_{\mathrm{prod}} D prod is p w t p_{\mathrm{wt}} p wt . For inputs drawn from D s i n g \mathcal{D}_{\mathrm{sing}} D sing , we get
Pr [ A succeeds ] ≤ p D s i n g ( A v e r ) \Pr[\mathcal{A}\text{ succeeds}]\le p_{\mathcal{D}_{\mathrm{sing}}}(\mathcal{A}_{\mathrm{ver}}) Pr [ A succeeds ] ≤ p D sing ( A ver )
(By Algorithm 3.9)
= O ( p w t + n ⋅ q 2 N ) =O\left(p_{\mathrm{wt}}+\frac{n\cdot q^2}{N}\right) = O ( p wt + N n ⋅ q 2 )
(By Theorem 4.13)
= O ( p c r o s s + q N l + n ⋅ q 2 N ) =O\left(p_{\mathrm{cross}}+\frac{q}{N_l}+\frac{n\cdot q^2}{N}\right) = O ( p cross + N l q + N n ⋅ q 2 )
(By Theorem 3.12 )
= O ( ∥ ( 1 − Π 6 q g o o d ) ∣ ψ A , q ( c p W T ^ ) ⟩ ∥ 2 + q N l + n ⋅ q 2 N ) =O\left(\left\|\left(1-\Pi_{6q}^{\mathrm{good}}\right)|\psi_{\mathcal{A},q}^{(\widehat{\mathrm{cpWT}})}\rangle\right\|^2+\frac{q}{N_l}+\frac{n\cdot q^2}{N}\right) = O ( ( 1 − Π 6 q good ) ∣ ψ A , q ( cpWT ) ⟩ 2 + N l q + N n ⋅ q 2 )
(By Eq. (53) )
= O ( q N l + q 2 ϵ l + n ⋅ q 3 N ) =O\left(\frac{q}{N_l}+q^2\epsilon_l+\frac{n\cdot q^3}{N}\right) = O ( N l q + q 2 ϵ l + N n ⋅ q 3 )
(By Eq. (75) ).
Taking l = ⌊ 2 n / 3 ⌋ l=\lfloor2n/3\rfloor l = ⌊ 2 n /3 ⌋ gives N l = Θ ( N 1 / 3 ) N_l=\Theta(N^{1/3}) N l = Θ ( N 1/3 ) and ϵ l = Θ ( N − 2 / 3 ) \epsilon_l=\Theta(N^{-2/3}) ϵ l = Θ ( N − 2/3 ) , so constant success probability requires Ω ( ( N / ( n + 1 ) ) 1 / 3 ) \Omega((N/(n+1))^{1/3}) Ω (( N / ( n + 1 ) ) 1/3 ) queries.
AI Disclosure
The results of this paper were obtained using ChatGPT 6 Astra to build upon our previous work [40 , 14 ] , establishing a stronger bound. Combining ideas from those papers and using a shifted boundary of permuted edges gave an Ω ( N 1 / 4 ) \Omega(N^{1/4}) Ω ( N 1/4 ) bound. The final bound was obtained using a further AI-generated suggestion to sharpen Theorem 3.11 using the exact compressed oracle, along with refinements to the good space construction and its properties. The proof of Theorem 4.4 was written by GPT-6, while the rest of the paper was written by the authors.
In [40 ] the main ideas and original proofs were developed by the authors, who wrote the manuscript in its entirety. ChatGPT 6 Astra was used to find a much simpler proof of the reduction to a single-cycle weld, generalization of the compressed oracle to arbitrarily-sized permutations statements and was used to discuss correctness of the proofs. In [14 ] , the overall proof strategy was developed by the authors without the use of AI. ChatGPT 6 Astra was used to develop proof ideas in the later stages of the work, and in particular, identified an error in a human-generated proof of a key lemma (the “clipping lemma”), which it then corrected.
The authors take sole responsibility for the correctness of this work.
Quantum walk analysis
To build intuition for the compressed oracle model, in this appendix we describe the information that is (and is not) tracked in the database when running the quantum walk exit-finding algorithm [15 ] , using the notation of § 3 .
Let H σ H_{\sigma} H σ be the adjacency matrix specified by σ = ( σ l a b e l , σ e d g e ) \sigma=(\sigma_{\mathrm{label}},\sigma_{\mathrm{edge}}) σ = ( σ label , σ edge ) , in the vertex-label basis. We sample σ \sigma σ from D p r o d \mathcal{D}_{\mathrm{prod}} D prod , counting edge multiplicities if the weld has parallel edges, giving the same column dynamics as for a single-cycle weld.
Define the column states
∣ c ; σ ⟩ : = 1 ∣ col ( c ) ∣ ∑ v ∈ col ( c ) ∣ σ l a b e l ( v ) ⟩ , c ∈ [ 0 , 2 n + 1 ] . \lvert c;\sigma\rangle:= \frac{1}{\sqrt{\lvert\operatorname{col}(c)\rvert}} \sum_{v\in\operatorname{col}(c)} \lvert\sigma_{\mathrm{label}}(v)\rangle,\qquad c\in[0,2n+1]. ∣ c ; σ ⟩ := ∣ col ( c )∣ 1 v ∈ col ( c ) ∑ ∣ σ label ( v )⟩ , c ∈ [ 0 , 2 n + 1 ] .
Every vertex in a column has the same number of neighbors in each adjacent column. Therefore, these states span an invariant subspace of H σ H_\sigma H σ , in which H σ H_\sigma H σ acts as the matrix h h h with nonzero entries
h c , c + 1 = h c + 1 , c = { 2 , c ≠ n , 2 , c = n , c ∈ [ 0 , 2 n ] . (76) h_{c,c+1}=h_{c+1,c}=
\begin{cases}
\sqrt{2}, & c\ne n,\\
2, & c=n,
\end{cases}
\qquad c\in[0,2n]. \tag*{(76)} h c , c + 1 = h c + 1 , c = { 2 , 2 , c = n , c = n , c ∈ [ 0 , 2 n ] . (76)
In particular, h h h is independent of σ \sigma σ .
Therefore
e − i H σ t ∣ 0 ⟩ = ∑ v ∈ V n u col ( v ) ( t ) ∣ σ label ( v ) ⟩ e^{-iH_\sigma t}|0\rangle=\sum_{v\in V_n}u_{\operatorname{col}(v)}(t)|\sigma_{\operatorname{label}(v)}\rangle e − i H σ t ∣0 ⟩ = v ∈ V n ∑ u col ( v ) ( t ) ∣ σ label ( v ) ⟩
where
u c ( t ) : = ( e − i h t ) c , 0 ∣ col ( c ) ∣ . u_c(t):=\frac{(e^{-iht})_{c,0}}{\sqrt{|\operatorname{col}(c)|}}. u c ( t ) := ∣ col ( c ) ∣ ( e − ih t ) c , 0 .
The analysis in [15 ] gives inverse-polynomial probability of reaching the exit for a suitable randomly chosen polynomial evolution time, and describes a simulation using polynomially many queries with sufficiently small inverse-polynomial error.
To describe the databases, purify the random permutations and write only the vertex-label register of the algorithm. Suppressing the time argument, the resulting state is
∣ Ψ ( t ) ⟩ = ( u 0 ( t ) ∣ 0 ⟩ A ∣ T ⊥ ⟩ + 1 M ∑ v ∈ V n ∖ { 0 } l ∈ [ M ] u col ( v ) ( t ) ∣ l ⟩ A ∣ T [ v → l ] ⟩ ) ⨂ b ∈ B e d g e ∣ T ⊥ ⟩ P b (77) |\Psi(t)\rangle=
\left(
u_0(t)|0\rangle_A|T_\perp\rangle+
\frac{1}{\sqrt{M}}
\sum_{\substack{v\in V_n\setminus\{0\}\\ l\in[M]}}
u_{\operatorname{col}(v)}(t)|l\rangle_A|T_{[v\to l]}\rangle
\right)
\bigotimes_{b\in B_{\mathrm{edge}}}|T_\perp\rangle_{P_b} \tag*{(77)} ∣Ψ ( t )⟩ = u 0 ( t ) ∣0 ⟩ A ∣ T ⊥ ⟩ + M 1 v ∈ V n ∖ { 0 } l ∈ [ M ] ∑ u col ( v ) ( t ) ∣ l ⟩ A ∣ T [ v → l ] ⟩ b ∈ B edge ⨂ ∣ T ⊥ ⟩ P b (77)
(recall M = 2 2 n M=2^{2n} M = 2 2 n ).
Let ∣ Ψ ^ ( t ) ⟩ : = I P ∣ Ψ ( t ) ⟩ |\widehat{\Psi}(t)\rangle:=\mathcal{I}_P|\Psi(t)\rangle ∣ Ψ ( t )⟩ := I P ∣Ψ ( t )⟩ , with I P \mathcal{I}_P I P as in Eq. (41) , and define the normalized current-record state
∣ Φ ( t ) ⟩ : = u 0 ( t ) ∣ 0 ⟩ A ∣ ⊥ ⟩ L ∣ ⊥ ⟩ C + 1 M ∑ v ∈ V n ∖ { 0 } l ∈ [ M ] u col ( v ) ( t ) ∣ l ⟩ A ∣ [ v → l ] ⟩ L ∣ ⊥ ⟩ C . (78) |\Phi(t)\rangle:=u_0(t)|0\rangle_A|\perp\rangle_L|\perp\rangle_C+
\frac{1}{\sqrt{M}}
\sum_{\substack{v\in V_n\setminus\{0\}\\ l\in[M]}}
u_{\operatorname{col}(v)}(t)|l\rangle_A|[v\to l]\rangle_L|\perp\rangle_C. \tag*{(78)} ∣Φ ( t )⟩ := u 0 ( t ) ∣0 ⟩ A ∣ ⊥ ⟩ L ∣ ⊥ ⟩ C + M 1 v ∈ V n ∖ { 0 } l ∈ [ M ] ∑ u col ( v ) ( t ) ∣ l ⟩ A ∣ [ v → l ] ⟩ L ∣ ⊥ ⟩ C . (78)
This state provides a good approximation of the purified evolution at all times.
Proposition A.1. At every time t t t , the state ∣ Ψ ^ ( t ) ⟩ |\widehat{\Psi}(t)\rangle ∣ Ψ ( t )⟩ is supported on databases with C = ⊥ C=\perp C =⊥ and ∣ L ∣ ≤ 1 |L|\le1 ∣ L ∣ ≤ 1 . Furthermore,
∥ ∣ Ψ ^ ( t ) ⟩ − ∣ Φ ( t ) ⟩ ∥ ≤ 2 ∣ V n ∣ M = O ( N − 1 / 2 ) . \left\| |\widehat{\Psi}(t)\rangle-|\Phi(t)\rangle\right\|
\le\sqrt{\frac{2|V_n|}{M}}=O(N^{-1/2}). ∣ Ψ ( t )⟩ − ∣Φ ( t )⟩ ≤ M 2∣ V n ∣ = O ( N − 1/2 ) .
Proof. In Eq. (77) , the edge permutations remain uniform and the label-permutation state lies in H M , ≤ 1 \mathcal{H}_{M,\le1} H M , ≤ 1 . Thus Eq. (13) establishes the support statement. For the norm bound, identify the one-record basis ∣ [ x → y ] ⟩ |[x\to y]\rangle ∣ [ x → y ]⟩ with ∣ x ⟩ ⊗ ∣ y ⟩ |x\rangle\otimes|y\rangle ∣ x ⟩ ⊗ ∣ y ⟩ , where x , y ∈ [ M ] x,y\in[M] x , y ∈ [ M ] . Write ∣ + ⟩ = M − 1 / 2 ∑ x ∈ [ M ] ∣ x ⟩ |+\rangle=M^{-1/2}\sum_{x\in[M]}|x\rangle ∣ + ⟩ = M − 1/2 ∑ x ∈ [ M ] ∣ x ⟩ , P 0 = 1 − ∣ + ⟩ ⟨ + ∣ P_0=1-|+\rangle\langle+| P 0 = 1 − ∣ + ⟩ ⟨ + ∣ , and P = P 0 ⊗ P 0 P=P_0\otimes P_0 P = P 0 ⊗ P 0 on this database space. The overlaps of the extension states are 1 1 1 for identical records, 0 0 0 for incompatible records, and 1 / ( M − 1 ) 1/(M-1) 1/ ( M − 1 ) for records with different inputs and outputs. A direct calculation therefore gives
Γ M , 1 † Γ M , 1 = M M − 1 P , G M , 1 = M M − 1 Π M , 1 . \Gamma_{M,1}^{\dagger}\Gamma_{M,1}=\frac{M}{M-1}P,
\qquad
G_{M,1}=\frac{M}{M-1}\Pi_{M,1}. Γ M , 1 † Γ M , 1 = M − 1 M P , G M , 1 = M − 1 M Π M , 1 .
Hence the normalization in Eq. (12) can be evaluated explicitly. Suppress the common empty edge database and set
s : = ∑ v ∈ V n ∖ { 0 } u col ( v ) ( t ) , β 2 : = ∑ v ∈ V n ∖ { 0 } ∣ u col ( v ) ( t ) ∣ 2 , ∣ Φ + ⟩ : = ∣ Φ ( t ) ⟩ − u 0 ( t ) ∣ 0 ⟩ A ∣ ⊥ ⟩ L . s:=\sum_{v\in V_n\setminus\{0\}}u_{\operatorname{col}(v)}(t),
\qquad
\beta^2:=\sum_{v\in V_n\setminus\{0\}}|u_{\operatorname{col}(v)}(t)|^2,
\qquad
|\Phi_+\rangle:=|\Phi(t)\rangle-u_0(t)|0\rangle_A|\perp\rangle_L. s := v ∈ V n ∖ { 0 } ∑ u col ( v ) ( t ) , β 2 := v ∈ V n ∖ { 0 } ∑ ∣ u col ( v ) ( t ) ∣ 2 , ∣ Φ + ⟩ := ∣Φ ( t )⟩ − u 0 ( t ) ∣0 ⟩ A ∣ ⊥ ⟩ L .
Applying the isometry separately to levels zero and one yields
∣ Ψ ^ ( t ) ⟩ = u 0 ( t ) ∣ 0 ⟩ A ∣ ⊥ ⟩ L + s M ∣ + ⟩ A ∣ ⊥ ⟩ L + M M − 1 P ∣ Φ + ⟩ , |\widehat{\Psi}(t)\rangle= u_0(t)|0\rangle_A|\perp\rangle_L + \frac{s}{\sqrt{M}}|+\rangle_A|\perp\rangle_L + \sqrt{\frac{M}{M-1}}P|\Phi_+\rangle, ∣ Ψ ( t )⟩ = u 0 ( t ) ∣0 ⟩ A ∣ ⊥ ⟩ L + M s ∣ + ⟩ A ∣ ⊥ ⟩ L + M − 1 M P ∣ Φ + ⟩ ,
∥ P ∣ Φ + ⟩ ∥ 2 = ( 1 − 1 M ) ( β 2 − ∣ s ∣ 2 M ) , \lVert P|\Phi_+\rangle\rVert^2 = \left(1-\frac{1}{M}\right)\left(\beta^2-\frac{|s|^2}{M}\right), ∥ P ∣ Φ + ⟩ ∥ 2 = ( 1 − M 1 ) ( β 2 − M ∣ s ∣ 2 ) ,
where P P P acts only on the database. Since both ∣ Ψ ^ ( t ) ⟩ |\widehat{\Psi}(t)\rangle ∣ Ψ ( t )⟩ and ∣ Φ ( t ) ⟩ |\Phi(t)\rangle ∣Φ ( t )⟩ are normalized, we have
∥ ∣ Ψ ^ ( t ) ⟩ − ∣ Φ ( t ) ⟩ ∥ 2 = 2 β 2 ( 1 − 1 − 1 / M ) + 2 1 − 1 / M ∣ s ∣ 2 M ≤ 2 ∣ V n ∣ M , \left\lVert|\widehat{\Psi}(t)\rangle-|\Phi(t)\rangle\right\rVert^2 = 2\beta^2\left(1-\sqrt{1-1/M}\right)+\frac{2\sqrt{1-1/M}|s|^2}{M}\leq\frac{2|V_n|}{M}, ∣ Ψ ( t )⟩ − ∣Φ ( t )⟩ 2 = 2 β 2 ( 1 − 1 − 1/ M ) + M 2 1 − 1/ M ∣ s ∣ 2 ≤ M 2∣ V n ∣ ,
where we used 1 − 1 − 1 / M ≤ 1 / M 1-\sqrt{1-1/M}\leq1/M 1 − 1 − 1/ M ≤ 1/ M , β 2 ≤ 1 \beta^2\leq1 β 2 ≤ 1 , and ∣ s ∣ 2 ≤ ( ∣ V n ∣ − 1 ) β 2 |s|^2\leq(|V_n|-1)\beta^2 ∣ s ∣ 2 ≤ ( ∣ V n ∣ − 1 ) β 2 . □ \square □
Finally, consider an algorithm that simulates e − i H σ t ∣ 0 ⟩ e^{-iH_\sigma t}|0\rangle e − i H σ t ∣0 ⟩ using oracle queries with norm error at most δ \delta δ , uniformly in σ \sigma σ .
By Eq. (42) , replacing its queries by c p W T ^ \widehat{\mathrm{cpWT}} cpWT gives exactly the isometric image of its purified output. Since an isometry preserves norm, this output is within
δ + 2 ∣ V n ∣ M \delta+\sqrt{\frac{2|V_n|}{M}} δ + M 2∣ V n ∣
of ∣ Φ ( t ) ⟩ |\Phi(t)\rangle ∣Φ ( t )⟩ with clean work registers. (This is a statement about the completed simulation; the state of the simulation after intermediate oracle queries need not have empty edge databases.)
Thus the continuous-time walk has a compressed-oracle description that retains its current position without a path, consistent with the interference responsible for its speedup.