Circuit Complexity of Knot States in Chern-Simons theory

We compute the circuit complexity of quantum states in $3d$ Chern-Simons theory corresponding to certain classes of knots. Specifically, we deal with states in the torus Hilbert space of Chern-Simons that are the knot complements on the $3$-sphere of arbitrary torus knots. These can be constructed from the unknot state by using the Hilbert space representation of the $S$ and $T$ modular transformations of the torus as fundamental gates. The results are then generalized for a family of multi-component links that are obtained by"Hopf-linking"different torus knots. We also use the braid word presentation of knots to discuss states on the four-punctured sphere Hilbert space associated with 2-bridge knots and links. The calculations present interesting number theoretic features related with continued fraction representations of rational numbers. In particular, we show that the minimization procedure defining the complexity naturally leads to regular continued fractions, allowing an interesting geometric interpretation of the results in the Farey tesselation of the upper-half plane. Finally, we relate our discussion to the framework of path integral optimization by generalizing the original argument to non-trivial topologies.


Introduction
The notion of computational complexity is original from computer science and generally refers to the minimum number of fundamental operations needed to implement a given task. In the context of quantum mechanics [1], the typical task is that of using a unitary transformation U (a quantum circuit) to prepare a target state |Ψ T from a given reference state |Ψ R , that is, The unitary U is assumed to be constructed as a sequence of fundamental operations called gates that act on a small number of degrees of freedom (e.g., only 2-qubit operations in a multi-qubit system). If we denote by D(U ) -the circuit depth -the total number of gates used in a particular U , the circuit complexity is simply where U optimal is the circuit having the minimal number of gates.
In [2], Nielsen et. al. introduced a nice geometric approach to quantum complexity. The basic idea was to assume that U is generated by some time-dependent Hamiltonian H(t), such that each particular circuit can be understood as a particular path γ in the space of unitaries, Here the parameter t can be taken to be in the range [0, 1] and, as dictated by (1.1), the paths are constrained to obey the boundary conditions U γ (0) = I and U γ (1) = U . The main advantage is that, under appropriate definition of the circuit depth functional D[U γ (t)], the problem of finding the optimal circuit reduces to one of finding geodesics in a curved Riemannian manifold. The complexity (1.2) then is simply the length of this geodesic. To be precise, whenever it is possible to argue that the effective Hamiltonian H(t) is of the form where {O I } (the set of fundamental gates) are the generators of some Lie algebra, by using D[U γ ] ≡ 1 0 dt I |Y I (t)| 2 the problem reduces to the one of finding geodesics γ (parametrized by the control functions Y I (t)) in the corresponding Lie group manifold.
This geometric approach to circuit complexity has recently found its use in high energy physics motivated by two competing proposals for the complexity in conformal field theory states with a holographic dual, the so called "complexity = volume" [3] and "complexity = action" [4] conjectures. The ground state complexity of a free scalar field was studied in [5] (see also [6] for a related approach using the Fubini-Study metric), which was later generalized to coherent states [7], free fermions [8,9], complex scalar [10], weakly interacting theories [11], non-equilibrium states [12][13][14][15], thermofield double states [16][17][18], and recently to ground states of lattice models displaying quantum phase transitions [19,20] (see also [21,22] for further developments). A common feature of all these calculations is that they were carried out for free or weakly interacting theories. At the moment it remains unclear from a field theoretic point of view how to make sense of the complexity of states in strongly interacting theories, which would provide a better understanding of the holographic conjectures mentioned above. An exception here is the case of 2d CFTs, which has been studied recently in [23,24] and leads to results similar to the path integral optimization approach of [25][26][27][28].
In the present paper, we stick to the above notions of complexity and apply them to a particular set of states in the Hilbert space of Chern-Simons theory with compact gauge group G and level k. The theory is well-known to have only global topological degrees of freedom. Its quantization inside a solid torus gives rise to a finite-dimensional Hilbert space H(T 2 ; G, k) whose states correspond to 3-manifolds M having a boundary ∂M = T 2 . For G = SU (N ), the same Hilbert space is known to appear also in the quantization of the SU (N ) k Wess-Zumino-Witten conformal field theory on T 2 [29][30][31][32]. The finite-dimensional nature of the Hilbert space makes the quantum theory remarkably simple (essentially an instance of quantum mechanics), despite of the intricate non-perturbative interactions appearing in the action. A similar story holds for a generic Riemann surface Σ (eventually with punctures) at ∂M.
A canonical basis on H(T 2 ; G, k) is constructed by inserting circular Wilson loop operators colored with an integrable highest weight representation of G along the non-contractible cycle of the solid torus [29]. The specific states we will consider correspond to Wilson lines tied in the form of an arbitrary torus knot K n,m and to a simple class of links made of many torus knots [33]. Thee torus knots are classified by a pair of coprime integers (n, m) that count how many times the knot winds around the two fundamental cycles of the torus. Recalling that different integer linear combinations of cycles are related by the action of the modular group P SL(2, Z), one finds that the (n, m) torus knot can be obtained from a simple circular line parallel to the non-contractible cycle (the unknot K 1,0 ) through a modular transformation. Since P SL(2, Z) has a unitary representation on H(T 2 ; G, k), this naturally defines a quantum circuit building the state |K n,m from the unknot state |K 1,0 . The optimal circuit corresponds to the shortest word on P SL(2, Z) generators yielding the desired transformation, which reduces the problem of finding the complexity to a number theory problem. We also briefly discuss the case of rational (or 2-bridge) knots and links [33] by adopting the standard presentation of knots as the closure of braid words. For the specific case of 2-bridge knots, the problem can again be translated into the same one of P SL(2, Z) generators.
We show that different realizations of the quantum circuit U n,m are associated with different continued fraction decompositions of the rational n m , showing an interesting interplay between our quantum circuits and number theory. In particular, we prove (see Proposition 1) that the optimal circuit U min n,m = T a 1 S · · · T ar S corresponds to a i = (−1) i+1 b i , where b i > 0 are the regular (or Euclidean) continued fraction coefficients. The complexity is then simply where |f | is a further contribution due to possible framing of the knot. We propose a geometric interpretation of this in terms of geodesic paths on a graph connecting rational numbers (the Farey graph), which has a natural representation in the upper-half plane. We also discuss a related interpretation in the Stern-Brocot tree of rational numbers. This is also related to the view of complexity in terms of geodesics on the Cayley graph of S and T generators [34]. We find evidence that, in addition to Euclidean continued fractions, the ancestral path continued fractions introduced in [35] also yield an optimal circuit, indicating that the complexity appears as an invariant related to different continued fractions. We also discuss the relation with the path integral optimization approach to complexity developed in [25][26][27][28] by generalizing the construction to spaces whose topology is non-trivial. In this way, the optimization procedure is seen to include also a variation over the moduli space and a connection with our problem is then established.
Intuitively, the complexity of knot states in Chern-Simons seems to be related to the old problem of classifying knots, even though nowadays there are many known knot invariants designed to solve this problem (e.g., one can always find a polynomial distinguishing a given knot from an arbitrary collection of other knots) [33]. We find that an obvious extension of the torus knot results to rational links (understood as four-strand braid closures) recovers the same result when applied to torus knots, which are special members of the rational class.
We note that the relation of knots to quantum Chern-Simons theory as described above puts them in the quantum information context. Indeed, the connection between knots and quantum computing has long been appreciated -they are alike quantum algorithms and their complexity should tell us about the complexity of the underlying quantum tasks [36][37][38]. Complexity, in the sense discussed here, can be related to complexity (in an abstract sense) of certain algorithms for computing knot invariants, cf. [39].
The remainder of this paper is organized as follows. In Section 2, we review the construction of the Hilbert space of Chern-Simons theory on the torus and give a detailed definition of torus knots states to be studied in the sequence. In Section 3, we compute the complexity of torus knots after proving a set of statements about continued fractions and then discuss the results through examples. We also give a geometric interpretation of the complexity and discuss relations with mathematical results on geodesic paths on the Farey graph. In Section 4 we extend the discussion to the case of other knots and links. In Section 5 we discuss a connection with the path integral optimization approach to complexity. We summarize our findings in the closing Section 6. Some additional details about torus knot states are left for Appendix A.
2 Torus knot states in Chern-Simons theory

