46 Unitary circuits
This chapter uses the notation of Chapters 34 and 45: \(V\) is a finite set of sites, \(X=(X_v)_{v\in V}\) a system of finite basis sets, \(\mathcal H_X=\bigotimes _v\mathbb {C}^{X_v}\), and \(\Gamma \) a geometry on \(V\). A unitary circuit is a circuit in the sense of Chapter 45 in which every layer acts on one system \(X\) and every gate and every onsite family consists of a single unitary. Local circuits of depth \(T\) on a ring [ 113 ] , depth-\(\ell \) circuits on the edges of a lattice [ 124 ] and products of two-site gates on an open chain are such circuits on three geometries, measured by depth or by gate count. A one-site unitary is an onsite family and costs nothing. The identity, composition, monotonicity and the light cone are the statements of Chapter 45 for these circuits.
46.1 Graphs and windows
For a simple graph \(G\) on \(V\), the graph geometry has one cell \(\{ u,v\} \) of cost \(1\) for each edge \(uv\) [ 124 ] . The open chain of \(n\) sites is the graph geometry of the path on \(\{ 0,\dots ,n-1\} \), whose cells are the pairs \(\{ p,p+1\} \). The windows of \(m\) consecutive sites of this chain are the cells \(\{ p: a\le p{\lt}a+m\} \) of cost \(1\), one for each \(a{\lt}n\), cut off at the right end of the chain.
In the graph geometry of \(G\), the \(r\)-fold neighbourhood \(\mathcal N^r(R)\) of a region \(R\) is the neighbourhood \(N_r(R)\) of the sites within graph distance \(r\) of \(R\), and regions at graph distance larger than \(2r\) have disjoint \(r\)-fold neighbourhoods. On the open chain the same holds with the distance \(|i-j|\) of positions.
The neighbourhood of \(R\) adds the two ends of every edge meeting \(R\), which are the sites at distance at most \(1\) from \(R\), so \(\mathcal N(R)=N_1(R)\). By induction on \(r\) and \(N_{r+1}(R)=N_1(N_r(R))\), \(\mathcal N^r(R)=N_r(R)\), and regions separated by \(2r\) have disjoint neighbourhoods \(N_r\). On the path the graph distance is the distance of positions.
46.2 Unitary circuits and their costs
A unitary circuit on \(\Gamma \) on the system \(X\) is a finite sequence of layers from \(X\) to \(X\) whose gates and onsite families are each a single unitary [ 113 , 124 ] , together with a global phase \(\mu \in \mathbb {C}\), \(|\mu |=1\). As a circuit it is the sequence of its layers; it has exactly one branch, and its operator is \(U=\mu W_T\cdots W_1\) for the operators \(W_k\) of its layers, the phase times the Kraus operator of that branch. Its depth and gate count are those of the circuit; the phase costs nothing. Without the phase, on an empty set of sites there is no one-site unitary and a geometry need not have a cell, so \(\mu 1\) with \(\mu \ne 1\) need not be the operator of a circuit.
The depth and the gate count of a unitary circuit are the sums of those of its layers, and the depth is at most the gate count. Its Heisenberg picture is \(A\mapsto U^\dagger AU\), and \(U\) is unitary.
Every layer has a Kraus index, so the cost of the sequence is the sum of the costs of the layers. The circuit has one branch, so its Heisenberg picture is conjugation by \(U\); its families are trace-preserving, so the Heisenberg picture fixes \(1\), which is \(U^\dagger U=1\), and \(UU^\dagger =1\) follows for square matrices.
The empty unitary circuit has operator \(1\) and cost \(0\). The circuit \(c\) followed by \(c'\), with the product of the phases, has operator \(U'U\), depth the sum of the depths and gate count the sum of the gate counts. The adjoint layers of \(c\) in reverse order, with the inverse phase, form a unitary circuit with operator \(U^\dagger \) and the depth and gate count of \(c\).
The sequence of a concatenation of layers is the composition of the two sequences, whose Kraus operators multiply, and scalars commute with matrices. The adjoint of a sequence of layers of single operators has the adjoint Kraus operator, and \(\bar\mu =\mu ^{-1}\) for \(|\mu |=1\); a layer and its adjoint use the same cells, so they have the same costs.
A unitary \(V\) on the configurations of a cell \(b\) is the unitary circuit of one layer with operator \(V\otimes 1\) placed on \(C_b\), gate count \(c_b\) and depth at most \(1\). One-site unitaries \(u_v\) at every site form a circuit of one layer with no cells, with operator \(\bigotimes _vu_v\) and depth and gate count \(0\). A phase \(\mu \) with \(|\mu |=1\) is the circuit with no layers and phase \(\mu \), with operator \(\mu 1\) and depth and gate count \(0\).
The layer of one gate has the placed matrix as Kraus operator and one cell; the layer of onsite families has the product of the onsite operators and no cell.
If \(A\) is supported on \(R\), then \(U^\dagger AU\) is supported on the backward light cone of \(R\) through the circuit; when every cell has positive cost and the depth is at most \(T\), on the \(T\)-fold neighbourhood \(\mathcal N^T(R)\) [ 113 , Theorem 1 ] .
The Heisenberg picture of the circuit is \(A\mapsto U^\dagger AU\); the circuit is unbranched and trace-preserving, so the light cone of Chapter 45 applies, and it lies in the \(T\)-fold neighbourhood when the cells have positive cost.
46.3 Depth and gate count
A matrix \(U\) on \(\mathcal H_X\) is a unitary circuit of depth \(T\) on \(\Gamma \) if it is the operator of a unitary circuit of depth at most \(T\) [ 113 , 124 ] , and a product of gates of cost \(K\) if it is the operator of a unitary circuit of gate count at most \(K\). On the open chain these are the products of at most \(K\) unitaries on neighbouring pairs of sites, with one-site unitaries free.
Both classes contain \(1\) and are monotone in the bound. Depths and gate counts add under products, are kept by adjoints and are multiplied by \(k\) under \(k\)-th powers; a product of \(\ell \) products of \(K\) gates is a product of \(\ell K\) gates. Products of one-site unitaries cost nothing, and a unitary supported on a cell \(b\) is one gate of cost \(c_b\) and depth at most \(1\). Every member is unitary, and a product of gates of cost \(K\) is a circuit of depth \(K\).
By Theorem 46.2.3 and Lemma 46.2.4. A unitary supported on \(C_b\) is \(V\otimes 1\) for a matrix \(V\) on \(C_b\) (when every basis set is nonempty; otherwise every matrix is zero), and \(V\) is unitary because placement is injective and multiplicative. The depth of a circuit is at most its gate count.
On a geometry whose cells have positive cost, if \(U\) is a unitary circuit of depth \(T\) and \(A\) is supported on \(R\), then \(U^\dagger AU\) is supported on \(\mathcal N^T(R)\); on the ring of \(N\) sites, on the sites within ring distance \(T\) of \(R\) [ 113 , Theorem 1 ] .
Theorem 46.2.5; on the ring the \(T\)-fold neighbourhood is the ring ball of radius \(T\).
46.4 Preparation in depth \(T\)
A vector \(\psi \in \mathcal H_X\) is prepared in depth \(T\) if \(\psi =U\bigotimes _v v_v\) for a unitary circuit \(U\) of depth \(T\) and vectors \(v_v\in \mathbb {C}^{X_v}\) [ 113 ] . A product vector is prepared in depth \(0\), and a circuit of depth \(T'\) applied to a vector prepared in depth \(T\) gives one prepared in depth \(T+T'\).
For a product vector \(\pi =\bigotimes _vv_v\) and operators \(A\), \(B\) supported on disjoint regions, \(\langle \pi |AB|\pi \rangle \langle \pi | \pi \rangle =\langle \pi |A|\pi \rangle \langle \pi |B|\pi \rangle \).
Both sides are bilinear in \((A,B)\), so it suffices to take product operators \(A=\bigotimes _vm_v\), \(B=\bigotimes _vm'_v\) with \(m_v=1\) outside the first region and \(m'_v=1\) outside the second. Then \(\langle \pi |\bigotimes _vm_v|\pi \rangle = \prod _v\langle v_v|m_v|v_v\rangle \), and at every site one of \(m_v\), \(m'_v\) is the identity, so the two sides agree site by site.
On a geometry whose cells have positive cost, let \(\psi \) be prepared in depth \(T\) and let \(A\), \(B\) be supported on regions \(R\), \(R'\) with disjoint \(T\)-fold neighbourhoods. Then
and \(\langle \psi |AB|\psi \rangle =\langle \psi |A|\psi \rangle \langle \psi |B|\psi \rangle \) when \(\psi \) is a unit vector. On the ring this holds for regions at ring distance larger than \(2T\) [ 113 , Supplemental Material, proof of Theorem 1 ] .
Write \(\psi =U\pi \) with \(\pi \) a product vector. Then \(\langle \psi |M|\psi \rangle =\langle \pi |U^\dagger MU|\pi \rangle \) and \(U^\dagger ABU=(U^\dagger AU)(U^\dagger BU)\). By Theorem 46.3.3 the two factors are supported on the disjoint neighbourhoods, and Lemma 46.4.2 applies. On the ring, regions at ring distance larger than \(2T\) have disjoint balls of radius \(T\).
46.5 Substituting circuits for gates
Every Kraus operator of a layer is the product, over the cells in any order, of the matrices of the gates placed on their cells, times the tensor product of the onsite operators, with the identity at the sites covered by cells. For a unitary layer every factor is unitary.
The product of the placed gates on disjoint cells is the Kraus operator of the layer of these gates with the identity elsewhere; multiplying by the product operator puts the onsite entries at the free sites, and the entries agree with those of the layer.
Let \(\Gamma \) and \(\Gamma '\) be geometries on the same sites. If every unitary placed on a cell \(b\) of \(\Gamma \) is a product of gates of \(\Gamma '\) of cost \(f(b)\), the operator of a unitary circuit on \(\Gamma \) is a product of gates of \(\Gamma '\) of cost the sum of \(f\) over the cells it uses. In particular, if \(f(b)\le Cc_b\), a product of gates of cost \(K\) on \(\Gamma \) is a product of gates of cost \(CK\) on \(\Gamma '\). The depth admits no such bound: the circuits replacing gates on disjoint cells may use overlapping cells of \(\Gamma '\).
Write every layer as in Lemma 46.5.1; the placed gates are replaced by their products on \(\Gamma '\), the onsite product costs nothing, and costs add under products.
46.6 Swap routing on the open chain
On the open chain of \(n\) sites with the same basis \(\alpha \) at every site, the swap of two sites is the operator of the transposition of the sites.
The transposition factorization of a permutation of a finite linearly ordered set uses at most one transposition per element.
The factorization processes the elements in order and uses one transposition for each element not yet fixed.
On the open chain, the swap of two neighbouring sites is one gate. A unitary supported on two sites \(i\ne j\) is a product of at most \(2|i-j|-1\le 2n\) neighbouring gates, and so is the swap of \(i\) and \(j\); the operator of a permutation of the sites costs at most \(2n^2\), and conjugation by it adds at most \(4n^2\) to a gate count. A product of gates of cost \(K\) on the geometry of all sites and pairs of sites, with pairs of cost at least \(1\), is a product of at most \(2nK\) neighbouring gates. On a chain of at least two sites a product of gates on windows of two sites is a product of the same number of neighbouring gates. This is the use of swap gates in [ 113 ] (paragraph “The sequential-RG circuit”: the inputs “are separated by \(O(q)\) sites, which requires one to implement SWAP gates”).
A neighbouring swap is supported on its pair. For \(i{\lt}j\), conjugating a unitary supported on \(\{ i,j-1\} \) by the neighbouring swap of \(j-1\) and \(j\) gives one supported on \(\{ i,j\} \), and induction on \(j-i\) gives the count. A permutation is a product of at most \(n\) transpositions by Lemma 46.6.1. The last two statements are Theorem 46.5.2; one-site gates are free, and a window of two sites lies in a neighbouring pair.
46.7 Controlled operations and universality
For a set \(R\) of sites, a configuration \(c\) and a site \(t\), let \(p_{R,c}\) be the projection onto the configurations that agree with \(c\) on \(R\), and let \(u_t\) be a matrix \(u\) on \(\mathbb {C}^{X_t}\) placed at \(t\). The controlled operation is \(C_{R,c,t}(u)=p_{R,c}u_t+(1-p_{R,c})\): it applies \(u\) at \(t\) when the sites of \(R\) are in the configuration \(c\) [ 113 ] .
For \(t\notin R\), the projections \(p_{R,c}\) are commuting self-adjoint idempotents, \(p_{R\cup \{ s\} ,c}=p_{R,c}p_{\{ s\} ,c}\), and \(p_{R,c}\) commutes with \(u_t\). Hence \(C_{R,c,t}(u)C_{R,c,t}(w)=C_{R,c,t}(uw)\), \(C_{R,c,t}(u)^\dagger =C_{R,c,t}(u^\dagger )\), \(C_{R,c,t}(u)\) is unitary for unitary \(u\) and is supported on \(R\cup \{ t\} \), and for \(s\ne t\) and unitaries \(v\), \(w\),
The two-level operator between configurations \(a\) and \(a'\) that differ only at \(t\) is \(C_{V\setminus \{ t\} ,a,t}\) of the two-level operator between the levels \(a_t\) and \(a'_t\).
The projections are diagonal with entries in \(\{ 0,1\} \). The commutator identity is that of controlled elements of a ring applied to the idempotents \(p_{R,c}\) and \(p_{\{ s\} ,c}\). The two-level operator acts as the identity on the configurations differing from \(a\) away from \(t\), which is the controlled form.
Let \(V\) be a finite set of \(n\) sites and \(m=\prod _v|X_v|\), and suppose that every unitary supported on two distinct sites is a product of gates of \(\Gamma \) of cost \(k\). One-site unitaries and global phases cost nothing. A controlled two-level rotation or phase with \(j\) controls costs at most \((2^{j+1}-2)k\), a two-level rotation or phase between distinct configurations at most \((2n-1)(2^n-2)k\), and every unitary on \(\mathcal H_X\) at most \(3m^2(2n-1)(2^n-2)k\le 6m^4k\) when every \(|X_v|\ge 2\). On the geometry of all sites and pairs of sites the hypothesis holds with \(k\) the cost of a pair. This is the step “can be further expressed with a low-depth circuit of local gates” of [ 113 , caption of Fig. 1 ] .
A controlled operation with no control is a one-site unitary. Every rotation or phase of the special form is a commutator \(g_1g_2g_1^\dagger g_2^\dagger \) with \(g_1\) of the same form, so Lemma 46.7.2 removes one control at the cost of two controlled operations with one control, which are two-site unitaries. A two-level operator between configurations at Hamming distance \(h+1\) is conjugated by a quarter turn on a pair at distance \(1\) into one between configurations at distance \(h\); with \(n-1\) controls this gives the second count. A unitary is a phase times a unitary of determinant \(1\), and the Givens decomposition writes the latter as at most \(3m^2\) two-level rotations and phases.
On the open chain of \(n\) sites with the same basis at every site, every unitary is an exact product, global phase included and with no auxiliary sites, of at most \(2n\cdot 3m^2(2n-1)(2^n-2)\) neighbouring gates, and of at most \(12m^5\) when the basis has at least two elements, \(m\) the dimension of the Hilbert space. An isometry prescribed on a set of input columns extends to a unitary that is such a product.
46.8 Circuits inside a region and in parallel
A layer acts inside a region \(R\) when every cell it uses lies in \(R\) and every onsite family at a site outside \(R\) is the identity; a unitary circuit acts inside \(R\) when all its layers do. A matrix \(U\) is a unitary circuit of depth \(T\) inside \(R\) if it is the operator of a unitary circuit inside \(R\) of depth at most \(T\) [ 113 ] .
The operator of a circuit inside \(R\) is supported on \(R\). Circuits inside \(R\) are closed under composition and adjoints and stay inside every larger region; a gate on a cell in \(R\), and one-site unitaries equal to the identity outside \(R\), are circuits inside \(R\).
The Kraus operator of a layer inside \(R\) is a product of operators supported on its cells and onsite operators that are the identity outside \(R\).
On a geometry whose cells are nonempty, unitary circuits of depths \(T_1\), \(T_2\) inside disjoint regions \(R_1\), \(R_2\) give a unitary circuit inside \(R_1\cup R_2\) with operator \(U_1U_2\), depth at most \(\max (T_1,T_2)\) and the sum of the gate counts. A finite family of circuits of depth \(T\) inside pairwise disjoint regions has product a circuit of depth \(T\) inside their union. These are the parallel layers of [ 113 ] (eq. (10) and the paragraph “The sequential-RG circuit”).
Layers of the two circuits are merged greedily: a leading layer of depth \(0\) is kept alone, and two leading layers of depth \(1\) become one layer with the cells of both, which are disjoint since nonempty cells lie in disjoint regions. Depth then counts the merged pairs once, so the depth of the merged circuit is at most the larger depth. The operators of the two circuits commute, being supported on disjoint regions, so the operator of the merge is \(U_1U_2\).
46.9 Placing and relabelling circuits
A unitary circuit on the cells of \(\Gamma \) inside a region \(D\), on the system of the sites of \(D\), read on all the sites with the identity outside \(D\), is a unitary circuit inside \(D\) of the same depth and gate count with operator \(V\otimes 1\) placed on \(D\). In particular a product of gates of cost \(K\) on the cells inside \(D\) is, placed, a circuit of depth \(K\) inside \(D\) and a product of gates of cost \(K\).
Layer by layer, the cells and the onsite families at sites of \(D\) are kept, and the identity is added at the sites outside \(D\); the Kraus operator is the placement of that of the layer, and placement is multiplicative.
A bijection of sites carrying the cells of one geometry to cells of another of the same cost carries unitary circuits to unitary circuits with the relabelled operator and the same depth and gate count. Hence a product of \(K\) gates on neighbouring sites of a chain of \(m\) sites, placed on \(m\) consecutive sites of a ring or of a longer chain, is a circuit of depth \(K\) inside the placed sites and a product of \(K\) neighbouring gates there [ 113 ] .
The layers are moved cell by cell along the bijection and the operators are relabelled along the induced bijection of configurations. Consecutive sites go to cells of the ring or of the chain, which gives a morphism of geometries into the cells inside the placed sites, and Theorem 46.9.1 applies.
On the open chain with the same basis \(\alpha \), \(|\alpha |\ge 2\), at every site, a unitary supported on a window of \(m\ge 1\) consecutive sites is one gate on the window and a product of at most \(12(|\alpha |^m)^5\) neighbouring gates. A product of gates of cost \(K\) on windows of \(m\) sites is a product of at most \(12(|\alpha |^m)^5K\) neighbouring gates, a factor independent of the length of the chain [ 113 , caption of Fig. 1 ] .
46.10 Clean workspaces and reflections
For an inclusion \(J\) of a logical space into a larger space with its workspace in an initial state, an operator \(U\) cleanly implements \(Z\) when \(UJ=JZ\): it acts as \(Z\) on every logical input, including inputs entangled with a reference, and returns the workspace to its initial state.
Clean implementations are closed under products and powers, under adjoints and inverses when both operators are unitary, and under tensoring with the identity of a reference. A unitary that cleanly implements \(Z\) along an isometric inclusion makes \(Z\) unitary, so its adjoint cleanly implements \(Z^\dagger \).
\(UVJ=UJW=JZW\). From \(UJ=JZ\) and \(ZZ^\dagger =1\), \(U^\dagger J=U^\dagger JZZ^\dagger = U^\dagger UJZ^\dagger =JZ^\dagger \). If \(J^\dagger J=1\), then \(Z^\dagger Z=(JZ)^\dagger JZ=(UJ)^\dagger UJ=1\).
If every unitary is a product of gates of cost \(K\), every isometry on prescribed input columns and every logical unitary, along a basis inclusion, is cleanly implemented by a product of gates of cost \(K\). A permutation of the logical sites that fixes an appended workspace cleanly implements the permutation of the logical register, and so does its conjugate of a clean implementation, so one workspace can be reused by many calls.
The isometry extends to a unitary with the prescribed columns, which is a product of gates by hypothesis. The site permutation leaves the workspace sites unchanged, and the identity is checked entry by entry; conjugation uses Lemma 46.10.2.
For a unitary \(U\), the reflection about the image of \(UE\) is \(U\) times the reflection about the image of \(E\) times \(U^\dagger \). If \(U\) is a product of gates of cost \(K\) and the reflection about the image of \(E\) one of cost \(L\), the reflection about the image of \(UE\) costs \(2K+L\); one round of amplification by two reflections of costs \(K\) and \(L\), with its global phase \(-1\), costs \(K+L\).
\(UEE^\dagger U^\dagger \) is the projection onto the image of \(UE\), and conjugation by \(U\) commutes with \(1-2P\). The global phase is the phase of a circuit, of cost \(0\).
If \(U_A\) and \(U_B\) are unitary circuits of depths \(T_A\) and \(T_B\) and \(J\) is any seed, then \(U_BU_A^\dagger \) is a unitary circuit of depth \(T_A+T_B\) and \(\| U_BU_A^\dagger F-G\| \le \| F-U_AJ\| +\| G-U_BJ\| \) in the operator norm [ 113 ] .
\(U_BU_A^\dagger F-G=U_BU_A^\dagger (F-U_AJ)+(U_BJ-G)\), and \(U_BU_A^\dagger \) has norm at most \(1\).
Every nonzero vector of \(\mathbb {C}^\iota \) is \(c\, u|i_0\rangle \) with \(c\ne 0\) and \(u\) unitary, every nonzero product vector is \(c\bigotimes _vu_v|x_0\rangle \), and every nonzero vector prepared in depth \(T\) is \(c\, U|x_0\rangle \) for a unitary circuit \(U\) of depth \(T\) and any fixed product basis vector \(|x_0\rangle \): the one-site unitaries cost no depth.
Extend \(x/\| x\| \) to a unitary with this column at \(i_0\); take the product over the sites; and compose the circuit with the one-site unitaries, of depth \(0\).