SciELO - Scientific Electronic Library Online

vol.21 issue1Numerical Study for Two-Phase Flow with Gravity in Homogeneous and Piecewise-Homogeneous Porous MediaConstructions of Dense Lattices over Number Fields author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand




Related links


TEMA (São Carlos)

Print version ISSN 1677-1966On-line version ISSN 2179-8451

TEMA (São Carlos) vol.21 no.1 São Carlos Jan./Apr. 2020  Epub Apr 30, 2020 


Construction of Polygonal Color Codes from Hyperbolic Tesselations

1Departamento de Matemática, UTFPR, Universidade Tecnológica Federal de Paraná, Via do Conhecimento, Km 1,85503-390, Pato Branco, PR, Brasil. E-mail:

2Departamento de Matemática, UEM, Universidade Estadual de Maringá, Av. Colombo, 5790, 87020-900, Maringá, PR, Brasil. E-mail:

3UTFPR, Universidade Tecnológica Federal de Paraná, Via do Conhecimento, Km 1, 85503-390, Pato Branco, PR, Brasil. E-mail:

4Colegiado Multidisciplinar, IFPR, Instituto Federal do Paraná, Av. Bento Munhoz da Rocha Neto, PRT 280, 85555-000, Palmas, PR, Brasil. E-mail:


This current work propose a technique to generate polygonal color codes in the hyperbolic geometry environment. The color codes were introduced by Bombin and Martin-Delgado in 2007, and the called triangular color codes have a higher degree of interest because they allow the implementation of the Clifford group, but they encode only one qubit. In 2018 Soares e Silva extended the triangular codes to the polygonal codes, which encode more qubits. Using an approach through hyperbolic tessellations we show that it is possible to generate Hyperbolic Polygonal codes, which encode more than one qubit with the capacity to implement the entire Clifford group and also having a better coding rate than the previously mentioned codes, for the color codes on surfaces with boundary with minimum distance d=3 .

Keywords: color codes; topological quantum codes; hyperbolic geometry


Neste trabalho nós propomos uma técnica para gerar códigos coloridos poligonais no ambiente da geometria hiperbólica. Os códigos coloridos foram introduzidos por Bombin e Martin-Delgado em 2007 e sua versão chamada triangular color codes possui um grau maior de interesse pela sua capacidade de implementação do grupo de Clifford, mas codificam apenas um qubit. Em 2018 Soares e Silva estenderam os códigos triangulares para os códigos poligonais, que codificam mais qubits. Usando uma abordagem via tesselações hiperbólicas mostramos que é possível gerar os códigos Poligonais Hiperbólicos, que codificam mais que um qubit, possuem a capacidade de implementação de todo o grupo de Clifford e além disso tem uma taxa de codificação melhor que os códigos anteriormente citados, quando se trata de códigos coloridos em superfícies com bordo cuja distância mínima é d=3 .

Palavras-chave: códigos Coloridos; códigos quânticos topológicos; geometria hiperbólica


One of the great difficulties of performing quantum computing is decoherence, as Unruh warned in 1995 20. Decoherence is the decay phenomenon of superposition of states, due to the interaction between the system and the surrounding environment. In theory, the problem may be solved using quantum error-correcting codes. Quantum states can be cleverly encoded so that the harmful effects of decoherence can be resisted.

The classical theory of error-correcting codes was stablish by Shannon in 1948 15. Shor, in 1995, was the first to show an quantum error-correcting code 16, overcoming the non-cloning theorem and achieving an analogue to the classic repeating code. Shor’s code belongs to a class of codes known as CSS codes, which was introduced by Calderbank and Shor 6 and Steane 19.

CSS codes, in turn, are a subclass of an even broader and richer class of codes, as shown by Gottesman 9, known as stabilizer codes. One of the most important stabilizer code is Kitav toric code, introduced in 12. These codes were expanded and generalized to the topological quantum codes. Important examples were obtained considering other types of tessellations of the torus 2, 7 or considering surfaces with a higher genus, 1.

Color codes were introduced in 4 by Bombin and Martin-Delgado. These codes are also topological quantum codes, and they are also generated by surface tessellations. The color codes have a great advantage over the Kitaev codes, which is the greater number of operations that can be performed on coded qubits. In the particular case of triangular codes, Bombin and Martin-Delgado proved that for the triangular codes, it is possible to implement the entire Clifford group transversally. The color codes have also been expanded, for example in the work of Soares and Silva 18, where the authors consider an approach of the color codes on compact surfaces of genus greater or equal to 2, using tools of the hyperbolic geometry, obtaining codes with parameters better than those of Kitaev 12, Bombin and Martin-Delgado 2, Albuquerque, Palazzo and Silva 1, among others. In 17 a proposal was made to increase the number of coded qubits of the triangular codes, called polygonal codes, in order to improve the coding rate of the triangular codes, without losing the implementation capacity of the Clifford group.