Knot complement states
The Chern-Simons theory with gauge group G and level k, denoted by G k , is defined on a (compact, connected, oriented) 3-manifold M by the action where A = A µ dx µ is the gauge field and the trace is taken in the fundamental representation of the Lie algebra of G. The level k is an integer in order to ensure gauge invariance of the path integral defining the quantum theory [29]. This action is topological in the sense that it is independent of the metric chosen in M. As a consequence, the expectation value of any gauge invariant and metric independent observable of the theory defines a topological invariant in M. The natural example is the Wilson loop operator associated with an oriented closed curve (e.g., a knot) K, obtained by tracing in a given representation R the holonomy of the gauge field around K. More generally, the expectation value of any product W R (L) ≡ i W R i (K i ) of Wilson loops computes a topological invariant of the link L = i K i obtained by joining the (nonintersecting) knots K i . 1 This is calculated as usual by the path integral where the normalization factor Z(M) −1 is omitted for brevity Z(M) = M DA e i S CS [A] . When the gauge group G is SU (2) and the R i are all fundamental representations, this reduces to the celebrated Jones polynomial of L [29]. Similarly, for SU (N ) and SO(N ) one gets the HOMFLY-PT [40,41] and the Kauffman [42] polynomials, respectively. In general (2.3) gives access to infinitely many link invariants as the gauge group and representations are changed. We are interested in Chern-Simons theory defined on a topological 3-manifold M with a 2-torus as a boundary, ∂M = T 2 . Any such M can be understood as the knot complement of some knot K in a closed 3-manifold, which here for simplicity we take to be the 3-sphere. Namely, we will be interested in 3-manifolds M = S 3 \K tub constructed by removing from S 3 a small tubular neighborhood K tub of a knot K. The simplest example is provided by the trivial knot or unknot, in which case the region K tub is a simple (i.e., unknotted) solid torus and its complement M turns out to be another solid torus [43]. For a non-trivial knot the situation is illustrated in Figure 1. The Chern-Simons path integral on M defines a state in the Hilbert space H(T 2 ; G, k) associated with the T 2 boundary. We shall denote this by |K (because |S 3 \K tub would be too cumbersome) and refer to it as the knot complement state associated to K. 2 Since the theory is topological, states constructed in this way only depend on the topology of M, not on its precise geometry. Therefore, different quantum states on the torus can be constructed by considering different knot complements.
A canonical basis for the torus Hilbert space H(T 2 ; G, k) can be constructed taking M to be a solid torus (the complement of the unknot, in the spirit above) and inserting Wilson lines on it [29]. Namely, the path integral on the solid torus with a Wilson line in the representation R j inserted along the non-contractible cycle defines a state |j on the boundary (its conjugate j| corresponds to the insertion of a Wilson line in the conjugate representation R j ). An orthonormal basis for H(T 2 ; G, k) then consists of the set |j where j runs over integrable highest weight representations of the gauge group G at level k. For instance, in the case of U (1) k these integrable representations are labelled by an integer j = 0, 1, . . . , k − 1, while for SU (2) k they are labelled by a half-integer j = 0, 1 2 , . . . , k 2 . The resulting Hilbert spaces H(T 2 ; U (1), k) and H(T 2 ; SU (2), k) have dimensions k and k + 1, respectively.
The knot complement state |K ∈ H(T 2 ; G, k) obtained by path-integrating over M can be expanded in the |j basis as The coefficients ψ j (K) = j|K are computed by the inner product corresponding to gluing the two manifolds that define |K and j| along their common T 2 boundary. The result is a sphere with the Wilson line inserted, which is nothing but the knot invariant (2.3) on S 3 , In other words, the state |K contains all the Wilson loop knot invariants of the knot K at level k.

The framing ambiguity
Strictly speaking, the invariants (2.3) are only well-defined for framed knots (links) [29,49]. Informally, a framed knot K is just the usual knot K constructed using a ribbon instead of a dimensionless string. In other words, it is the object obtained by stretching the curve K a little bit at each point along a direction specified by a normal vector field v (called the framing), as illustrated in Figure 2. The resulting framed knot has twists in the ribbon, the number f of which is called framing number or self-linking number of K. The issue becomes clear in the case of U (1) Chern-Simons theory, where the action (2.1) is quadratic and correlators can be computed in closed form. Namely, for a link L = α K α , [29] W (L) S 3 = exp 2πi k α,β n α n β αβ , (2.6) where the integer n α labels the representation of the corresponding K α and is the Gauss linking number, a well-known topological invariant counting how many times the knots K α and K β (α = β) wind around each other. There is an inherent ambiguity in (2.6), however, coming from the contributions when α = β, where a prescription is needed to deal with the integration over coincident points. The problem is similar to the ambiguity in the definition of the composite operator ( Kα A) 2 in the quantum theory. Even though a careful inspection of the integral in αα shows that it is well-defined and finite [50], it turns out to be metric-dependent and hence not invariant under deformations of K α , which spoils the desired topological invariance of the result. A regularization prescription that restores this topological property amounts to introducing a framing for K α , as explained above, and defining αα as the linking number between K α and its framing, which is precisely the self-linking number f α . In general, there is no natural choice of framing and generic observables will depend on this choice (see, e.g., [51] for the framing dependence of Wilson loops in SU (N ) Chern-Simons). 3 However, this by no means takes away the merit of Chern-Simons theory, since the transformation rule for expectation values of Wilson loops under a change of framing is well-defined. Namely, if the knot K α has its framing shifted by t units, αα is increased by t and, as a result, it is clear from (2.6) that the Wilson loop picks up a phase factor, Even though we have only discussed here U (1) k , the same conclusion holds in SU (N ) k as well, where h α in that case is the conformal weight of the Wess-Zumino-Witten primary field corresponding to the representation R α [29].
(a) (b) Figure 2. Two different framings of the trefoil knot. (a) is the simplest to visualize, the so called blackboard framing, where the normal vectors point all to the same vertical direction and the ribbon lies flat on the projection plane. According to Calugareanu's theorem [52], the self-linking number in this case is the writhe number of the knot (w = 3 here). (b) shows another choice of framing having 4 extra twists on the ribbon (in general, any framing can be drawn as a blackboard framing with a number of extra twists). Note that each twist may increase or decrease the self-linking number by one, depending on whether it is a positive or negative twist. In particular, the selflinking number can always be set to zero by an appropriate number of twists -this defines the so called canonical framing.

Modular transformations and torus knots
There is a natural set of unitary transformations acting on the Hilbert space H(T 2 ; G, k). They correspond to the unitary representations of the modular group P SL(2, Z) of large dif-feomorphisms of the torus. The modular group is generated by the S and T transformations that act on the torus modular parameter τ as S : τ → − 1 τ , T : τ → τ + 1. They satisfy S 2 = (ST ) 3 = 1 and the P in front of P SL(2, Z) means that SL(2, Z) matrices M and −M should be identified. It is easy to see that S exchanges the two fundamental cycles of the torus, while T generates twists around the contractible cycle (the so-called Dehn twists). Any modular transformation can be written as a sequence of S and T transformations. These act naturally on the torus Hilbert space through their unitary matrix representations S and T (of dimension dim H(T 2 ; G, k)), which take particularly simple forms in the |j basis. For instance, in the U (1) k theory, they are given by [45] . From a knot theory perspective, a sequence of S and T diffeomorphisms transforms a circular Wilson loop (the unknot) inside the solid torus into an arbitrary torus knot. We recall that torus knots, which we denote by K n,m or by the pair (n, m), are knots that can be drawn on the surface of a torus without self-intersections. Non-trivial knots are labelled by two coprime 4 numbers (n, m) that count how many times the knot winds around the two fundamental cycles of the torus (the non-contractible and contractible one, respectively). With no loss of generality, they can be taken to be n > m > 1. 5 The unknot instead corresponds to the equivalence class of pairs (n, m) with either n or m (or both) equal to 1; with a slight abuse of notation we will chose the unknot representative as K 1,0 . The first few non-trivial torus knots are listed in Figure 3.
The pair of coprime numbers (n, m) defines the family of diffeomorphisms U n,m = n γ m δ (2.12) 4 When they are not coprime, K n,m denotes instead the torus link made of N = gcd(n, m) copies of K n N , m N . 5 Namely, it is not hard to check that i) K n,m ≡ K m,n ; ii) K n,−m is the mirror image of K n,m ; iii) K −n,−m is K n,m with the opposite orientation. Figure 3. The first few non-trivial torus knots as told by their crossing number, namely K 3,2 (the trefoil ), K 5,2 , K 7,2 , K 4,3 , K 9,2 , K 5,3 , K 11,2 , and K 13,2 (figure taken from [53]). We recall that the crossing number of a (n, m) torus knot is cr(K n,m ) = min (n − 1)m, (m − 1)n = (m − 1)n.
The representation of a torus diffeomorphism of the form (2.12) on the torus Hilbert space, characterized by the operator U n,m , defines a new quantum state (2.13) The interpretation of |j n,m is clear: it corresponds to a solid torus with a Wilson loop inserted along the torus knot K n,m , i.e., W R * j (K n,m ), in contrast to W R * j (K 1,0 ) that defines the original |j (see Figure 4). Notice that the unitary nature of U n,m ensures that the states |j n,m are also orthonormal. In other words, a diffeomorphism on the torus amounts to a change of basis in H(T 2 ; G, k). We shall refer to |j n,m as the torus knot basis, as opposed to the unknot basis |j .  The action of U n,m on a generic torus knot complement state (2.4) is less trivial, which is itself a different torus knot complement state, say |K r,s . This can be seen using the explicit operator description of torus knots in Chern-Simons theory in terms of which the natural action of P SL(2, Z) becomes manifest (see [32] for details). Namely, an arbitrary torus knot Wilson loop W R (K p,q ) can be obtained by acting with the torus knot operator W (p,q) R on the empty solid torus (the "vacuum state"), and modular transformations U (with unitary representation U) map these operators between themselves, that is, . It is clear from this construction that all torus knots can be obtained from the unknot (created by W (1,0) R ) by an appropriate modular transformation, namely (2.12). In other words, U n,m maps the unknot-complement state to the K n,m -complement, Some additional details about torus knot states are summarized in Appendix A.
We are now ready to discuss the complexity of states (2.13) and (2.15), which is the subject of the next Section. For simplicity, we shall carry out explicit calculations only from the unknot to (n, m), but the generalization from a generic pair (p, q) to (n, m) is straightforward.