Our objective in this work is to adapt polygonal codes to the environment of hyperbolic geometry because, in addition to have infinite possibilities of tessellations (the Euclidean plane has only one tessellation that satisfies the necessary conditions for the polygonal codes, as we will see in section 3), some works that used hyperbolic geometry in the generation of topological codes have achieved an improvement in the parameters, as we can see in 5, 8, besides those already cited 1 and 18. We evaluated the feasibility of this type of construction, taking into account the rigidity of the hyperbolic geometry in relation to the area of the polygons and the impossibility of decreasing the length of the side of a regular hyperbolic polygon without changing its internal angles, and we show that not only is it feasible as this technique can generate codes with even better parameters than those obtained until now by codes of the same nature.


Hyperbolic geometry, as well as several other non-Euclidean geometries, have arisen in response to the negation of Euclide’s fifth postulate.

Here, two models of hyperbolic geometry is cosidered: the upper half-plane, 2=z=x+iy|(z)>0 and Poincaré disc, 𝔻2= {z;|z|<1} . The set ℍ2, endowed with the metric

ds=dx2+dy2y, (2.1)

is known as hyperbolic plane or Lobachevsky plane and this metric is known as hyperbolic metric. This application is a metric and the proof of this fact can be seen in 11.

Considering the map f:2𝔻2 giving by

fz=zi+1z+i, (2.2)

can be proved that f is one-to-one, and that, d*, giving by

d(z,w)=d(f1(z),f1(w));(z,w𝔻2) (2.3)

is a metric on 𝔻2 and has expression ds=2dz1-z2 . Thus, f is an isometry from (2,d) to (𝔻2,d) . In this way, the most convenient model for a given situation can be choosed.

If R2 is a region, the hyperbolic area of R is given by

μR=Rdxdyy2 (2.4)

if the integral exists.

However, to determine the area of a hyperbolic triangle the Gauss-Bonnet Theorem can be used, which says the hyperbolic area of a hyperbolic triangle depends only on its angles. 11

Theorem 2.1 (Gauss-Bonnet). Let ∆ be a hyperbolic triangle with inner angles α, β, γ. Then, the area of ∆ is given by µ()=παβγ .

Differently from Euclidean geometry, in the hyperbolic plane two similar triangles are also congruent. This implies that, given a regular hyperbolic polygon, it is impossible to vary the length of its sides by keeping fixed the measurements of its internal angles.

2.1 Tesselations

A regular tessellation of the Euclidean or hyperbolic plane is a cover of the whole plane by regular polygons, all with the same number of sides, without superpositions of such polygons, meeting only along complete edges or at vertices. A regular tessellation is denoted by p,q , where q regular polygons with p sides are found at each vertex.

Giving a regular tessellation p,q , the inner angle of a p-gon at a vertex is 2πq , and dividing the polygon into p triangles, the angle in the center of the polygon will be 2πp , while the others will be 2π2q . Therefore, in the Euclidean case


It follows that,


For this equation there are three integer solutions, that is, there are three regular tessellations in the Euclidean plane. Namely, the tessellations formed by squares 4,4 , by regular hexagons 6,3 and by equilateral triangles 3,6 . On the other hand, in the hyperbolic plane we have the following relation:


Then, it follows,

pq2p2q>0(p2)(q2)>4 (2.5)

There are infinite solutions to this inequality. Therefore, there are infinite regular tessellations in the hyperbolic plane. Moreover, there are infinite tessellations of the hyperbolic plane even when we fix the number of sides of the polygon, or if we fix the amount of polygons that must meet in each vertex of the tessellation. Since we interested in colored codes, the tesselations that matter to us must be trivalent and 3-colorable, which means that q=3 and p must be even.


A quantum error-correcting code (QECC) is an application of a complex Hilbert space ℋ k , of dimension 2 k , to a Hilbert space of dimension 2 n where k<n . A QECC 𝒞 with code word length n, dimension k and minimum distance d is denoted by [[n,k,d]] .

A general class of codes, that even includes the CSS-like codes, are the so-called Stabilizer Codes 13. Stabilizer codes are the quantum analog for the classical additive codes.

To define these codes, consider the set given by the Pauli matrices of a qubit P=I,X,Y,Z . The set P n given by elements of the type irP1P2Pn , where for every i=1...n one has PiP and r0,1,2,3 is called a Pauli group of order n. Now considers an Abelian subgroup SPn so that IS , which is called the stabilizer group.