Minimal words and optimal circuits
Let U n,m denote a torus diffeomorphism yielding K n,m from the unknot as in (2.12). As any P SL(2, Z) matrix, it can be decomposed in terms of the S and T (and S −1 , T −1 ) generators as a word of the form where a i are integer numbers and negative powers are to be understood as positive powers of the inverse matrix. Here we have already used S 2 = 1 to exclude higher powers of S. Of course this decomposition is not unique thanks to the further group relation (ST ) 3 = 1 and, more importantly, to the fact that (2.12) actually defines a whole family of U n,m 's (parametrized, e.g., by δ). As a result, the word length may grow indefinitely. Our goal is to find the shortest of these words. We begin by clarifying the class of numbers {a i } that can appear in (3.1). We first notice that each factor T a i S ≡ M a i = ( a i −1 1 0 ) acts on the torus modular parameter τ as the Möbius transformation M a i (τ ) = a i − 1 τ . The full word U n,m then acts on τ as a composition of these maps, i.e., U n,m (τ ) = nτ +γ showing that the set of allowed a i must form a continued fraction (CF) decomposition of n m . Using the standard "all plus" notation for continued fractions It is crucial to note that for a fixed n m there are infinitely many different CF decompositions (3.5), since a priori no restriction is put on the integers a i . For instance, if we declare the a i to be strictly positive (meaning that the use of the T −1 generator is forbidden) we can write 3 2 is a word of length 6 producing the trefoil knot; on the other hand, if negative a i 's are allowed we could write 3 2 = [1; 2] and get the shorter word U 3,2 = T ST −2 S = ( 3 1 2 1 ) of length 5 that also does the job. More generally, equivalent CF expansions exist that do not even have the same number of terms (e.g., 3 2 = [−2; 1, −1, −2, −2]). The shortest word corresponds to the particular choice(s) of CF that minimizes (3.2), that is, Notice that there is an interplay between r (the total number of terms in the CF) and the absolute values of the CF coefficients themselves, which makes the minimization procedure tricky: we want a CF with not too many terms, while at the same time keeping the coefficients sufficiently small.
In principle there could be many CFs yielding this minimal length (there is no reason why it should be unique). For our purposes it is enough to find one of them, since we are only interested in the value of ||U min n,m || itself. A possible strategy would be to ignore the fact that r and {b i } are related and minimize first over the number of terms r to later worry about the b i . Continued fractions with the least number of terms (so-called geodesic continued fractions) have been discussed in [35], where a prescription is given to construct a particular geodesic CF using the so-called ancestral path from n m to ∞ on the Farey graph. The problem here is that in general there are multiple geodesic CFs 6 and it is not clear how to carry out the minimization over coefficients b i within this set of geodesic CFs (the exception here is when |b i | ≥ 3 for all i ≥ 2, in which case the ancestral path CF constructed in [35] is the unique geodesic one and therefore minimizing over b i is trivial). Even though we have compelling numerical evidence that this ancestral path CF indeed minimizes the length (3.6), here we adopt a different (simpler) strategy and prove the following: Proposition 1. For n > m > 0, the minimal word length (3.6) is achieved for the regular continued fraction representation of n m (i.e., the one for which b i > 0 for all i = 1, . . . , r) with b r > 1. This representation is unique. 7 First of all, let us recall that the regular (or Euclidean) continued fraction representation [b 1 , . . . , b r ] of a rational number x is defined by the recurrence relation 6 Namely, there are at most F r (the r-th Fibonacci number) geodesic CFs with value x, where r is the minimal number of terms needed to expand the rational x [35]. 7 For an arbitrary (positive or negative) rational x this does not work. Even though we shall not need it here, we conjecture that in this case obtained by modifying the Euclidean algorithm as follows: E.g., for x = − 1 4 the Euclidean continued fraction [−1, 1, 3] gives C = 8 while the modified one yields [0, −4] which has C = 6. The proof should parallel the one given in the text after noting that this modified continued fraction has all coefficients of the same sign (except perhaps the first). We thank Ian Short for help on that.
where · is the floor function. The construction implements the Euclidean algorithm for finding the greatest common divisor of two integers n and m. It is clear that its coefficients are all positive (except perhaps the first one, which vanishes when 0 ≤ x < 1 or is negative when x < 0).
Proof of proposition 1. Suppose that [c 1 , . . . , c r ] is a continued fraction decomposition of n m that minimizes (3.6). What we need to show is that we can modify this expansion without changing the length ||U min n,m || = r i=1 |c i | + 1 in such a way that all the coefficients of the resulting continued fraction become positive. This can be done with the help of the following two identities where −(· · · ) means that all the coefficients that previously appeared in · · · are to appear now with opposite sign. The fact that expressions (3.8) still give an expansion of the same n m can be seen using [a 1 , . . . , It is also straightforward to check that the move (3.8a) preserves the length ||U min n,m || as long as c i > 0 and c i+1 < 0, while (3.8b) preserves the length for c i < 0 and c i+1 > 0.
There is a small subtlety in using (3.8) when either c i or c i+1 take the values ±1, in which case the identities may generate a vanishing coefficient. Whenever this happens we have to convention that the rearrangements [· · · , a, 0, 1, · · · ] ≡ [· · · , a+1, · · · ] and [· · · , 1, 0, a, · · · ] ≡ [· · · , 1 + a, · · · ] have been done (both of which are trivially checked). Then, with that in mind, we can do the following procedure: (ii) If c 1 ≤ 0: first apply the move (3.8b) sufficiently many times on the first pair of coefficients such that the resulting continued fraction gets a positive term in the first position. Then repeat the procedure in (i) to make all the remaining ones positive as well.
This procedure converts any minimal [c 1 , . . . , c r ] into a continued fraction with positive coefficients b i without changing ||U min n,m ||. It remains to show that such a decomposition can always be chosen with b r > 1, and in this case it is unique.
We first notice that there is an ambiguity in the definition of the last term since b r can always be written as (b r − 1) We would like to show that if we define all positive continued fractions (except the trivial case of 1 1 ) in such a way that b r > 1, then such a presentation is unique. To see that, consider two decompositions of the same n m , For future reference, let us also leave stated here the alternative proposition, for which we have no proof at the moment (only supporting numerical evidence): Proposition 2. The minimal word length (3.6) is also achieved for the geodesic continued fraction constructed in [35] based on the ancestral path between n m and ∞ in the Farey graph. For all practical matters, a proof is not needed since all we need here is the value of ||U min n,m ||, which can be computed using the simpler prescription of Proposition 1. Now, let us go back to the complexity story. Recall from the previous section that every torus diffeomorphism U n,m naturally defines a quantum circuit U n,m = T a 1 ST a 2 S . . . T ar S based on S and T gates acting on the torus Hilbert space of Chern-Simons. This quantum circuit can be used to connect two different pairs of states on H(T 2 ; G, k), namely the different basis vectors |j n,m and |j (see (2.13)) or the different torus knot complement states |K n,m and |K 1,0 (see (2.15)). Our goal is to calculate the complexity of this circuit, which is the minimal number of gates required to produce the desired unitary. In other words, C n,m is the length of the shortest ST -word representation of U n,m (the optimal circuit U optimal n,m ). It follows from the discussion above that where a i = (−1) i+1 b i and b i are the coefficients of the regular continued fraction representation of n m . The complexity is simply where each factor T a i S contributes with |a i |+1 = b i +1 and the dependence on the particular knot K n,m is encoded in both r and {b i }. We have also jumped a bit ahead and added the +|f | contribution due to framing of the initial unknot (f is the self-linking number), which we now make a brief pause to clarify. When discussing the optimal circuit above, we have implicitly assumed that the knot K n,m has trivial framing (f = 0), which is not in general the case since no natural choice of framing exists. This ambiguity in the choice of framing affects many physical quantities, including the complexity. Fortunately, the way in which it affects C n,m is very simple: a knot K with f units of framing and its version with trivial framing are mapped into each other by the f -fold Dehn twist generated by T f . This can be immediately seen in the U (1) k case from the transformation rule (2.8) of the wave function under a shift of framing, where the phase factor exp(2πi f j 2 /k) picked up by the state is nothing but the matrix element of T f that represents this Dehn twist in the Hilbert space, where T is shown in (2.10). Therefore, if U optimal n,m given in (3.11) is the optimal circuit building the trivially framed K n,m , it is clear that U optimal n,m T f is the corresponding one for the framed knot. Since in principle nothing prevents f from being negative, this explains the |f | extra units of complexity appearing in (3.12). Any further change of framing by t units as in (2.8) will add or subtract t units of complexity to C n,m .
In Table 1 we illustrate expression (3.12) explicitly for a number of particular torus knots K n,m , namely the ones for which the continued fraction decomposition of n m has up to 4 coefficients. This allows us to easily identify families of states having the same complexity. For instance, it is clear from the first line that C 1+b 1 b 2 ,b 2 = C 1+b 1 b 2 ,b 1 for all b 1 , b 2 > 1, with analog conclusions from cyclic permutation of indices in the second and third lines. Similarly, one can compare elements from different lines and identify further states that are equally complex. A detailed exploration of these symmetries reveals that the vast majority of states have a quite moderate complexity, as shown in Figure 5. It also becomes evident that the complexity increases very slowly in comparison with the crossing number of the knot, which provides a classical notion of how knotted the given knot is.
In Figure 6, we analyze the behaviour of the complexity C n,m as a function of n for different values of m. For large enough n, the complexity asymptotes to Table 1. The complexity (3.12) for the particular torus knots K n,m for which the regular continued fraction decomposition of n m has up to 4 coefficients. The construction proceeds similarly for r > 4. Recall that, according to our convention, b i ≥ 1 for i = 1, . . . , r − 1 while b r is strictly > 1.  However, a more careful analysis shows that this an approximate behavior, since the apparent straight lines in the plot actually exhibit an internal structure with a periodic pattern of fluctuations that becomes more noticeable as m increases. The situation is illustrated in Figure 7 for m = 30: the apparent single line is made of two discrete series of points that sit along two parallel lines. For other values of m this pattern can be different. Even though we have no algebraic explanation for these patterns, we checked that they have the same asymptotic slope.

Geometric interpretation
Interestingly, the complexity (3.12) can be given a nice geometric interpretation in terms of the Farey tesselation of the upper half-plane [54]. This tesselation is a result of embedding  the Farey graph F on the upper-half plane, whose vertices are the rational numbers (plus infinity) and whose edges join each pair of Farey neighbors (and only these). It is constructed as follows: one first draws vertical lines at each integer point n = n 1 ∈ Z, which reflects the fact that all integers are Farey neighbors of ∞; then joins pairs of adjacent points by a semicircle and generates a new rational point in between the two using the mediant formula n 1 m 1 ⊕ n 2 m 2 = n 1 +n 2 m 1 +m 2 . The procedure then follows recursively, and the result is shown by the black curves in Figure 8. The resulting tiles are ideal triangles with vertices either at a rational number or at infinity, and edges along semicircles of different radii or along the vertical lines. 9 One can also define the dual tree graph F * of F by taking the baricenter of each ideal triangle as vertices and connecting them to the adjacent triangles, forming a trivalent tree.
The contribution from the sum of regular continued fraction coefficients i b i ≡ d n,m is the "geodesic distance" between the origin (representing the unknot) and the fraction n m that identifies K n,m . This geodesic distance d n,m is geometrically equivalent to the number of edges connecting n m to the origin along a semicircular path (a geodesic path in the upper-half plane) that goes through the ideal triangles, where the vertices correspond to intersections of this path with the curves in the Farey tesselation. See Figure 8.
A related view of i b i can be given in terms of the Stern-Brocot tree of rational numbers. This is an infinite binary tree in which each vertex corresponds to a single positive rational number in its reduced form. It is constructed iteratively by starting at the zeroth level with the two extremal points 0 = 0 1 and ∞ = 1 0 and, at each new level, introducing a new rational number in between every pair n 1 m 1 and n 2 m 2 of rationals in the previous level using the mediant formula mentioned above. The tree up to its fifth level is illustrated in Figure 9. The sum i b i is the level (or depth) in the Stern-Brocot tree of the node n m , i.e., the number of edges connecting it to one of the root nodes on the top. Let us emphasize here that two rationals having the same i b i does not imply that the corresponding knot states have the same complexity, since (3.12) also contains a contribution from r. For instance, 4 3 and 5 3 both lie at the same depth in the Stern-Brocot tree ( i b i = 4), but the corresponding states |K 4,3 and |K 5,3 differ by one unit of complexity since the regular CF representation of 4 3 = [1; 3] has two coefficients while 5 3 = [1; 1, 2] has three. Finally, we notice that the Stern-Brocot tree is isomorphic to the dual Farey graph F * . It has the mediants as vertices, but each mediant is simply connected to the baricenter of each its respective triangle. In this sense, the CF depth is equivalent to the number of triangles cut by the geodesic path of figure 8.
The contribution from r (the number of terms in the continued fraction) in (3.12) can also be seen geometrically in Figure 8, but this time using paths along the Farey graph itself (i.e., along the black solid curves as opposed to the dashed colored curves). The regular continued fraction n m = [b 1 , . . . , b r ] defines a connected path P n/m = (∞, C 1 , . . . , C r = n m ) in the Farey graph connecting ∞ to n m and whose vertices are the convergents C i ≡ [b 1 , . . . , b i ] (i = 1, . . . , r) of the continued fraction [35]. Clearly, r is the number of edges in this path. 10 For instance, the three examples of Figure 8 have r 4,3 = 2, r 3,2 = 2, and r 5,3 = 3 corresponding to the paths P 4/3 = (∞, 1, 4 3 ), P 3/2 = (∞, 1, 3 2 ), and P 5/3 = (∞, 1, 2, 5 3 ), respectively. It is  Figure 8. Geometric view of the sum of continued fraction coefficients contributing to (3.12) in the Farey tesselation of the hyperbolic plane (denoted by the black solid curves). i b i ≡ d n,m is the "geodesic distance" between the origin (the unknot) and the fraction n m (the knot K n,m ), i.e., the number of edges connecting them along a semicircular geodesic path that goes through the tiles. This is illustrated for K 3,2 , K 4,3 , and K 5,3 by the dashed red, blue, and green curves, respectively, which have d 3,2 = 3 and d 4,3 = d 5,3 = 4.
clear that the paths above are not in general the ones that minimize r (e.g., the path (∞, 2, 5 3 ) is more efficient than P 5/3 ), which reflects the fact that the regular continued fraction is not in general a geodesic continued fraction.
Recently, the notion of circuit complexity, discrete groups and hyperbolic geometry has been discussed in [34]. The main message there is that every finitely generated group G, with generating set G, has a natural metric defined on its Cayley graph. The vertices g, h of this graph are elements of G and we connect them by an edge if gh −1 ∈ G. The Cayley graph of the group of modular transformations on the torus, P SL(2, Z), is built from S, T transformations (and its inverses) and its natural metric is exactly our circuit complexity (3.12). Summing up, the circuit complexity of torus knots has two main geometric components (apart from the framing contribution |f |), one associated to the number of triangles, i b i , and another to the number of edges of the Farey path from ∞ to n m , which is the CF size r. If we define d F (a, b) and d F * (v a , v b ) as the geodesic metrics in the Farey graph and its dual tree respectively, where a, b are rationals and v a , v b are ideal triangles with a, b as mediants, it is clear that where d Cayley is the word metric in the Cayley graph of S and T , d Notice that we have to add one to the dual Farey metric as we need to count the number of vertices, not just the number of edges. 11 Now, let us set the framing to be zero. As we stated above, one contribution to the complexity comes from the number of arcs in the Farey graph and another from the number of triangles along the path. In our numerical tests, we observed an upper bound on d F log 2 m + 2 for fixed m up to 2000, which is consistent with bounds presented in [55] for paths in the Farey graph. This means that the linear growth (3.13) for large n must be only due to d F * , i.e., the number of triangles. This result suggests a relation to the proposal of holographic subregion complexity [56,57], in which the complexity of a subregion (in our case, the interval [0, n m ]) is proportional to the volume bounded by a bulk geodesic. The normalized area below the geodesic in Figure 8 grows as n/2 in the case m = 2. However, despite the geometric similarity, our holographic setup is more in the spirit of [58], as our geometric representation is for the moduli space of knot states in Chern-Simons rather than the bulk spacetime itself.

Connected sums of torus knots
The results above are easily generalized for multi-component links of the type where the plus sign here indicates the operation of connected sum of knots and 2 2 1 denotes the Hopf link (in Rolfsen's notation), namely the simplest possible two-component link made of two unknots linked exactly once. In words, what this means is that L (n 1 ,m 1 ),...,(n N ,m N ) is the N -component link obtained by sequentially "Hopf-linking" the torus knots K n i ,m i , as illustrated in Figure 10. The simplest representative is L (1,0),..., (1,0) , which is a N -component generalization of the Hopf link (it reduces to the standard Hopf link when N = 2) obtained by a chain of trivial knots linked with unit linking numbers. It is important to emphasize that the class of links above is very special due to its simple linking pattern. In particular, it does not include the torus links (n, m), which are also composed by multiple torus knots (namely, N = gcd(n, m) copies of K n N , m N ) but whose linking structure is more intricate. Figure 10. The link L (3,2),(5,2), (7,2) obtained by "Hopf-linking" K 3,2 (black), K 5,2 (blue), and K 7,2 (red).
The story is then analogous to the one of knots in the previous section (we refer the reader to [45] for details). One can construct a 3-manifold M that is the link-complement of (4.1) in S 3 and do the Chern-Simons path integral on it. This defines a state L (n 1 ,m 1 ),...,(n N ,m N ) on the boundary of M, which now consists in the disjoint union of N tori, i.e., ∂M = N i=1 T 2 . The corresponding Hilbert space is H(T 2 ; G, k) ⊗N , for which a natural basis is given by |i 1 , . . . i N and |i j corresponds to a circular Wilson loop in the (integrable) representation R i inside the j-th torus. As in (2.5), the wave function of a link complement state in this basis is nothing but the Chern-Simons invariant (2.3) of the corresponding link.
The S and T diffeomorphisms of the j-th torus transform the unknot inside this particular torus into an arbitrary torus knot. As before, they naturally define unitary operators acting on the j-th single-torus Hilbert space. These allow one to construct the state corresponding to the link (4.1) from the one corresponding to L (1,0) and therefore has a complexity given by the sum of the complexities (3.12) for each of these components, namely where b iα and r α are the coefficients and size of the regular continued fraction decomposition of nα mα and f α the framing contribution.

Rational knots and links
The calculation of circuit complexity for torus knot states studied before can be extended to other interesting examples of TQFT Hilbert spaces if one uses the presentation of knots and links as closures of braids. In this case, we can make sense of complexity as the length of the minimal word of braid group generators. For an alternative definition of the complexity of braids, see [59]. This requires going beyond the torus Hilbert spaces studied in Section 2, so let us start by reminding what are the Hilbert spaces associated with 2-spheres in Chern-Simons [29]. First, the Hilbert space H(S 2 ; G, k) of Chern-Simons theory in a 3-manifold with a S 2 boundary is one-dimensional. This is not a very interesting example, since all the vectors in such a space differ only by a phase factor. In order to have a non-trivial Hilbert space one has to consider spheres with removed points (punctures) which correspond to the endpoints of Wilson lines. Hence punctures are alike non-dynamical heavy charged particles and they carry representations of the group G admissible by the value of k.
One cannot consider a sphere with a single puncture, since there would be no place for the Wilson line emanating from this point to end. For two punctures one can have a Wilson line connecting them, so the two endpoints should carry conjugated representations of G. Consequently, even in this case the Hilbert space remains one-dimensional.
In order to have a non-trivial Hilbert space, one has to consider a sphere with at least three punctures. The representations carried by these punctures should be compatible, in the sense that their tensor product should contain a trivial representation, One can think of this as the interaction of particles, in which two particles can fuse to produce a third one. The multiplicity of the trivial representation in the tensor product is then known as the fusion number N R 3 R 1 R 2 . These numbers also appear in the chiral algebra of the SU (2) k WZW theory [60]. They define the dimension of the resulting Hilbert space, Below we will consider states in the Hilbert spaces of spheres with four punctures. The representations of the four points are subject to the condition The dimension of the Hilbert space counts all the compatible ways of pairwise fusing the representations. We can represent the basis vectors by the diagrams (4.6) Here |R i and | R j correspond to two possible choices of the basis labeled by representations R i , or R j (denoted by dashed lines) that can appear in the s or t fusion channels. To fix a reference state, let us choose R 1 = R 3 = R and R 2 = R 4 =R in the left diagram. We choose the reference state |Ψ R to correspond to trivial R i = ∅, namely where we understand that the line in a trivial representation is the same as no line at all. The Hilbert space has a well-defined action of the braid group on it, which permutes the punctures on the sphere. The action of the braid group can be illustrated by a concatenation of a braid and the reference state: This illustrates the kind of target states one might be interested in. Note that, in this particular example, the state can be directly associated to a knot by closing a braid on the left by Ψ R |. The target state in the example above is represented by the trefoil knot. The Hilbert space associated with four-punctured spheres is particularly suitable to the discussion of rational (or 2-bridge) knots and links [33,61], 12 for which many problems in knot theory can be completely solved. They are encoded by Artin's braid group of three elements, B 3 . The crucial property for our purposes is the fact that P SL(2, Z) furnishes unitary representations of B 3 , which allows us to take advantage of the results of the previous section. Indeed, one can easily check that satisfy the braid group relation σ 1 σ 2 σ 1 = σ 2 σ 1 σ 2 . (4.10) Rational knots and links can be defined as closures of B 3 braids that are trivially embedded in B 4 (that is, the σ 3 generator of B 4 is never used in the braid word). There are two possible ways to close either end of a B 4 braid by connecting the strands pairwise: by the state |Ψ R in equation (4.7), or by an analogous state corresponding to trivial R j in the right diagram of equation (4.6). Consequently, there are two "bridges" connecting the strands and the obtained knots and links are also called 2-bridge. This class of knots L n,m is again labelled by two coprime integers (n, m) satisfying n > 0 and n m ≤ 1 and can also be associated with continued fractions [33,61]. For a fraction n m = [a 1 , . . . , a r ] with arbitrary integer coefficients as in (3.4), one constructs the braid word U n,m = σ a 1 2 σ a 2 1 σ a 3 2 · · · . On the right end of the braid one always closes the strands by reference state (4.7), see Figure 11. Notice that in the case of even r the braiding starts with σ ar 1 which (within the convention above) is just a framing contribution. The choice of closure on the left end is uniquely fixed depending on the value of a 1 : if a 1 = 0, meaning that the leftmost braiding operation is given by σ 1 , then one must close the braid as in 11(b); otherwise, the leftmost operation is given by σ 2 and one must close the braid as in 11(a). This associates a unique knot diagram to every braid word. To be precise, a nice additional feature of the rational family is that apart from knots it also contains links: given n m , the corresponding diagram is a knot if m is odd, or a link when m is even.  Figure 11. Braid word presentation of the 2-bridge knot L n,m . On the right end, we always close by neighboring pairs (as in (4.7)). On the left end, the closure prescription depends on what is the leftmost braiding operation in the word: if it is given by σ 2 , which acts on the second and third strands, we must close as in (a) since it is the only non-trivial option; if it is given by σ 1 , which acts on the first pair, the only option is to close as in (b).
In terms of P SL(2, Z) generators, the B 3 word defining the link L n,m is U n,m = σ a 1 2 σ a 2 1 σ a 3 2 · · · = ST a 1 ST a 2 ST a 3 S · · · , (4.11) which has nearly the same presentation as before (c.f. (3.1)). More precisely, they coincide when a 1 = 0. Note that so far nothing has been said about the particular continued fraction that defines the a i (hence L m,n ). An interesting theorem of Schubert [33,63] proves that the isotopy class of unoriented 2-bridge links actually does not depend on the particular choice of continued fraction -they all give the same link. Therefore, it follows naturally from Proposition 1 in the previous section that (for m > 0) the shortest braid word presentation of a given L n,m is obtained for the regular continued fraction, since it minimizes the ST -word in (4.11). In other words, the complexity C n,m (i.e., the minimal number of B 3 generators needed to represent the link) associated with the unitary operation of (4.8) for an arbitrary 2-bridge link L n,m with m > 0 is simply where b i are the Euclidean CF coefficients of n m . It is worth mentioning here that torus knots of the type (2, 2p + 1) (p > 0) are included in the rational family. Since 2 2p+1 = [0; p, 2], the minimal braid word obtained from the prescription above is simply U 2,2p+1 = σ p 2 σ 2 1 = ST p ST 2 . The corresponding complexity is C 2,p = p + 2 (in terms of B 3 generators), which is equivalent to p + 4 generators of P SL(2, Z). Notice that this is compatible with expression (3.12) for the complexity of torus knot states studied before, the only subtlety being the 2 units of framing (f = 2) that appear naturally here in the language of 2-bridge knots.

Relation with path integral optimization
The goal of this section is to connect the knot complexity derived in this paper with the framework of path integral optimization [25][26][27][28].
In [26], the authors consider a 2d lattice regularization of a path integral generating a certain target quantum state. The size of the sites may be varied to maximally simplify the numerical computation, and this procedure is shown to be equivalent to minimizing a certain complexity functional associated to the target quantum state. Equivalently, we can keep the lattice coordinate size fixed and act on the metric that, in 2d, can always be brought locally to the form g − − → Diff e 2φĝ , for some reference metricĝ. This implies that complexity minimization is equivalent to choosing an appropriate Weyl rescaling. We want to show here that large gauge transformations that act on the torus complex structure τ should also be included in the optimization procedure whenever the space topology is non-trivial. In this way, we provide a more general framework for discussing path integral complexity and establish a clear connection with the specific discussion in the previous sections.
We begin by considering a generic 2d CFT covariantly coupled to a background metric g. This metric has the role of defining the lattice size and is not a dynamical field. The path integral we are interested in is the Euclidean time evolution on the plane from −∞ up to a certain time t 0 , and we impose some boundary conditions for the metric at t 0 fixing the lattice size to be : The key point here is that the integration measure on a generic field ϕ is not invariant under conformal transformations g → e 2φ g, while it is invariant under diffeomorphisms. This happens because of the requirement to have Gaussian integral normalization: The integration measure is then sensitive to a Weyl rescaling such that with S L the Liouville action [64] S Because of this anomaly, the state Ψ prepared by path integration transforms with an overall normalization depending on the choice of φ, and this additional factor is defined as the (exponential of the) complexity of Ψ: In the context of AdS/CFT, the metric is interpreted as being induced on the plane by embedding it into AdS 3 , with the state Ψ defined at the conformal boundary of AdS space. A generalization of this discussion was introduced in [28], leading to the following formula Here the constant time surface Σ = ∂M Σ , on which the state Ψ is defined by path integration over M Σ , does not need to belong to the conformal boundary, but following the surface-state correspondence of [65] can be any convex codimension two surface in (here Euclidean) AdS. The state Ψ Σ is argued to be independent of the actual shape of M Σ except for the overall normalization. The complexity C M is then holographically computed as the value of the on-shell gravitational action restricted to the bulk region N Σ , I G (N Σ ), where N Σ is bounded by M Σ and the t 0 -slice containing Σ. It is then shown in [28] that I G (N Σ ) = S L (φ), for φ being the local cutoff (or, quite equivalently, the Weyl rescaling, see [28] for details) that brings the metric on M Σ to the form (5.1), showing that the two definitions of complexity agree.
A further generalization can be obtained by adding a surface Σ i providing initial conditions for the state at Σ. The path integration alongM Σ i Σ produces the time evolution U (Σ, Σ i ) from Σ i to Σ that can be used to glue the M Σ i and M Σ surfaces. The total associated complexity can be written as: Let us now move a step forward and consider the case where M does not have a trivial topology, as it was considered for the disk topology so far. For example, we could pickM Σ i Σ to be a cylinder and directly join the two boundaries Σ = Σ i . By translational invariance along Σ and Σ i , we can even twist one of the boundaries before gluing and obtain a generic torus T 2 . When the spacetime topology of M is not trivial, g − − → Diff e 2φĝ is no longer valid globally: the orbit C g generated by the diffeomorphism transformation does not cover the whole metric space, which should then be seen as a fiber bundle with fiber C g and base the moduli space M. The real dimension of this moduli space is determined by the Riemann-Roch theorem to be, for negative Euler number, dim (M) = 6g − 6 + 3b + 2o, with g the genus, b the number of boundaries and o the number of operator insertions (punctures) on the surface M . For zero Euler number, such as a torus or a cylinder, we have two and one moduli respectively (and an equal number of conformal killing vectors) 13 . In general thenĝ depends on the coordinates τ of M, so that For instance, if we were to integrate over g the integration measure would then split as Dg = Jac dτ DφDξDξ , (5.9) 13 There is a small caveat involved in counting the total moduli that comes from the boundary condition (5.1): this fixes the size of the boundary circle Σ so that a modulus less should be included. For instance if we had considered a cylinder, with boundaries Σ i and Σ as before, the counting would give zero moduli even if a real modulus would have to be included if we had not imposed (5.1).
where ξ,ξ are local 1-forms parametrizing the diffeomorphism transformation δg zz = ∇ z ξ z and its complex conjugate. The complexity now should be minimized both along the fiber C g and the moduli space base M, so that we should choose the local Weyl transformation and the point in moduli space τ . Following the same steps leading to (5.4), the functional becomes [66] 10) where we have denoted by R the Ricci scalar while K and h are respectively the trace of the extrinsic curvature and the induced metric on Σ. Equivalently we can invoke holography and obtain the same expression as the gravity on-shell partition function restricted to N , which in the case of M = T 2 is just the torus interior.
The final piece of information we need is the effect of inserting some primary operator O(x 0 ) with scaling dimension h on the surface M . Considering that after a Weyl transformation on O(x 0 ) this scales with weight h, this simply implies that the total complexity should be modified as S L − 2hφ(x 0 ).
To finally make connection with the knot complexity, we should ask the following: what is the effect of a path integral optimization on the Wilson loop that wraps the knot? Note that we have in mind here the realization of 3d gravity as the difference of two SL(2, R) Chern-Simons Lagrangians. The situation here is slightly different from the operator insertion since the Wilson loop is, in our framework, inserted inside the bulk region N and not on its boundary M . However, the philosophy is the same: we should vary over the Weyl field φ and the complex structure τ in order to optimize the path integration on M and compute the effect on the complexity. As the complexity computed by holography is the saddle point of the gravitational action −I G (N ) restricted to the bulk region N , including a bulk Wilson loop just amounts to compute the saddle point for the gravity partition function with the Wilson loop insertion; formally, after considering backreaction, The minimization of this quantity is achieved by acting on M by Weyl rescaling, which does not affect the Wilson loop due to the topological nature of the theory, as well as large gauge transformations, that indeed act changing τ . This connects the path integral optimization proposal to our discussion of the complexity of TQFT states. From this argument, it is not clear a priori whether we should obtain the same complexity functional for knots that we have derived in this paper. It is an interesting open problem to work out in detail (5.11) and see what kind of complexity functional it leads to. We leave this for a future work.

Conclusions
Our main motivation in this paper was to use topological theories to bridge the notions of complexity that have recently been proposed in the quantum gravity and quantum field theory context with more familiar notions in computer science. This is due in part to the finite-dimensional nature of the Hilbert space of such theories in the case of compact gauge groups, but also to the topological nature of gravity in 3d. As a first step, we have focused on 3d Chern-Simons theory with compact gauge group and defined the complexity for states associated with torus knots and some connected examples. The key player in our game was the group P SL(2, Z) (and its unitary representations), which naturally generates the quantum evolution of Chern-Simons states in terms of elementary quantum gates S and T . We have found that the standard textbook notion of circuit complexity as the minimum number of gates necessary to produce a desired target state from a given reference has a number of interesting properties. The complexity of a state corresponding to a (n, m) torus knot (relative to the unknot) is the length of the shortest word of S and T generators yielding the desired torus diffeomorphism. It can be computed exactly in terms of the particular continued fraction decomposition [b 1 , . . . , b r ] of the rational number n m that has only positive coefficients -the so-called regular or Euclidean continued fraction. Such presentation is unique up to a trivial ambiguity in the last term and corresponds to the Euclidean algorithm of computing the greatest common divisor of n and m. This is the main result proven in Proposition 1. The result for the complexity C n,m is given by equation (3.12).
Interestingly, the complexity computed for the first few thousand torus knots grows at a much slower rate when compared with their crossing number. This is consistent with the idea that torus knots are intrinsically simpler than other knots with the same number of crossings. Also, for all our checked examples, (3.12) calculated using the Euclidean continued fraction gives the same result as the one computed with the ancestral path continued fraction, introduced in [35] as an explicit example of continued fraction having the minimal possible number of coefficients. The latter defines a geodesic path on the Farey graph connecting ∞ = 1 0 and n m , but a priori has no reason to minimize the ST -word. Hence, the complexity (3.12) might play a deeper role from the point of view of number theory and the modular group as an index characterizing geodesic continued fraction presentations. The conjectured relation was formulated as Proposition 2. Finally, we numerically observed that the complexity grows roughly as C n,m ∼ n m for large n. We also discussed interesting geometric interpretations of the complexity formula in the Farey tesselation of the hyperbolic plane, which could be relevant for understanding the connection of the present discussion with quantum gravity and its tensor network models. The sum of Euclidean continued fraction coefficients b i is itself also a "geodesic distance" in the upper-half plane between the origin and the fraction n m in the sense of [54]. Equivalently, it corresponds to the depth of n m on the Stern-Brocot tree of positive rationals or to the number of ideal triangles traversed in the dual Farey graph. The number r of terms in the continued fraction corresponds to the distance to ∞ travelling along a special path of Farey neighbors, which is by itself composed of a series of geodesic arcs. Due to the fact that r is bounded above for fixed m, the main contribution to the complexity for large n is due to the number of triangles. This seems to be well-approximated by the area below the geodesic curves in fig. 8, suggesting a connection of our results with the holographic subregion complexity [56,57]. We notice, however, that our discussion is more in the spirit of "holography in the moduli space" [58] rather than the usual spacetime holography.
In Section 5, we embedded our discussion in the wider framework of path integral optimization, recently introduced in [25], by showing how the original argument should be modified for non-trivial topological spaces: it is necessary to also optimize the moduli space of the spacetime. We formally derived the complexity functional in this language and an interesting future problem would be to work out its explicit form and better understand the relationship with our results for the complexity of knot states.
Finally, we also discussed circuit complexity in terms of braid group generators (i.e., using the presentation of knots as closures of braid words) in the case of 2-bridge knots in the Hilbert space of Chern-Simons on the sphere with four punctures. These are also characterized by two coprime numbers and have close connections with continued fractions, which again allows to easily obtain the complexity as a shortest word on B 3 generators via Proposition 1. The case of general knots in this braiding group language is more complicated and shall be addressed in a forthcoming work [62].
in this Hilbert space are three-dimensional spaces M attached to T 2 , such that torus is their boundary ∂M = T 2 . Canonical choice of basis on H(T 2 ; G, k) corresponds to considering solid tori with Wilson lines parallel to the longitude of the torus (unknots) and coloring them with integrable representations of G. Hence, any state in the Hilbert space can be expanded over the basis of vectors |i , with i = 1, . . . , N labeling integrable representations, We note that the basis |i is orthonormal, which follows from the scalar product i|j = Z(S 2 × S 1 ;ī, j) = δ ij , (A.2) which is nothing but the topological invariant (Chern-Simons partition function) of two unlinked circles in S 2 × S 1 parallel to S 1 and colored by representations j and the conjugate of representation i. Such an invariant is unity if i = j, and zero otherwise. One set of states in H(T 2 ) to consider are those represented by solid tori containing torus knots inside |j m,n . Expanding over the basis means gluing such a torus with a solid torus with an unknot Wilson line inside. The second torus must be inverted, to represent the dual space H * (T 2 ), and the representation of the unknot should be conjugated. The expansion coefficients are then ψ i (j m,n ) = i|j m,n = Z(S 2 × S 1 ;ī 1,0 , j m,n ) , (A. 3) which are the S 2 × S 1 invariants of a torus knot in representation j and an unknot colored withī, both parallel to S 1 and unlinked. In particular, the coefficient with trivial i = ∅ gives an invariant of the torus knot in S 2 × S 1 .
Recall that if one wants to compute the invariants of torus knots in S 3 , one should take the solid torus with a knot (m, n) and glue it with a complement of this solid in S 3 , which is some vector Ω| ∈ H * (T 2 ). The complement is also an inverted torus, but with an opposite identification of the contractible and non-contractible cycles. Hence, where S ij is a representation of the modular matrix S on H(T 2 ). Therefore, Z(S 3 ; j m,n ) = Ω|j m,n = i S 0i Z(S 2 × S 1 ;ī 1,0 , j m,n ) .
(A. 5) in (A.4). Sandwiching these dual states with basis elements |j gives the same invariants in S 3 , albeit complex conjugated. What is the space interpretation of states K m,n |? They correspond to spaces with a torus boundary, which produce S 3 with a torus knot inside, when glued with a solid torus with a Wilson line j 1,0 . Hence such K m,n | are complements of a tubular neighborhood of torus knot (m, n) in S 3 .