Thus, the stabilizer code 𝒞 is defined by the eigenspace associated with the eigenvalue 1 of the operators of S, that is: 9


In 12, Kitaev proposed a particular case of stabilizer code, which became known as Kitaev’s Toric code. In a torus l×l , Kitaev considered a square lattice tessellating the torus. He associated a qubit to each edge of the tessellation. At each vertex v of the tessellation was associated an operator X v that acts as the matrix of Pauli X on each edge adjacent to this vertex and as the identity in all others. Each face f of the tessellation was associated with an operator Z f which acts as the matrix of Pauli Z on each edge of the boundary of f , and act as identity in all others faces.

In this way, Kitaev’s Toric code is defined by:


This code has parameters [[2l2,2,l] where k=2 is the number of non-trivial cycles, and d=l is the number of edges contained in the shortest non-trivial homological cycle.

Figure 1: Support of face (f) e vertices (v) operators of Kitaev’s Toric Code. 

The color codes, introduced by Bombim and Martin-Delgado in 4, similar to the Kitaev code, is a topological code. To create this codes, the authors considered a two-dimensional surface, with or without borders, and tessellated it with a tesselation satisfying 2 conditions:

  • it must be trivalent, that is, three edges meet at each vertex

  • have 3-colorable faces, wich means it is possible to color all the faces of the tessellation using only 3 colors (red, green and blue, for instance), such that two faces sharing an edge do not have the same color.

Considering a coloration of faces, it also induces a coloration of the edges, so that an edge of a certain color does not belong to the border of a face with the same color.

Once the surface is properly tessellated, the authors now associated the qubits one-to-one with the vertices of the tessellation, diferently of Kitaev’s Toric code where the qubits were associated to edges.

The generators of the stabilizers are the face operators, known by “plaquette” operators, with both X and Z operators on each face, acting on the vertices of the face in question. For each face p of the tessellation, such operators are denoted by Bpσ with σ=X,Z 4.

Separating the faces according to their color, in the sets R (red), G (green) and B (blue), it follows:


with σ=X,Z .

For every colored tesselation the shrunk lattices can be defined. There exists three of them, one for each color, which are auxiliary lattices. For instance in the red shrunk lattice considers as vertex each red face. The edges of this new lattice conect the red faces (wich are vertices now) and note each new edge contain two vertices of the original lattice, which means that each edge corresponds to two qubits. Still, the green and blue faces of the colored tessellation are the faces of that new auxiliary lattice.

The string operators acting on color codes may be green, blue or red, depending on which net is being considered. Regardless of the color, they can be of type X or Z. These string operators are denoted by SμCσ where C is a color, σ is Z or X and µ is a label of the class of homology.

In general, one has 4:

SμRσSμGσSμBσ~1 (3.1)

Equation (3.1) shows that there are only two independent colors.

A fundamental property of color codes is that, in addition to a string operator of one color being able to be deformed to another homologous string operator, it is also possible to combine two strings of different colors to produce a third equivalent operator of different color from the two original ones.

Figure 2: An example of a t-string (or string-net). Note that a string of a certain color branches into two parts, of two other colors. The two parts combine and return to a string with original color. This string-net is equivalent a whole original color string and to see this is just to do the product of this t-string with the face operators generated by the marked faces 18

3.1 Triangular and Polygonal Codes

The most interesting particular case of the color codes is obtained when tessellations on surfaces with boundary are considered. This construction was firstly considered in 4. A color code was created on a planar region bounded by a triangle in which each edge of the triangle is in the border, and each edge has one color. This code encodes only one qubit, and its non-trivial homology string is a t-string, that is, a string that departs from one edge of a certain color, branches into two other colors, and each part of its branching ends in the border which has its color.

Figure 3: A triangular code encodes only one qubit, a t-string with three endpoints, each one on one edge of its respective color. 

The t-strings in the triangular codes are the key to implement the Clifford group. The Clifford group is the second level of the so-called Clifford hierarchy (CH), introduced by Gottesman and Chuang 10 for quantum operations, and defined by


where U is an unitary operator acting on n qubits. In this definition of CH, the first level of the hierarchy is 1n=n . The second level is the Clifford group, which is the normalizer of the Pauli group. To generate the entire Clifford group we need only three operators, which are H (Hadamard gate), K (phase shift gate, or π/4 gate) and Λ(X) (controlled-not gate or CNOT gate):


Although the implementation of Clifford group does not imply the universality of quantum computation (which we would have at the third level of CH), there are important tasks performed by the operations this group, such as quantum distillation, quantum teleportation and dense coding, for instance.

The difference in relation to the surface codes is that, geometrically, the t-strings X and the t-strings Z are exactly the same. Thus, these two such t-strings are denoted by T X and T Z , and consequently TX,TZ=0 .

Thus, given the encoded operators X¯=Xn,Z¯=Zn,K¯=Kn and H¯=Hn , where n is the number of qubits in the code, we have

H·Xf·H¯=Zf, H·Zf·H=Xf, H·X·H=Z e H·Z·H=X.


K·Zf·K=Zf and K·Xf·K=-1t/2Xf·Zf,

where t is the number of vertices of the face. Thus, using a semi-regular tessellation where all faces have a number of vertices, multiple of 4, such as 4,8,8 (which means that, in each vertex we have a square and two octagons, and this is the only one possible in the Euclidean plane), all generators of the Clifford group may be implemented transversally, since the CNOT gate is always implemented transversally in CSS codes 4), (13), (3.

In 2018, Soares and Silva introduced the so called Polygonal Codes, whose rules are similar to those of triangular codes, but with a polygon as the border. Then, with more edges it was obtained more encoded qubits. The main property of the polygonal codes is to increase the number of encoded qubits, but keeping the implementation of the Clifford group, wich means that all homology group should be generated by t-strings.

In the Figure 4 an example of the structure of a polygonal code with 5 edges is showed. Here all strings with non-trivial homology (except for homeomorphisms) are explicit. It must be observed that strings 1, 2, and 3 (as labeled in the figure) generate all other strings, which means that such code encodes 3 qubits, and in addition, since these strings are t-strings, this ensures that the polygonal codes of Soares and Silva are in the same conditions as the triangular codes of Bombin and Martin-Delgado, which means that these codes also have the capacity of implementation of the whole group of Clifford. What has been exemplified for the particular case of a 5-sided polygon has been shown in the general case in 17, that is, if a polygon has n sides, then the polygonal code generated by it encodes (n2) qubits, and the (n2) generators of the homology group are t-strings.

The smallest triangular code presented by Bombin and Martin-Delgado has parameters [[7,1,3]] with coding rate 1/7. Figure 5 shows an example of a polygonal code, where the parameters of the code are [[12,2,3]] , and it has the same minimum distance of the quoted triangular code, but it encodes twice the amount of qubits and the coding rate is 1/6.

In the works 1), (17 and 8, using properties of the hyperbolic geometry in connection with topological codes, it was achieved good results by improving the parameters of the codes that preceded them. Therefore, it is natural to investigate whether it is possible to use hyperbolic tesselations to try to reproduce triangular and polygonal codes in the hyperbolic geometry environment, improving its parameters and maintaining its ability to implement the Clifford group.

Figure 4: Homologically non-trivial strings in a polygon with 5 sides. 

Figure 5: Code P(1,2,1) with parameters [[12,2,3]] generated by tessellation 4,8,8 in a quadrilateral. Highlighted we have a t-string with the minimum distance of the code, with 3 qubits of its support. 

Figure 6: Code P(1,2,2) with parameters [[15,3,3]] generated by tessellation 8,3 in a pentagon 5,15 . Highlighted we have a t-string with the minimum distance of the code, with the 3 qubits of its support. 

Table 1: Comparison between the color codes with borders with minimum distance d=3 that implement the Clifford group. 

Code [[n,k,d]] k/n
Triangular [[7,1,3]] 1/7
Polygonal [[12,2,3]] 1/6
Hyperbolic Polygonal [[15,3,3]] 1/5

The main difficulty in adapting triangular codes to the hyperbolic geometry environment is the area. Given a hyperbolic triangle ABC, as already quoted in the section 2, its area S is always less than π. Thus, when considering a tessellation p,q of ABC, a polygon with area smaller than S must be finded, which gives codes with very low minimum distances. On the other hand, with the polygonal codes we polygons with larger areas can be choosed and in this way both, the minimum distance and the dimension of the code, can be obtained as large as necessary, thus increasing the chance of get better coding rates.

Applying the hyperbolic tessellation techniques by ruler and compass described in 14, the Poincaré disc can be tesselated with any tessellation p,3 , provided that p satisfies the inequality given in 2.5. For these initial examples we fix the first of the possibilities, which is p=8 (if p is odd will generates a tessellation that is not 3-colorable), and we choose to place the center of the base polygon of the tessellation in the center of Poincaré disc, just to stay visually sharper. After that, we make the choice of which polygon will be tessellated. Fixing that we want a pentagon, this choice is still not trivial, since there are infinite regular pentagons (for example) that under the same tessellation can generate codes with different parameters. If the ratio area of the pentagon by the octagon is very low, then the minimum distance will be low. If the ratio is too high, the number n becomes too high. For this example we made the choice of the pentagon 5,15 .

With the polygon and tessellation presented we were able to generate a code with the best parameters of the category, in the direction of encoding rate, in comparison with others in the literature that have the same minimum distance. Table 1 presents some topological codes with minimum distance d=3 and that have the capacity of implementation of the whole group of Clifford, as can be seen in 4 and 17.


1. C.D. Albuquerque, R. Palazzo & E.B. Silva. Topological quantum codes on compact surfaces with genus g¿2. Journal of Mathematical Physics, 50(2) (2009), 023513-023513. doi: 10.1063/1.3081056. [ Links ]

2. H. Bombin & M.A. Martin-Delgado. Topological Quantum Error Correction with Optimal Encoding Rate. Physical Review A, 73(6) (2006). doi: 10.1103/physreva.73.062303. URL [ Links ]

3. H. Bombin & M.A. Martin-Delgado. Computacion Cuantica topologica y sistemas fuertemente correlacionados. Revista espanola de fisica, 21(2) (2007), 31-45. [ Links ]

4. H. Bombin & M.A. Martin-Delgado. Topological Quantum Distillation. Physical Review Letters, 97(18) (2007), 180501+. doi: 10.1103/physrevlett.97.180501. URL [ Links ]

5. N.P. Breuckmann & B.M. Terhal. Constructions and Noise Threshold of Hyperbolic Surface Codes. IEEE Transactions on Information Theory, 62(6) (2016), 3731-3744. doi: 10.1109/TIT.2016.2555700. [ Links ]

6. A.R. Calderbank & P.W. Shor. Good Quantum Error-Correcting Codes Exist. Physical Review A, 54(2) (1996), 1098-1105. doi: 10.1103/physreva.54.1098. URL [ Links ]

7. C.D. de Albuquerque, R.P. Junior & E.B. da Silva. On toric quantum codes. Int. J. Pure Appl. Math, 50 (2009), 221-226. [ Links ]

8. N. Delfosse. “Tradeoffs for reliable quantum information storage in surface codes and color codes”. IEEE (2013), 917-921 pp. doi: 10.1109/isit.2013.6620360. URL [ Links ]

9. D. Gottesman. A Class of Quantum Error-Correcting Codes Saturating the Quantum Hamming Bound. Physical Review A, 54(3) (1996), 1862-1868. doi: 10.1103/physreva.54.1862. URL [ Links ]

10. D. Gottesman & I.L. Chuang. Quantum Teleportation is a Universal Computational Primitive. Nature, 402(6760) (1999), 390-393. doi: 10.1038/46503. URL [ Links ]

11. S. Katok. “Fuchsian Groups”. Chicago Lectures in Mathematics. University of Chicago Press (1992). URL [ Links ]

12. A. Kitaev. Fault-tolerant quantum computation by anyons. Annals of Physics, 303(1) (2003), 2-30. doi: URL [ Links ]

13. D. Lidar & T. Brun. “Quantum Error Correction”. Cambridge University Press (2013). URL [ Links ]

14. A. Ramsay & R.D. Richtmyer. “Constructions by Straightedge and Compass in the Hyperbolic Plane”. Springer New York, New York, NY (1995), pp. 254-282. doi: 10.1007/978-1-4757-5585-512. URL [ Links ]

15. C.E. Shannon. A Mathematical Theory of Communication. SIGMOBILE Mob. Comput. Commun. Rev., 5(1) (2001), 3-55. doi: 10.1145/584091.584093. URL [ Links ]

16. P.W. Shor. Scheme for reducing decoherence in quantum computer memory. Phys. Rev. A, 52 (1995), R2493-R2496. doi: 10.1103/PhysRevA.52.R2493. URL [ Links ]

17. W.S. Soares Jr & E.B. Silva. Construction of color codes from polygons. Journal of Physics Communications, 2(9) (2018), 095011. URL [ Links ]

18. W.S. Soares Jr & E.B. Silva. Hyperbolic Quantum Color Codes. Quantum Information and Computation, 18(3 and 4) (2018), 308-320. [ Links ]

19. A. Steane. Simple Quantum Error Correcting Codes. Physical Review A, 54(6) (1996), 4741-4751. doi: 10.1103/physreva.54.4741. URL [ Links ]

20. W.G. Unruh. Maintaining coherence in Quantum Computers. Physical Review A, 51(2) (1994), 992-997. doi: 10.1103/physreva.51.992. URL [ Links ]

Received: December 03, 2018; Accepted: September 20, 2019

*Corresponding author: W. S. Soares Jr. -- E-mail:

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License