Skip to main content
Log in

Homological Quantum Rotor Codes: Logical Qubits from Torsion

  • Published:
Communications in Mathematical Physics Aims and scope Submit manuscript

Abstract

We formally define homological quantum rotor codes which use multiple quantum rotors to encode logical information. These codes generalize homological or CSS quantum codes for qubits or qudits, as well as linear oscillator codes which encode logical oscillators. Unlike for qubits or oscillators, homological quantum rotor codes allow one to encode both logical rotors and logical qudits in the same block of code, depending on the homology of the underlying chain complex. In particular, a code based on the chain complex obtained from tessellating the real projective plane or a Möbius strip encodes a qubit. We discuss the distance scaling for such codes which can be more subtle than in the qubit case due to the concept of logical operator spreading by continuous stabilizer phase-shifts. We give constructions of homological quantum rotor codes based on 2D and 3D manifolds as well as products of chain complexes. Superconducting devices being composed of islands with integer Cooper pair charges could form a natural hardware platform for realizing these codes: we show that the 0-\(\pi \) qubit as well as Kitaev’s current-mirror qubit—also known as the Möbius strip qubit—are indeed small examples of such codes and discuss possible extensions.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. The name “discrete-time” here comes from Fourier analysis of functions sampled periodically at discrete times (indexed by \({\mathbb {Z}}\)).

  2. In the literature of integer chain complexes it is more frequent to take the dual with respect to integer coefficients, that is to say, to consider \(\textrm{Hom}(C_j,{\mathbb {Z}})\) instead of \(\textrm{Hom}(C_j, {\mathbb {T}})\). This could be interpreted in our case as interchanging \(X\) and \(Z\), but this exchange is not trivial for rotors as there is no corresponding unitary operation. Furthermore, in the case of qubits we have \(\textrm{Hom}({\mathbb {Z}}_2,{\mathbb {T}}) \simeq \textrm{Hom}({\mathbb {Z}}_2,{\mathbb {Z}}_2) \simeq {\mathbb {Z}}_2\). Similarly for oscillators we have \(\textrm{Hom}({\mathbb {R}},{\mathbb {T}}) \simeq \textrm{Hom}({\mathbb {R}},{\mathbb {R}}) \simeq {\mathbb {R}}\). Hence the correct way to take the dual is obscured as all the groups are the same.

  3. \(k^\prime \) is often called the Betti number.

  4. Interestingly, disjointness of logical operators was studied previously [29] to understand which logical gates can be realized by Clifford or constant depth operations.

  5. In this notation we ignore any phases by which elements in the center can be multiplied due to the non-commutative nature of \({\mathcal {G}}\), so that \({\mathcal {S}}\) is a stabilizer group with a \(+1\) eigenspace.

  6. Notice that all the \(\sum _{\pm }\) sums account for a factor of 2 here.

References

  1. Terhal, B.M., Conrad, J., Vuillot, C.: Towards scalable bosonic quantum error correction. Quantum Sci. Technol. 5(4), 043001 (2020). https://doi.org/10.1088/2058-9565/ab98a5

    Article  ADS  Google Scholar 

  2. Albert, V.V.: Bosonic coding: introduction and use cases. arXiv e-prints (2022) arXiv:2211.05714

  3. Gottesman, D., Kitaev, A., Preskill, J.: Encoding a qubit in an oscillator. Phys. Rev. A 64, 012310 (2001). https://doi.org/10.1103/PhysRevA.64.012310

    Article  ADS  CAS  Google Scholar 

  4. Albert, V.V., Covey, J.P., Preskill, J.: Robust encoding of a qubit in a molecule. Phys. Rev. X 10(3), 031050 (2020). https://doi.org/10.1103/PhysRevX.10.031050

    Article  CAS  Google Scholar 

  5. Raynal, P., Kalev, A., Suzuki, J., Englert, B.-G.: Encoding many qubits in a rotor. Phys. Rev. A (2010). https://doi.org/10.1103/physreva.81.052327

    Article  Google Scholar 

  6. Vuillot, C., Asasi, H., Wang, Y., Pryadko, L.P., Terhal, B.M.: Quantum error correction with the toric Gottesman–Kitaev–Preskill code. Phys. Rev. A 99(3), 032344 (2019). https://doi.org/10.1103/PhysRevA.99.032344

    Article  ADS  CAS  Google Scholar 

  7. Bermejo-Vega, J., Lin, C.Y.-Y., Van Den Nest, M.: Normalizer circuits and a Gottesman–Knill theorem for infinite-dimensional systems. Quantum Inf. Comput. 16(5–6), 361–422 (2016)

    MathSciNet  Google Scholar 

  8. Haah, J.: Two generalizations of the cubic code model (2017). https://online.kitp.ucsb.edu/online/qinfo_c17/haah/

  9. Albert, V.V., Pascazio, S., Devoret, M.H.: General phase spaces: from discrete variables to rotor and continuum limits. J. Phys. A Math. Theor. 50(50), 504002 (2017). https://doi.org/10.1088/1751-8121/aa9314

    Article  ADS  MathSciNet  Google Scholar 

  10. Hayden, P., Nezami, S., Popescu, S., Salton, G.: Error correction of quantum reference frame information. PRX Quantum 2(1), 010326 (2021). https://doi.org/10.1103/PRXQuantum.2.010326

    Article  Google Scholar 

  11. Faist, P., Nezami, S., Albert, V.V., Salton, G., Pastawski, F., Hayden, P., Preskill, J.: Continuous symmetries and approximate quantum error correction. Phys. Rev. X 10(4), 041018 (2020). https://doi.org/10.1103/PhysRevX.10.041018

    Article  CAS  Google Scholar 

  12. Brooks, P., Kitaev, A., Preskill, J.: Protected gates for superconducting qubits. Phys. Rev. A At. Mol. Opt. Phys. 87(5), 052306 (2013). https://doi.org/10.1103/PhysRevA.87.052306

    Article  ADS  CAS  Google Scholar 

  13. Dempster, J.M., Fu, B., Ferguson, D.G., Schuster, D.I., Koch, J.: Understanding degenerate ground states of a protected quantum circuit in the presence of disorder. Phys. Rev. B 90(9), 094518 (2014). https://doi.org/10.1103/PhysRevB.90.094518

    Article  ADS  CAS  Google Scholar 

  14. Gyenis, A., Mundada, P.S., Di Paolo, A., Hazard, T.M., You, X., Schuster, D.I., Koch, J., Blais, A., Houck, A.A.: Experimental realization of a protected superconducting circuit derived from the 0-\(\pi \) qubit. PRX Quantum 2(1), 010339 (2021). https://doi.org/10.1103/PRXQuantum.2.010339

    Article  Google Scholar 

  15. Kitaev, A.: Protected qubit based on a superconducting current mirror. arXiv e-prints (2006) arXiv:cond-mat/0609441

  16. Weiss, D.K., Li, A.C.Y., Ferguson, D.G., Koch, J.: Spectrum and coherence properties of the current-mirror qubit. Phys. Rev. B 100(22), 224507 (2019). https://doi.org/10.1103/PhysRevB.100.224507

    Article  ADS  CAS  Google Scholar 

  17. Kitaev, A., Moore, G.W., Walker, K.: Noncommuting flux sectors in a tabletop experiment (2007). arXiv:0706.3410 [hep-th]

  18. Hall, B.C.: Quantum Theory for Mathematicians. Graduate Texts in Mathematics, vol. 267. Springer, New York (2013). https://doi.org/10.1007/978-1-4614-7116-5

    Book  Google Scholar 

  19. Calderbank, A.R., Shor, P.W.: Good quantum error-correcting codes exist. Phys. Rev. A 54(2), 1098–1105 (1996). https://doi.org/10.1103/PhysRevA.54.1098

    Article  ADS  CAS  PubMed  Google Scholar 

  20. Steane, A.: Multiple-particle interference and quantum error correction. Proc. R. Soc. Lond. Ser. A Math. Phys. Eng. Sci. 452(1954), 2551–2577 (1997). https://doi.org/10.1098/rspa.1996.0136

    Article  ADS  MathSciNet  Google Scholar 

  21. Conrad, J., Eisert, J., Arzani, F.: Gottesman–Kitaev–Preskill codes. A lattice perspective. Quantum 6, 648 (2022). https://doi.org/10.22331/q-2022-02-10-648

    Article  Google Scholar 

  22. Noh, K., Girvin, S.M., Jiang, L.: Encoding an oscillator into many oscillators. Phys. Rev. Lett. 125(8), 080503 (2020). https://doi.org/10.1103/PhysRevLett.125.080503

    Article  ADS  MathSciNet  CAS  PubMed  Google Scholar 

  23. Hurewicz, W., Wallman, H.: Dimension Theory (PMS-4). Princeton University Press, Princeton (1941)

    Google Scholar 

  24. Brown, E.H., Comenetz, M.: Pontrjagin duality for generalized homology and cohomology theories. Am. J. Math. 98(1), 1 (1976). https://doi.org/10.2307/2373610

    Article  MathSciNet  Google Scholar 

  25. Hatcher, A.: Algebraic Topology. Cambridge University Press, Cambridge (2002)

    Google Scholar 

  26. Munkres, J.R.: Elements of Algebraic Topology. CRC Press, Boca Raton (2019). https://doi.org/10.1201/9780429493911

    Book  Google Scholar 

  27. Kaczynski, T., Mischaikow, K.M., Mrozek, M.: Computational Homology. Applied Mathematical Sciences. Springer, New York (2004)

    Google Scholar 

  28. https://github.com/cianibegood/quantum-rotor-codes.git

  29. Jochym-O’Connor, T., Kubica, A., Yoder, T.J.: Disjointness of stabilizer codes and limitations on fault-tolerant logical gates. Phys. Rev. X 8(2), 021047 (2018). https://doi.org/10.1103/PhysRevX.8.021047

    Article  Google Scholar 

  30. Rymarz, M., Bosco, S., Ciani, A., DiVincenzo, D.P.: Hardware-encoding grid states in a nonreciprocal superconducting circuit. Phys. Rev. X 11, 011032 (2021). https://doi.org/10.1103/PhysRevX.11.011032

    Article  CAS  Google Scholar 

  31. Freedman, M.H., Meyer, D.A.: Projective plane and planar quantum codes. Found. Comput. Math. 1(3), 325–332 (2001). https://doi.org/10.1007/s102080010013

    Article  MathSciNet  Google Scholar 

  32. Leverrier, A., Londe, V., Zémor, G.: Towards local testability for quantum coding. Quantum 6, 661 (2022). https://doi.org/10.22331/q-2022-02-24-661

    Article  Google Scholar 

  33. Conrad, J., Chamberland, C., Breuckmann, N.P., Terhal, B.M.: The small stellated dodecahedron code and friends. Philos. Trans. R. Soc. A Math. Phys. Eng. Sci. 376(2123), 20170323 (2018). https://doi.org/10.1098/rsta.2017.0323

    Article  ADS  MathSciNet  Google Scholar 

  34. Hodgson, C.D., Weeks, J.R.: Symmetries, isometries and length spectra of closed hyperbolic three-manifolds. Exp. Math. 3(4), 261–274 (1994)

    Article  MathSciNet  Google Scholar 

  35. Culler, M., Dunfield, N.M., Goerner, M., Weeks, J.R.: SnapPy, a computer program for studying the geometry and topology of \(3\)-manifolds. Available at http://snappy.computop.org (24/02/2023)

  36. Tillich, J.-P., Zémor, G.: Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength. IEEE Trans. Inf. Theory 60(2), 1193–1202 (2014). https://doi.org/10.1109/TIT.2013.2292061

    Article  MathSciNet  Google Scholar 

  37. Audoux, B., Couvreur, A.: On tensor products of CSS codes. Ann. Inst. Henri Poincaré D 6(2), 239–287 (2019). https://doi.org/10.4171/aihpd/71

    Article  MathSciNet  Google Scholar 

  38. Vool, U., Devoret, M.: Introduction to quantum electromagnetic circuits. Int. J. Circuit Theory Appl. 45(7), 897–934 (2017). https://doi.org/10.1002/cta.2359

    Article  Google Scholar 

  39. Burkard, G., Koch, R.H., DiVincenzo, D.P.: Multilevel quantum description of decoherence in superconducting qubits. Phys. Rev. B 69(6), 064503 (2004). https://doi.org/10.1103/PhysRevB.69.064503

    Article  ADS  CAS  Google Scholar 

  40. Rasmussen, S.E., Christensen, K.S., Pedersen, S.P., Kristensen, L.B., Bækkegaard, T., Loft, N.J.S., Zinner, N.T.: Superconducting circuit Companion—an introduction with worked examples. PRX Quantum 2(4), 040204 (2021). https://doi.org/10.1103/PRXQuantum.2.040204

    Article  ADS  Google Scholar 

  41. Douçot, B., Ioffe, L.B.: Physical implementation of protected qubits. Rep. Prog. Phys. 75(7), 072001 (2012). https://doi.org/10.1088/0034-4885/75/7/072001

    Article  ADS  MathSciNet  PubMed  Google Scholar 

  42. Le, D.T., Grimsmo, A., Müller, C., Stace, T.M.: Doubly nonlinear superconducting qubit. Phys. Rev. A 100, 062321 (2019). https://doi.org/10.1103/PhysRevA.100.062321

    Article  ADS  CAS  Google Scholar 

  43. Conrad, J.: Twirling and Hamiltonian engineering via dynamical decoupling for Gottesman–Kitaev–Preskill quantum computing. Phys. Rev. A 103, 022404 (2021). https://doi.org/10.1103/PhysRevA.103.022404

    Article  ADS  MathSciNet  CAS  Google Scholar 

  44. Kolesnikow, X.C., Weda Bomantara, R., Doherty, A.C., Grimsmo, A.L.: Gottesman–Kitaev–Preskill state preparation using periodic driving. arXiv e-prints (2023) arXiv:2303.03541

  45. Sameti, M., Potočnik, A., Browne, D.E., Wallraff, A., Hartmann, M.J.: Superconducting quantum simulator for topological order and the toric code. Phys. Rev. A 95(4), 042330 (2017)

    Article  ADS  Google Scholar 

  46. Suchara, M., Bravyi, S., Terhal, B.: Constructions and noise threshold of topological subsystem codes. J. Phys. A Math. Theor. 44(15), 155301 (2011). https://doi.org/10.1088/1751-8113/44/15/155301

    Article  ADS  MathSciNet  Google Scholar 

  47. Aliferis, P., Cross, A.W.: Subsystem fault tolerance with the Bacon–Shor code. Phys. Rev. Lett. 98, 220502 (2007). https://doi.org/10.1103/PhysRevLett.98.220502

    Article  ADS  CAS  PubMed  Google Scholar 

  48. Cottet, A.: Implementation d’un bit quantique dans un circuit supraconducteur. PhD thesis (2002)

  49. Koch, J., Yu, T.M., Gambetta, J., Houck, A.A., Schuster, D.I., Majer, J., Blais, A., Devoret, M.H., Girvin, S.M., Schoelkopf, R.J.: Charge-insensitive qubit design derived from the Cooper pair box. Phys. Rev. A At. Mol. Opt. Phys. 76(4), 042319 (2007). https://doi.org/10.1103/PhysRevA.76.042319

    Article  ADS  CAS  Google Scholar 

  50. Gyenis, A., Di Paolo, A., Koch, J., Blais, A., Houck, A.A., Schuster, D.I.: Moving beyond the transmon: noise-protected superconducting quantum circuits. PRX Quantum 2(3), 030101 (2021). https://doi.org/10.1103/PRXQuantum.2.030101

    Article  ADS  Google Scholar 

  51. Paolo, A.D., Grimsmo, A.L., Groszkowski, P., Koch, J., Blais, A.: Control and coherence time enhancement of the \(0\)-\(\pi \) qubit. New J. Phys. 21(4), 043002 (2019). https://doi.org/10.1088/1367-2630/ab09b0

  52. Groszkowski, P., Paolo, A.D., Grimsmo, A.L., Blais, A., Schuster, D.I., Houck, A.A., Koch, J.: Coherence properties of the 0-\(\pi \) qubit. New J. Phys. 20(4), 043053 (2018). https://doi.org/10.1088/1367-2630/aab7cd

    Article  ADS  CAS  Google Scholar 

  53. Smith, W.C., Kou, A., Xiao, X., Vool, U., Devoret, M.H.: Superconducting circuit protected by two-Cooper-pair tunneling. NPJ Quantum Inf. 6(1), 8 (2020)

    Article  ADS  Google Scholar 

  54. Bravyi, S., Hastings, M.B., Michalakis, S.: Topological quantum order: stability under local perturbations. J. Math. Phys. 51(9), 093512 (2010). https://doi.org/10.1063/1.3490195

    Article  ADS  MathSciNet  Google Scholar 

  55. Dennis, E., Kitaev, A., Landahl, A., Preskill, J.: Topological quantum memory. J. Math. Phys. 43(9), 4452–4505 (2002)

    Article  ADS  MathSciNet  Google Scholar 

  56. Toner, J., DiVincenzo, D.P.: Super-roughening: a new phase transition on the surfaces of crystals with quenched bulk disorder. Phys. Rev. B 41, 632–650 (1990). https://doi.org/10.1103/PhysRevB.41.632

    Article  ADS  CAS  Google Scholar 

  57. Atalaya, J., Bahrami, M., Pryadko, L.P., Korotkov, A.N.: Bacon–Shor code with continuous measurement of noncommuting operators. Phys. Rev. A At. Mol. Opt. Phys. 95(3), 032317 (2017). https://doi.org/10.1103/PhysRevA.95.032317

    Article  ADS  Google Scholar 

  58. Hastings, M.B., Haah, J.: Dynamically generated logical qubits. Quantum 5, 564 (2021). https://doi.org/10.22331/q-2021-10-19-564

    Article  Google Scholar 

  59. Davydova, M., Tantivasadakarn, N., Balasubramanian, S.: Floquet codes without parent subsystem codes. PRX Quantum 4(2), 020341 (2023). https://doi.org/10.1103/PRXQuantum.4.020341

    Article  ADS  Google Scholar 

  60. Kesselring, M.S., de la Fuente, J.C.M., Thomsen, F., Eisert, J., Bartlett, S.D., Brown, B.J.: Anyon condensation and the color code. arXiv (2022). https://doi.org/10.48550/arXiv.2212.00042

  61. Willsch, D., Rieger, D., Winkel, P., Willsch, M., Dickel, C., Krause, J., Ando, Y., Lescanne, R., Leghtas, Z., Bronn, N.T., Deb, P., Lanes, O., Minev, Z.K., Dennig, B., Geisert, S., Günzler, S., Ihssen, S., Paluch, P., Reisinger, T., Hanna, R., Bae, J.H., Schüffelgen, P., Grützmacher, D., Buimaga-Iarinca, L., Morari, C., Wernsdorfer, W., DiVincenzo, D.P., Michielsen, K., Catelani, G., Pop, I.M.: Observation of Josephson harmonics in tunnel junctions. arXiv e-prints (2023) arXiv:2302.09192

  62. Golubov, A.A., Kupriyanov, M.Y., Il’ichev, E.: The current-phase relation in Josephson junctions. Rev. Mod. Phys. 76(2), 411–469 (2004). https://doi.org/10.1103/RevModPhys.76.411

    Article  ADS  CAS  Google Scholar 

  63. Gladchenko, S., Olaya, D., Dupont-Ferrier, E., Douçot, B., Ioffe, L.B., Gershenson, M.E.: Superconducting nanocircuits for topologically protected qubits. Nat. Phys. 5(1), 48–53 (2008). https://doi.org/10.1038/nphys1151

    Article  CAS  Google Scholar 

  64. Kovalev, A.A., Pryadko, L.P.: Quantum Kronecker sum-product low-density parity-check codes with finite rate. Phys. Rev. A 88(1), 012311 (2013). https://doi.org/10.1103/PhysRevA.88.012311

    Article  ADS  CAS  Google Scholar 

  65. Panteleev, P., Kalachev, G.: Degenerate quantum LDPC codes with good finite length performance. Quantum 5, 585 (2021). https://doi.org/10.22331/q-2021-11-22-585

    Article  Google Scholar 

  66. Panteleev, P., Kalachev, G.: Quantum LDPC codes with almost linear minimum distance. IEEE Trans. Inf. Theory 68(1), 213–229 (2022). https://doi.org/10.1109/TIT.2021.3119384

    Article  MathSciNet  Google Scholar 

  67. Hastings, M.B., Haah, J., O’Donnell, R.: Fiber bundle codes: breaking the n\(^{1/2}\) polylog(n) barrier for Quantum LDPC codes. In: Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing. STOC 2021, pp. 1276–1288. Association for Computing Machinery, New York, NY, USA (2021). https://doi.org/10.1145/3406325.3451005

  68. Breuckmann, N.P., Eberhardt, J.N.: Balanced product quantum codes. IEEE Trans. Inf. Theory 67(10), 6653–6674 (2021). https://doi.org/10.1109/TIT.2021.3097347

    Article  MathSciNet  Google Scholar 

  69. Panteleev, P., Kalachev, G.: Asymptotically good Quantum and locally testable classical LDPC codes. In: Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing. STOC 2022, pp. 375–388. Association for Computing Machinery, New York, NY, USA (2022). https://doi.org/10.1145/3519935.3520017

  70. Leverrier, A., Zemor, G.: Quantum Tanner codes. In: 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS), pp. 872–883. IEEE, Denver, CO, USA (2022). https://doi.org/10.1109/FOCS54457.2022.00117

  71. Guth, L., Lubotzky, A.: Quantum error correcting codes and 4-dimensional arithmetic hyperbolic manifolds. J. Math. Phys. 55(8), 082202 (2014). https://doi.org/10.1063/1.4891487

    Article  ADS  MathSciNet  Google Scholar 

  72. Freedman, M.H.: Z\(_2\)-systolic freedom. In: Proceedings of the Kirbyfest, pp. 113–123. Mathematical Sciences Publishers, MSRI, Berkeley, California, USA (1999). https://doi.org/10.2140/gtm.1999.2.113

  73. Freedman, M.H., Meyer, D.A., Luo, F.: Z\(_2\)-systolic freedom and quantum codes. In: Mathematics of Quantum Computation, pp. 287–320 (2002)

  74. Freedman, M., Hastings, M.: Building manifolds from quantum codes. Geom. Funct. Anal. 31(4), 855–894 (2021). https://doi.org/10.1007/s00039-021-00567-3

    Article  MathSciNet  Google Scholar 

  75. Arfken, G.B., Weber, H.-J., Harris, F.E.: Mathematical Methods for Physicists. Academic Press, Oxford (2012)

    Google Scholar 

  76. Quintavalle, A.O., Webster, P., Vasmer, M.: Partitioning qubits in hypergraph product codes to implement logical gates. Quantum 7, 1153 (2023). https://doi.org/10.22331/q-2023-10-24-1153

  77. Bravyi, S., DiVincenzo, D.P., Loss, D.: Schrieffer–Wolff transformation for quantum many-body systems. Ann. Phys. 326(10), 2793–2826 (2011). https://doi.org/10.1016/j.aop.2011.06.004

    Article  ADS  MathSciNet  CAS  Google Scholar 

Download references

Acknowledgements

We thank Emmanuel Jeandel, Mac Hooper Shaw and David DiVincenzo for discussions.

Funding

C.V. acknowledges funding from the Plan France 2030 through the Project NISQ2LSQ ANR-22-PETQ-0006. A.C. acknowledges funding from the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy - Cluster of Excellence Matter and Light for Quantum Computing (ML4Q) EXC 2004/1 - 390534769 and from the German Federal Ministry of Education and Research in the funding program “quantum technologies - from basic research to market” (contract number 13N15585). B.M.T. acknowledges support by QuTech NWO funding 2020-2024 - Part I “Fundamental Research”, project number 601.QT.001-1, financed by the Dutch Research Council (NWO).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christophe Vuillot.

Ethics declarations

Conflict of interest

The authors declare no conflict of interest or competing interests.

Additional information

Communicated by N. Linden.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A Quantum Rotor Change of Variables

For continuous variable degrees of freedom representing, the 2n quadratures of, say n, oscillators, it is common to perform linear symplectic transformations [6] which preserve the commutation relations and which do not change the domain of the variables, namely \({\mathbb {R}}^{2n}\). For n rotor degrees of freedom one cannot perform the same transformations and obtain a set of independent rotors. Imagine we apply a transformation \({\varvec{A}}\), with \({\hat{\ell }}'_j=\sum _k {\varvec{A}}_{jk} {\hat{\ell }}_k\), defining new operators. This in turn defines an operator \(Z'({\varvec{\phi }})=\prod _j e^{i\phi _j {\hat{\ell }}'_j}=\prod _j e^{i\phi _j \sum _k {\varvec{A}}_{jk} {\hat{\ell }}_k}=\prod _k e^{i\sum _j \phi _j {\varvec{A}}_{jk}{\hat{\ell }}_k}=Z({\varvec{\phi }}')\) with \({\varvec{\phi }}'={\varvec{A}}^T {\varvec{\phi }}\). We require that \({\varvec{\phi }}'\in {\mathbb {T}}^n\), implying that \({\varvec{A}}^T\) is a matrix with integer coefficients. Similarly, we can let \({\hat{\theta }}'_j=\sum _k {\varvec{B}}_{jk} {\hat{\theta }}_k\), defining \(X'({\varvec{m}})=X({\varvec{m'}})\) with \({\varvec{m'}}={\varvec{B}}^T {\varvec{m}}\). We also require that \({\varvec{m'}} \in {\mathbb {Z}}^n\), which implies that \({\varvec{B}}^T\) is a matrix with integer coefficients. In order to preserve the commutation relation in Eq. (16), we require that

$$\begin{aligned} \forall {\varvec{m}},{\varvec{\phi }}\;\; X'({\varvec{m}}) Z'({\varvec{\phi }})=e^{-i {\varvec{m}} {\varvec{\phi }}^T} Z'({\varvec{\phi }}) X'({\varvec{m}})=e^{-i {\varvec{m}}'{\varvec{\phi }}'^T} Z'({\varvec{\phi }}) X'({\varvec{m}}), \end{aligned}$$

which implies that \({\varvec{B}} {\varvec{A}}^T={\mathbb {1}}\), or \({\varvec{A}}=({\varvec{B}}^T)^{-1}\). Thus \({\varvec{A}}\) needs to be a unimodular matrix, with integer entries, having determinant equal to \(\pm 1\). An example is a Pascal matrix

$$\begin{aligned} {\varvec{A}}=\begin{pmatrix} 1 &{} 0 &{} 0 \\ 1 &{} 1 &{} 0 \\ 1&{} 2 &{} 1 \end{pmatrix}, \;\; {\varvec{B}}=\begin{pmatrix} 1 &{} -1 &{} 1 \\ 0 &{} 1 &{} -2 \\ 0 &{} 0 &{} 1 \end{pmatrix}. \\ \end{aligned}$$

In the circuit-QED literature other coordinate transformations are used for convenience which are not represented as unimodular matrices. For example, for two rotors one can define the (agiton/exciton) operators

$$\begin{aligned} {\hat{\theta }}^{\pm }={\hat{\theta }}_1 \pm {\hat{\theta }}_2,\; {\hat{\ell }}^{\pm }=\frac{1}{2}({\hat{\ell }}_1\pm {\hat{\ell }}_2). \end{aligned}$$

In such cases it is important to understand that the new operators, even though the correct commutation rules are obeyed, do not represent an independent set of rotor variables.

Appendix B Quantum Qudit Code Corresponding to a Quantum Rotor Code

First, recall the definition of the cyclic groups \({\mathbb {Z}}_d\) and \({\mathbb {Z}}_d^*\) in Eq. (1) in Sect. 2, where the group operation for \({\mathbb {Z}}_d\) is addition modulo \(d\) and for \({\mathbb {Z}}_d^*\) it is addition modulo \(2\pi \). Given a qudit dimension \(d\in {\mathbb {N}}^{\ge 2}\), the Hilbert space of a qudit, \({\mathcal {H}}_{{\mathbb {Z}}_d}\), is defined by d orthogonal states indexed by \({\mathbb {Z}}_d\),

$$\begin{aligned} \forall j\in {\mathbb {Z}}_d,\quad {|{j}\rangle }\in {\mathcal {H}}_{{\mathbb {Z}}_d}. \end{aligned}$$
(B1)

The qudit quantum states are

$$\begin{aligned} {|{\psi }\rangle } = \sum _{j=1}^d\alpha _j{|{j}\rangle },\quad \sum _{j=1}^d\vert \alpha _j\vert ^2 = 1. \end{aligned}$$
(B2)

The qudit generalized Pauli operators are given by

$$\begin{aligned} \forall k \in {\mathbb {Z}}_d, \quad&X_d(k){|{j}\rangle }= {|{j+k\!\pmod {d}}\rangle }, \end{aligned}$$
(B3)
$$\begin{aligned} \forall \phi \in {\mathbb {Z}}_d^*, \quad&Z_d(\phi ) {|{j}\rangle }= e^{i \phi j}{|{j}\rangle }. \end{aligned}$$
(B4)

By direct computation we have the following properties

$$\begin{aligned}&{\mathbb {1}}= X_d(0) = Z_d(0),\end{aligned}$$
(B5)
$$\begin{aligned}&X_d(k_1)X_d(k_2) = X_d(k_1 + k_2\!\pmod {d}),\end{aligned}$$
(B6)
$$\begin{aligned}&Z_d(\phi _1)Z_d(\phi _2) = Z_d(\phi _1+\phi _2\!\pmod {2\pi }), \end{aligned}$$
(B7)

and the commutation relation

$$\begin{aligned} X_d(k)Z_d(\phi ) = \textrm{e}^{-i\phi k} Z_d(\phi )X_d(k). \end{aligned}$$
(B8)

The multi-qudit Pauli operators are defined by tensor product of single-qudit Pauli operators and labeled by tuples of \({\mathbb {Z}}_d\) and \({\mathbb {Z}}_d^*\) similarly to the rotor case. If we have integer matrices \(H_X\) and \(H_Z\) as in Definition 1 we can define a qudit stabilizer code as follows.

Definition 3

(Quantum Qudit Code, \({\mathcal {C}}^d(H_X,H_Z)\)). Let \(H_X\) and \(H_Z\) be two integer matrices of size \(r_x\times n\) and \(r_z\times n\) respectively, such that

$$\begin{aligned} H_X H_Z^T = 0. \end{aligned}$$
(B9)

We define the following group of operators, \({\mathcal {S}}\), and call it the stabilizer group:

$$\begin{aligned} {\mathcal {S}}_d = \langle Z_d({\varvec{\varphi }}H_Z) X_d({\varvec{s}}H_X) \;\vert \;\forall {\varvec{\varphi }}\in {{\mathbb {Z}}_d^*}^{r_z},\,\forall {\varvec{s}}\in {\mathbb {Z}}_d^{r_x}\rangle . \end{aligned}$$
(B10)

We then define the corresponding quantum qudit code, \({\mathcal {C}}^{d}(H_X,H_Z)\), on n quantum rotors as the code space stabilized by \({\mathcal {S}}\):

$$\begin{aligned} {\mathcal {C}}^{d}(H_X,H_Z) = \big \{{|{\psi }\rangle }\;\big \vert \; \forall P\in {\mathcal {S}}_d,\,P{|{\psi }\rangle } = {|{\psi }\rangle }\big \}, \end{aligned}$$
(B11)

In other words: to go from the quantum rotor code to the qudit code we restrict the phases to \(d^{\textrm{th}}\) roots of unity and pick the \(X\) operators modulo \(d\). A general definition of (beyond the ‘CSS’ codes described here) can be found at the error correction zoo.

We can relate logical operators from a quantum rotor code and the corresponding qudit code. Pick a non-trivial logical X operator for \({\mathcal {C}}^{\textrm{rot}}(H_X,H_Z)\), that is to say, let

$$\begin{aligned} {\overline{X}}({\varvec{m}}) = X({\varvec{m}}L_X + {\varvec{s}}H_X). \end{aligned}$$
(B12)

The following then holds:

$$\begin{aligned} 0&=\left( {\varvec{m}}L_X+{\varvec{s}}H_X\right) H_Z^T \end{aligned}$$
(B13)
$$\begin{aligned} \not \exists {\varvec{s}}^\prime ,\quad {\varvec{s}}^\prime H_X&= {\varvec{m}}L_X+{\varvec{s}}H_X. \end{aligned}$$
(B14)

Eq. (B13) still holds if taken modulo \(d\) so \(X_d({\varvec{m}}L_X+{\varvec{s}}H_X)\) is a valid logical \(X\) operator for \({\mathcal {C}}^d(H_X,H_Z)\). On the other hand, Eq. (B14) might not hold when considering things modulo \(d\). This is the case for instance in the projective plane where taking \(d=3\) makes the logical operator become trivial since \(-2=1\!\pmod 3\). Note that these cases only occur for logical operators in the torsion part of the homology.

For the \(Z\) logical operators we can get a logical operator from the rotor code to the qudit code if and only if the logical operator is generated with \({\mathbb {Z}}_d^*\) phases.

$$\begin{aligned} {\varvec{\phi }},{\varvec{\nu }}\in {{\mathbb {Z}}_d^*}^k,\quad {\overline{Z}}({\varvec{\phi }}) = Z({\varvec{\phi }}L_Z + {\varvec{\nu }}H_Z). \end{aligned}$$
(B15)

In this case we have that

$$\begin{aligned} 0&=\left( {\varvec{\phi }}L_Z+{\varvec{\nu }}H_Z\right) H_X^T, \end{aligned}$$
(B16)
$$\begin{aligned} \not \exists {\varvec{\nu }}^\prime \in {\mathbb {T}}^{r_Z},\quad {\varvec{\nu }}^\prime H_Z&= {\varvec{\phi }}L_Z+{\varvec{\nu }}H_Z, \end{aligned}$$
(B17)

and Eqs. (B16) and (B17) will remain valid when restricting phases to \({\mathbb {Z}}_d^*\) (note that addition is modulo \(2\pi \) in Eqs. (B16) and (B17)). That is to say, some \(Z\) logical operators present in the quantum rotor code can be absent in the qudit code if these logical operators come from the torsion part, from some \({\mathbb {Z}}_p\) and \(d\) does not divide \(p\).

Appendix C Bounding the \(Z\) Distance from Below

This appendix proves Eq. (76) in the proof of Lemma 1. Given \({\varvec{m}}\in \Delta _X\), with \(n=|{\varvec{m}}|\), we want to lower bound the following quantity from Eq. (75):

$$\begin{aligned} \min _{\begin{array}{c} {\varvec{\phi }}\in {\mathbb {T}}^n,\, k\in {\mathbb {Z}}\\ {\varvec{m}}\cdot {\varvec{\phi }}=\alpha +2k\pi \end{array}} W_Z({\varvec{\phi }}) = \min _{\begin{array}{c} {\varvec{\phi }}\in {\mathbb {T}}^n,\, k\in {\mathbb {Z}}\\ {\varvec{m}}\cdot {\varvec{\phi }}=\alpha +2k\pi \end{array}} \sum _{j=1}^n\sin ^2\left( \frac{\phi _j}{2}\right) . \end{aligned}$$
(C18)

We define the Lagrangian function

$$\begin{aligned} {\mathcal {L}}({\varvec{\phi }},\lambda ) = \sum _{j=1}^n\sin ^2\left( \frac{\phi _j}{2}\right) - \lambda \left( {\varvec{m}}\cdot {\varvec{\phi }}-\alpha -2k\pi \right) . \end{aligned}$$
(C19)

We can compute the partial derivatives of \({\mathcal {L}}\)

$$\begin{aligned} \forall j,\;\frac{\partial {\mathcal {L}}}{\partial \phi _j}&= \frac{1}{2}\sin (\phi _j) - m_j\lambda ,\end{aligned}$$
(C20)
$$\begin{aligned} \frac{\partial {\mathcal {L}}}{\partial \lambda }&= \alpha +2k\pi - {\varvec{m}}\cdot {\varvec{\phi }}. \end{aligned}$$
(C21)

According to the Lagrange multiplier theorem [75] there exists a unique \(\lambda ^*\) for an optimal solution \({\varvec{\phi }}^*\) such that

$$\begin{aligned} \left\{ \begin{matrix} \forall j,\; \sin (\phi _j^*)=2m_j\lambda ^*,\\ {\varvec{m}}\cdot {{\varvec{\phi }}^*} =\alpha +2k\pi . \end{matrix}\right. \end{aligned}$$
(C22)

For the optimal solution we have, for each \(j\), two options for \(\phi _j^*\):

$$\begin{aligned} \phi _j^* = \left\{ \begin{matrix} \arcsin \left( 2m_j\lambda ^*\right) ,\\ \pi - \arcsin \left( 2m_j\lambda ^*\right) . \end{matrix}\right. \end{aligned}$$
(C23)

We set a binary vector \({\varvec{x}}\) with \(x_j=0\) if it is the first case and \(x_j=1\) if it is the second. We deduce that

$$\begin{aligned} \alpha +2k\pi&= \sum _{j=1}^n m_j\phi _j^*\end{aligned}$$
(C24)
$$\begin{aligned}&= \sum _{j=1}^n (-1)^{x_j}m_j\arcsin \left( 2m_j\lambda ^*\right) +w\pi \quad (w = W_H({\varvec{x}})). \end{aligned}$$
(C25)

with Hamming weight \(W_H()\). From now on we restrict ourselves to the case where \(m_j=\pm 1\).

$$\begin{aligned} \Rightarrow \;\frac{\alpha +(2k - w)\pi }{n-2w}&= \arcsin \left( 2\lambda ^*\right) . \end{aligned}$$
(C26)

Let’s compute the objective function

$$\begin{aligned} W_Z({\varvec{\phi }}^*)&=\sum _{j=1}^n\sin ^2\left( \frac{\phi _j^*}{2}\right) \end{aligned}$$
(C27)
$$\begin{aligned}&= (n-w)\sin ^2\left( \frac{\alpha +(2k - w)\pi }{2(n-2w)}\right) +w\cos ^2\left( \frac{\alpha +(2k - w)\pi }{2(n-2w)}\right) \end{aligned}$$
(C28)
$$\begin{aligned}&=\frac{(n-w)}{2}\left( 1-\cos \left( \frac{\alpha +(2k - w)\pi }{n-2w}\right) \right) +\frac{w}{2}\left( 1+\cos \left( \frac{\alpha +(2k - w)\pi }{n-2w}\right) \right) \end{aligned}$$
(C29)
$$\begin{aligned}&= \frac{n}{2} + \frac{2w-n}{2}\cos \left( \frac{\alpha +(2k - w)\pi }{n-2w}\right) . \end{aligned}$$
(C30)

We can assume that

$$\begin{aligned} w < \frac{n}{2}, \end{aligned}$$
(C31)

as the other case behaves symmetrically and the case \(w=n/2\) always yields \(W_Z({\varvec{\phi }}^*) = n/2\) (see Eq. (C28)). Minimizing over \(w\) and \(k\) will give the lower bound. From Eq. (C30) we always have

$$\begin{aligned} W_Z({\varvec{\phi }}^*) \ge w. \end{aligned}$$
(C32)

We consider the asymptotic regime when \(n\rightarrow \infty \). If \(w\) grows with \(n\) then \(W_Z({\varvec{\phi }}^*)\) has to grow as well. Therefore choosing \(w\) constant can (and indeed will) yield a smaller value for \(W_Z({\varvec{\phi }}^*)\). Hence we fix \(w\) to a constant from now on. We can always put each \(\phi _j^*\) in the range \([-\pi ,\pi )\) so that \(k\) is in the range \([-n/2,n/2]\). To minimize \(W_Z({\varvec{\phi }}^*)\) one needs to make

$$\begin{aligned} \frac{\alpha + (2k-w)\pi }{n-2w} \sim 0, \end{aligned}$$
(C33)

for which the best choice of \(k\in [-n/2,n/2]\) is \(k=0\). In fact \(w=0\) is also the best choice, since

$$\begin{aligned} W_Z({\varvec{\phi }}^*)&= \frac{n}{2} + \frac{2w-n}{2}\cos \left( \frac{\alpha +(2k - w)\pi }{n-2w}\right) \end{aligned}$$
(C34)
$$\begin{aligned}&= \frac{n}{2} + \frac{2w-n}{2}\cos \left( \frac{\alpha - w\pi }{n-2w}\right) \end{aligned}$$
(C35)
$$\begin{aligned}&=w + \frac{1}{4n}\left( \alpha -\pi w\right) ^2+o\left( \frac{w^2}{n}\right) . \end{aligned}$$
(C36)

Therefore, with \(w=0\), we have

$$\begin{aligned} W_Z({\varvec{\phi }}^*)&= \frac{n}{2}\left( 1-\cos \left( \frac{\alpha }{n}\right) \right) =\frac{\alpha ^2}{4n}+o\left( \frac{1}{n}\right) . \end{aligned}$$
(C37)

Appendix D Orientability and Single Logical Qubit at the \((D-1)\) Level

We consider the case of a rotor code \({\mathcal {C}}^\textrm{rot}(H_X,H_Z)\) where the entries in \(H_X\) and \(H_Z\) are taken from \(\{-1, 0, 1\}\) and \(H_X\) has the additional property that each column contains exactly 2 non-zero entry. This corresponds to the boundary map from \(D\) to \(D-1\) in the tessellation of a closed \(D\)-dimensional manifold (in \(2D\) edges are adjacent to exactly 2 faces, in \(3D\) faces are adjacent to exactly 2 volumes etc....). We also assume that the bipartite graph obtained by viewing \(H_X\) as an adjacency matrix (ignoring the signs) is connected. This corresponds to the \(D\)-dimensional manifold being connected.

We want to consider the possibility that there is some \({\mathbb {Z}}_p\) torsion, for an integer \(p\ge 2\), at the \((D-1)\)-level in the corresponding chain complex. For this it needs to be the case (see Eq. (42)) that there exist \({\varvec{s}}\in {\mathbb {Z}}^{r_X}\) such that

$$\begin{aligned} {\varvec{s}}H_X = p{\varvec{v}}, \end{aligned}$$
(D38)

and such that

$$\begin{aligned} {\varvec{v}}\not \in \textrm{im}(H_X). \end{aligned}$$
(D39)

For any entry of \(p{\varvec{v}}\), say \(j\), we have that

$$\begin{aligned} pv_j = \pm s_k \pm s_l, \end{aligned}$$
(D40)

for some \(k\) and \(l\). Since the manifold is connected this implies that all entries of \({\varvec{s}}\) have the same residue modulo \(p\), say \(r\in \{1,\ldots ,p-1\}\) (\(r\) cannot be zero without contradicting Eq. (D39)). In turns this means that

$$\begin{aligned} p{\varvec{v}} = 2r{\varvec{u}} + p{\varvec{w}}, \end{aligned}$$
(D41)

where \({\varvec{u}}\) is a vector with entries in \(\{-1,0,1\}\) and \({\varvec{w}}\) some integer vector. We conclude from this that \(p\) is necessarily even, so \(p=2q\). Hence we have

$$\begin{aligned} q\left( {\varvec{v}}-{\varvec{w}}\right) = r{\varvec{u}}. \end{aligned}$$
(D42)

This implies in turn that \(q\) divides \(r\), say \(r=tq\). Although we have \(tq=r<p=2q\) hence

$$\begin{aligned} r=q. \end{aligned}$$
(D43)

Which yields

$$\begin{aligned} q{\varvec{u}}H_X = 2q{\varvec{v}}^\prime , \end{aligned}$$
(D44)

where \({\varvec{v}}^\prime \) differs from \({\varvec{v}}\) by the boundary of the quotient of \({\varvec{s}}\) by \(p\). We see that \({\varvec{v}}\) has in fact order 2 as the \(q\) simplifies and so we can fix \(q=1\) and \(p=2\). This leaves the only the possibility of \(r=1\) and so \({\varvec{s}}\) has only odd entries.

Finally any \({\mathbb {Z}}_2\) torsion generator \({\varvec{v}}_1\) and \({\varvec{v}}_2\) are related by a boundary since the corresponding \({\varvec{s}}_1\) and \({\varvec{s}}_2\) (having each only odd entries) sum to a vector with even entries so

$$\begin{aligned} \frac{{\varvec{s}}_1 + {\varvec{s}}_2}{2}H_X = {\varvec{v}}_1 + {\varvec{v}}_2. \end{aligned}$$
(D45)

This concludes the proof that any finite tessellation of a connected closed \(D\)-dimensional manifold has either \({\mathbb {Z}}_2\) or no torsion in the homology group \(H_{D-1}({\mathcal {M}},{\mathbb {Z}})\) at the \((D-1)\)-level. In particular rotor codes obtained from a \(2D\) manifold will have at most one logical qubit and some number of logical rotors.

We remark that in this picture the manifold is orientable if there is a choice of signs for the \(D\) cells \({\varvec{s}}\in \{-1,1\}\) such that

$$\begin{aligned} {\varvec{s}}H_X = {\varvec{0}}, \end{aligned}$$
(D46)

in which case there is no torsion since \({\varvec{v}}\) is necessarily trivial.

Appendix E Products of chain complexes

In this Appendix we detail the construction of quantum rotor codes from the product of chain complexes given in Sect. 4.2. We explore three settings, the first to encode logical rotors, the next two to encode qudits.

We use this construction on two integer matrices seen as chain complexes of length 2. Take two arbitrary integer matrices \(\partial ^{\mathcal {C}}\in {\mathbb {Z}}^{m_C\times n_C}\) and \(\partial ^{\mathcal {D}}\in {\mathbb {Z}}^{n_D\times m_D}\). They can be viewed as boundary maps of chain complexes

$$\begin{aligned} \begin{matrix} {\mathcal {C}}:\;&{} {\mathbb {Z}}^{m_C}&{}\xrightarrow {\partial ^{\mathcal {C}}}&{}{\mathbb {Z}}^{n_C} &{} &{} \\ &{}H_1({\mathcal {C}}) = \ker (\partial ^{\mathcal {C}})&{}&{}H_0({\mathcal {C}}) = {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})\\ {\mathcal {D}}:\;&{} {\mathbb {Z}}^{n_D}&{}\xrightarrow {\partial ^{\mathcal {D}}}&{}{\mathbb {Z}}^{m_D}\\ &{}H_1({\mathcal {D}}) = \ker (\partial ^{\mathcal {D}})&{}&{}H_0({\mathcal {D}}) = {\mathbb {Z}}^{m_D}/\textrm{im}(\partial ^{\mathcal {D}}), \end{matrix} \end{aligned}$$
(E47)

where the homology groups are given in the second row. Taking the product \({\mathcal {C}}\otimes {\mathcal {D}}\) will give a chain complex of length 3 characterized by two matrices \(H_X\) and \(H_Z\)

$$\begin{aligned} {\mathcal {C}}\otimes {\mathcal {D}}:\quad {\mathbb {Z}}^{m_Cn_D}\quad \xrightarrow {H_X}\quad {\mathbb {Z}}^{n_Cn_D + m_Cm_D}\quad \xrightarrow {H_Z^T}\quad {\mathbb {Z}}^{n_Cm_D}. \end{aligned}$$
(E48)

The matrices \(H_X\) and \(H_Z\) can be written in block form as

$$\begin{aligned} H_X&= \begin{pmatrix} \partial ^{\mathcal {C}}\otimes {\mathbb {1}}_{n_D}&-{\mathbb {1}}_{m_C} \otimes \partial ^{\mathcal {D}} \end{pmatrix},\end{aligned}$$
(E49)
$$\begin{aligned} H_Z&= \begin{pmatrix} {\mathbb {1}}_{n_C}\otimes {\partial ^{\mathcal {D}}}^T&{\partial ^{\mathcal {C}}}^T \otimes {\mathbb {1}}_{m_D} \end{pmatrix}. \end{aligned}$$
(E50)

The homology in the middle level, corresponding to the rotor code logical group, can be characterized according to the Künneth formula in Eq. (101) as

$$\begin{aligned} H_1({\mathcal {C}}\otimes {\mathcal {D}}) \simeq&\left( \ker (\partial ^{\mathcal {C}})\otimes {\mathbb {Z}}^{m_D}/\textrm{im}({\partial ^{\mathcal {D}}})\right) \nonumber \\&\oplus \left( {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})\otimes \ker ({\partial ^{\mathcal {D}}})\right) \nonumber \\&\oplus \textrm{Tor}\left( {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}}), {\mathbb {Z}}^{m_D}/\textrm{im}({\partial ^{\mathcal {D}}})\right) . \end{aligned}$$
(E51)

1.1 E.1 Free+Free product: logical rotors

By picking, for \(\partial ^{\mathcal {C}}\) and \({\partial ^{\mathcal {D}}}\), matrices which are full-rank, rectangular, with no torsion and with

$$\begin{aligned} k_{C}&= n_{C} - m_C>0,\end{aligned}$$
(E52)
$$\begin{aligned} k_{D}&= n_{D} - m_D>0, \end{aligned}$$
(E53)

we can ensure that

$$\begin{aligned} {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})={\mathbb {Z}}^{k_C},\qquad \ker ({\partial ^{\mathcal {D}}}) = {\mathbb {Z}}^{k_D}, \end{aligned}$$
(E54)

and, that all other terms in Eq. (E51) vanish, such that we get, using Eq. (100)

$$\begin{aligned} H_1({\mathcal {C}}\otimes {\mathcal {D}}) = {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})\otimes \ker ({\partial ^{\mathcal {D}}}) = {\mathbb {Z}}^{k_Ck_D}, \end{aligned}$$
(E55)

that is to say, a rotor code encoding logical rotors. This configuration is the common one when using the hypergraph product to construct qubit codes. To obtain the \(X\) logical operators we can use the following matrix, \(L_X\), acting only on the first block of rotors:

$$\begin{aligned} L_X = \begin{pmatrix} E_C \otimes G_D&0 \end{pmatrix}, \end{aligned}$$
(E56)

where \(G_D\) and \(E_C\) are the generating matrices for \(\ker (\partial ^{\mathcal {D}})\) and \({\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})\) respectively. It is straightforward to check that \(H_ZL_X^T = 0\) by definition of \(G_D\) and that \(H_X\) cannot generate the rows of \(L_X\) by definition of \(E_C\). To obtain the \(Z\) logical operators we can use the following matrix, \(L_Z\), also acting only on the first block of rotors:

$$\begin{aligned} L_Z = \begin{pmatrix} G_C \otimes E_D&0 \end{pmatrix}, \end{aligned}$$
(E57)

where \(G_C\) and \(E_D\) are the generating matrices for \(\ker \left( {\partial ^{\mathcal {C}}}^T\right) \) and \({\mathbb {Z}}^{n_D}/\textrm{im}\left( {\partial ^{\mathcal {D}}}^T\right) \) respectively. It is straightforward to check that \(H_XL_Z^T = 0\) by definition of \(G_C\) and that \(H_Z\) cannot generate the rows of \(L_Z\) by definition of \(E_D\).

If \(\partial ^{{\mathcal {D}}}\) is a full-rank parity check matrix of a classical binary code with minimum distance \(d^{{\mathcal {D}}}\), we get the following lower bound on the \(X\) distance

$$\begin{aligned} d_X^{{\mathcal {C}}\otimes {\mathcal {D}}}\ge d^{\mathcal {D}}, \end{aligned}$$
(E58)

using Theorem 2 and the known lower bound of the \(X\) distance of the qubit code corresponding to the hypergraph product obtained by replacing all the rotors by qubits [36]. So we have for parameters

$$\begin{aligned} \llbracket n_Cn_D+m_Cm_D, (k_Ck_D,0), (\Omega (d^{\mathcal {D}}),O(d^{\mathcal {C}}))\rrbracket _{\textrm{rot}}. \end{aligned}$$
(E59)

The weight of the logical \(Z\) operators in Eq. (E57) is \(O(d^{\mathcal {C}})\) but they could be spread around using \(Z\) stabilizers. To bound the \(Z\) distance using Lemma 1 one can try to get a large set of disjoint logical \(X\) operators by considering sets of the type

$$\begin{aligned} \Delta _X({\varvec{e}}_i^{\mathcal {C}}\otimes {\varvec{g}}_j^{\mathcal {D}}) = \left\{ \begin{pmatrix} \left( {\varvec{e}}_i\oplus \partial ^{\mathcal {C}}(s)\right) \otimes {\varvec{g}_j^\mathcal {D}}&0 \end{pmatrix}\;\vert \;s\in S\subset {\mathbb {Z}}^{m_C}\right\} , \end{aligned}$$
(E60)

where \({\varvec{e}}_i^{\mathcal {C}}\) is the \(i\)th row of \(E_C\) and \({\varvec{g}}_j^{\mathcal {D}}\) the \(j\)th row of \(G_D\) and the set \(S\) is the largest subset of \({\mathbb {Z}}^{m_C}\) which generates elements \({\varvec{e}}_i\oplus \partial ^{\mathcal {C}}(s)\) that are pairwise disjoints. The best to hope for is a set \(S\) of size linear in \(n_C\) for which we would have per Lemma 1

$$\begin{aligned} \delta _Z = \Omega \left( \frac{n_C}{d^{\mathcal {D}}}\right) . \end{aligned}$$
(E61)

This is guaranteed for instance if \(\partial ^{\mathcal {C}}\) is the parity check matrix of the repetition code. Very similar to the Möbius and cylinder rotor codes in Sects. 4.1.2 and 4.1.3, one needs to ‘skew the shape’ in order to have a growing distance \(\delta _Z\). So choosing for \(\partial ^{\mathcal {C}}\) the standard parity check matrix of the repetition code with size \(n_C = \Theta (n_D^2)\) and a good classical LDPC code for \(\partial ^{\mathcal {D}}\), with \(d^{\mathcal {D}}=\Theta (n_D)\) and \(k_D=\Theta (n_D)\), one would have as parameters of the \({\mathcal {C}}\otimes {\mathcal {D}}\) code

$$\begin{aligned} \llbracket n, \left( \Theta (\root 3 \of {n}),0\right) ,\left( \Theta (\root 3 \of {n}),\Theta (\root 3 \of {n})\right) \rrbracket _\textrm{rot}. \end{aligned}$$
(E62)

To provide a concrete example, we can pick the \([7,4,3]\) Hamming code with parity check matrix, \(H\), generator matrix, \(G\), and generator matrix for the complementary space of the row space of the parity-check matrix, \(E\), given by

$$\begin{aligned} H = \begin{pmatrix} 1 &{} 1 &{} 1 &{} 0 &{} 0 &{} 1 &{} 0\\ 0 &{} 1 &{} 1 &{} 1 &{} 0 &{} 0 &{} 1\\ 1 &{} 0 &{} 1 &{} 1 &{} 1 &{} 0 &{} 0 \end{pmatrix},\qquad G = \begin{pmatrix} 1&{} 0&{} 0&{} 0&{} -1&{} -1&{} 0\\ 0&{} 1&{} 0&{} 0&{} 0&{} -1&{} -1\\ 0&{} 0&{} 1&{} 0&{} -1&{} -1&{} -1\\ 0&{} 0&{} 0&{} 1&{} -1&{} 0&{} -1 \end{pmatrix},\qquad E = \begin{pmatrix} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 \end{pmatrix}.\nonumber \\ \end{aligned}$$
(E63)

We can set

$$\begin{aligned} \partial ^{\mathcal {C}} = H,\qquad \partial ^{\mathcal {D}} = H^T, \end{aligned}$$
(E64)

and so for the stabilizers

$$\begin{aligned} H_X&= \begin{pmatrix} H\otimes {\mathbb {1}}_{7}&-{\mathbb {1}}_{3} \otimes H^T \end{pmatrix}\end{aligned}$$
(E65)
$$\begin{aligned} H_Z&= \begin{pmatrix} {\mathbb {1}}_{7}\otimes H&H^T \otimes {\mathbb {1}}_{3} \end{pmatrix}. \end{aligned}$$
(E66)

This rotor code has \(58\) physical rotors and \(16\) logical rotors. The minimal \(X\) distance is \(d_X=3\) and the minimal \(Z\) distance, \(\delta _Z\), is such that

$$\begin{aligned} 3\ge \delta _Z(\alpha )\ge \frac{3\sin ^2\left( \frac{\alpha }{6}\right) +9\sin ^2\left( \frac{\alpha }{18}\right) }{\sin ^2(\frac{\alpha }{2})}\xrightarrow [\alpha \rightarrow 0]{}\frac{4}{9}. \end{aligned}$$
(E67)

This last inequalties are obtained by picking for the upper bound a logical \(Z\) representative

$$\begin{aligned} {\overline{Z}} = Z\left( \alpha \begin{pmatrix} {\varvec{e}}_1\otimes {\varvec{g}}_1&0 \end{pmatrix}\right) , \end{aligned}$$
(E68)

and, for the lower bound, picking \(\Delta _X({\varvec{e}}_1\otimes {\varvec{g}}_1)\) as in Eq. (E60),

$$\begin{aligned} \Delta _X({\varvec{e}}_1\otimes {\varvec{g}}_1) = \left\{ \begin{pmatrix} {\varvec{e}}_1\otimes {\varvec{g}}_1&0 \end{pmatrix}, \begin{pmatrix} ({\varvec{e}}_1+{\varvec{h}}_1)\otimes {\varvec{g}}_1&0 \end{pmatrix}\right\} . \end{aligned}$$
(E69)

To summarize the parameters we have

$$\begin{aligned} \llbracket 58, (16,0), (3,\delta _Z)\rrbracket _\textrm{rot},\qquad 3\ge \delta _Z\ge \frac{4}{9}. \end{aligned}$$
(E70)

1.2 E.2 Torsion+free product: logical qudits

In order to get some logical qudits in the product we can do the following: Pick for \(\partial ^{\mathcal {C}}\) a square matrix (\(n_C=m_C\)), with full-rank still, but also some torsion, that is to say

$$\begin{aligned} {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})={\mathbb {Z}}_{d_1}\oplus \cdots \oplus {\mathbb {Z}}_{d_{k_C}},\qquad \ker ({\partial ^{\mathcal {D}}}) = {\mathbb {Z}}^{k_D}. \end{aligned}$$
(E71)

The other terms in Eq. (E51) vanish and we get, using Eq. (100)

$$\begin{aligned} H_1({\mathcal {C}}\otimes {\mathcal {D}}) = {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})\otimes \ker ({\partial ^{\mathcal {D}}}) = \left( {\mathbb {Z}}_{d_1}\oplus \cdots \oplus {\mathbb {Z}}_{d_{k_C}}\right) ^{k_D}. \end{aligned}$$
(E72)

In this case the rotor code encodes logical qudits. The generating matrix for the logical \(X\) operators is given by the same expressions as Eq. (E56). For the \(Z\) logical operators, the expression is similar to Eq. (E57)

$$\begin{aligned} L_Z = \begin{pmatrix} G_C^\prime \otimes E_D&0 \end{pmatrix}, \end{aligned}$$
(E73)

but the generating matrix \(G_C^\prime \) has a slightly different interpretation. It is actually related to the weak boundaries defined in Eq. (42). The \(i\)th row of \(G_C^\prime \), \({\varvec{g}}_i\), is such that

$$\begin{aligned} \partial ^{\mathcal {C}}{\varvec{g}}_i^T = d_i{\varvec{e}}^T, \end{aligned}$$
(E74)

for some integer vector \({\varvec{e}}\not \in \textrm{im}(\partial ^{\mathcal {C}})\) and \(d_i\) comes from Eq. (E71). This allows for

$$\begin{aligned} H_X\begin{pmatrix} \frac{2\pi }{d_i}{\varvec{g}}_i\otimes {\varvec{e}}^D_j&0 \end{pmatrix}^T&=\begin{pmatrix} \partial ^{\mathcal {C}}\otimes {\mathbb {1}}_{n_D}&-{\mathbb {1}}_{m_C} \otimes \partial ^{\mathcal {D}} \end{pmatrix}\begin{pmatrix} \frac{2\pi }{d_i}{\varvec{g}}_i\otimes {\varvec{e}}^D_j&0 \end{pmatrix}^T \end{aligned}$$
(E75)
$$\begin{aligned}&= 2\pi \begin{pmatrix} {\varvec{e}}\otimes {\varvec{e}}^D_j&0 \end{pmatrix}^T, \end{aligned}$$
(E76)

where \({\varvec{e}}_j^D\) is the \(j\)th row of \(E_D\), i.e some element not generated by \(\partial ^{\mathcal {D}}\).

One simple choice for \(\partial ^{\mathcal {C}}\) is derived from the repetition code with a sign twist:

$$\begin{aligned} \partial ^{\mathcal {C}} = \begin{pmatrix} 1 &{} -1 &{} 0 &{} \ddots &{} 0 &{} 0\\ 0 &{} 1 &{} -1 &{} \ddots &{} 0 &{} 0\\ 0 &{} 0 &{} 1 &{} \ddots &{} 0 &{} 0\\ \ddots &{} \ddots &{} \ddots &{} \ddots &{} \ddots &{} \ddots \\ 0 &{} 0 &{} 0 &{} \ddots &{} 1 &{} -1\\ 1 &{} 0 &{} 0 &{} \ddots &{} 0 &{} 1 \end{pmatrix}. \end{aligned}$$
(E77)

This matrix is full rank and exhibits \({\mathbb {Z}}_2\) torsion with \({\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}}) = {\mathbb {Z}}_2\). This implies that the logical code space of the product code contains \(k_D\) qubits. This also guarantees we can find a set of disjoint logical \(X\) representatives of size linear in \(n_C\) as in the previous section, see Eq. (E60). All in all with this choice, a good classical LDPC code for \(\partial ^{\mathcal {D}}\) with \(d^{\mathcal {D}}=\Theta (n_D)\) and \(k_D=\Theta (n_D)\), and choosing once again a ‘skewed shape’ with \(n_C = \Theta (n_D^2)\), we can get a family of rotor codes with parameters

$$\begin{aligned} \llbracket n, \left( 0,2^{\Theta (\root 3 \of {n})}\right) ,\left( \Theta (\root 3 \of {n}),\Theta (\root 3 \of {n})\right) \rrbracket _\textrm{rot}. \end{aligned}$$
(E78)

An other way to obtain a square matrix, \(\partial ^{\mathcal {C}}\), with more torsion of even order say, is to take the rectangular, full-rank parity check matrix of a binary code, say \(H\in \{0,1\}^{m\times n}\) and define

$$\begin{aligned} \partial ^{\mathcal {C}} = H^TH \pmod 2. \end{aligned}$$
(E79)

In some cases such matrix will be full rank over \({\mathbb {R}}\) but not over \({\mathbb {F}}_2\). In particular for a codeword of the binary code \({\varvec{g}}\in \ker (H^T)\) we would have

$$\begin{aligned} \partial ^{\mathcal {C}}{\varvec{g}}^T = H^TH{\varvec{g}}^T = 2{\varvec{e}}^T, \end{aligned}$$
(E80)

for some integer vector \({\varvec{e}}\not \in \textrm{im}(\partial ^{\mathcal {C}})\) which then represents some even order torsion. This choice can yield better encoding rates but we do not have a general way of bounding the \(\delta _Z\) distance in this case.

For instance, for the \([7,4,3]\) Hamming code given in Eq. (E63), we have

$$\begin{aligned} \partial ^{\mathcal {C}} = H^TH\pmod {2} = \begin{pmatrix} 0&{} 1&{} 0&{} 1&{} 1&{} 1&{} 0\\ 1&{} 0&{} 0&{} 1&{} 0&{} 1&{} 1\\ 0&{} 0&{} 1&{} 0&{} 1&{} 1&{} 1\\ 1&{} 1&{} 0&{} 0&{} 1&{} 0&{} 1\\ 1&{} 0&{} 1&{} 1&{} 1&{} 0&{} 0\\ 1&{} 1&{} 1&{} 0&{} 0&{} 1&{} 0\\ 0&{} 1&{} 1&{} 1&{} 0&{} 0&{} 1 \end{pmatrix}, \end{aligned}$$
(E81)

which is full rank, so \(\ker (\partial ^{\mathcal {C}})= \{{\varvec{0}}\}\). We have \({\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}}) = {\mathbb {Z}}_2\oplus {\mathbb {Z}}_2\oplus {\mathbb {Z}}_2\oplus {\mathbb {Z}}_4\), and

$$\begin{aligned} \qquad G_C^\prime = \begin{pmatrix}-1&{} 0&{} 0&{} 1&{} 0&{} 1&{} -1 \\ -1&{} 0&{} 0&{} 0&{} 1&{} 1&{} 0\\ -1&{} 1&{} 0&{} 0&{} 1&{} 0&{} -1\\ -1&{} 1&{} -1&{} 1&{} 1&{} 1&{} -1\end{pmatrix},\qquad E^\prime _C = \begin{pmatrix} 1&{} 0&{} 0&{} -1&{} 0&{} 0&{} 0\\ 1&{} 0&{} 1&{} 0&{} 0&{} 0&{} 0\\ 1&{} -1&{} 0&{} 0&{} 0&{} 0&{} 0\\ 1&{} 0&{} 0&{} 0&{} 0&{} 0&{} 0 \end{pmatrix}, \end{aligned}$$
(E82)

where \(E^\prime _C\) gives generators for \({\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})\), the last row of \(E^\prime _C\) is the generator of order \(4\) and \(G_C^\prime \) is related to \(E_C^\prime \) according to Eq. (E74).

So choosing \(\partial ^{\mathcal {C}} = H^TH\pmod 2\) and \(\partial ^{\mathcal {D}} = H^T\) yields a code with parameters

$$\begin{aligned} \llbracket 70, (0, 2^{12}\cdot 4^4), (3,\delta _Z)\rrbracket _{\textrm{rot}},\qquad 3\ge \delta _Z\ge 18\sin ^2\left( \frac{\pi }{12}\right) . \end{aligned}$$
(E83)

For the lower bound on \(\delta _Z\) we pick \(\Delta _X({\varvec{e}}_1^\prime \otimes {\varvec{g}}_1)\) as in Eq. (E60),

$$\begin{aligned} \Delta _X({\varvec{e}}^\prime _1\otimes {\varvec{g}}_1) = \left\{ \begin{pmatrix} {\varvec{e}}_1^\prime \otimes {\varvec{g}}_1&0 \end{pmatrix}, \begin{pmatrix} ({\varvec{e}}_1^\prime +{\varvec{\partial }}^{\mathcal {C}}_2)\otimes {\varvec{g}}_1&0 \end{pmatrix}, \begin{pmatrix} ({\varvec{e}}_1^\prime +{\varvec{\partial }}^{\mathcal {C}}_5)\otimes {\varvec{g}}_1&0 \end{pmatrix}\right\} . \end{aligned}$$
(E84)

1.3 E.3 Torsion+Torsion Product: Logical Qudits

Finally, one can take for both \(\partial ^{\mathcal {C}}\) and \({\partial ^{\mathcal {D}}}\) such full-rank square matrices with some torsion, and then get a logical space through the \(\textrm{Tor}\) part of Eq. (101). Since the torsion groups have to agree (see Eq. (102)) we can pick, for instance, both \(\partial ^{{\mathcal {C}}}\) and \({\partial ^{\mathcal {D}}}\) in the same way as Eq. (E79), ensuring that they have a common \({\mathbb {Z}}_2\) part. We would have

$$\begin{aligned} {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}})={\mathbb {Z}}_{d_1}\oplus \cdots \oplus {\mathbb {Z}}_{d_{k_C}},\qquad {\mathbb {Z}}^{m_D}/\textrm{im}({\partial ^{\mathcal {D}}})={\mathbb {Z}}_{p_1}\oplus \cdots \oplus {\mathbb {Z}}_{p_{k_D}}, \end{aligned}$$
(E85)

where the \(d_i\) and \(p_j\) are all even integers. All other terms vanish and we get

$$\begin{aligned} H_1({\mathcal {C}}\otimes {\mathcal {D}}) = \textrm{Tor}\left( {\mathbb {Z}}^{n_C}/\textrm{im}(\partial ^{\mathcal {C}}), {\mathbb {Z}}^{m_D}/\textrm{im}({\partial ^{\mathcal {D}}})\right) = \bigoplus _{i,j}{\mathbb {Z}}_{\gcd (d_i,p_j)}. \end{aligned}$$
(E86)

Since the \(d_i\) and \(p_j\) were all chosen to be even, each term of Eq. (E86) is at least \({\mathbb {Z}}_2\) or larger. The \(X\) logical operators are now slightly different than Eq. (E56),

$$\begin{aligned} L_X = \begin{pmatrix} \Lambda _C\left( E^\prime _C\otimes G^\prime _D\right)&-\Lambda _D\left( G^\prime _C\otimes E^\prime _D\right) \end{pmatrix}. \end{aligned}$$
(E87)

The matrices \(\Lambda _C\) and \(\Lambda _D\) are integer diagonal matrices of size \((k_C\times k_D)^2\) defined as

$$\begin{aligned} \Lambda _C = \textrm{Diag}\left( \frac{d_i}{\gcd \left( d_i,p_j\right) }\right) ,\qquad \Lambda _D = \textrm{Diag}\left( \frac{p_j}{\gcd \left( d_i,p_j\right) }\right) . \end{aligned}$$
(E88)

They are such that given the matrices with the torsion orders on the diagonal, \(D_C\) and \(D_D\),

$$\begin{aligned} D_C =\textrm{Diag}\left( d_1,d_2,\ldots ,d_{k_C}\right) ,\qquad D_D =\textrm{Diag}\left( p_1,p_2,\ldots ,p_{k_D}\right) , \end{aligned}$$
(E89)

we have that

$$\begin{aligned} \left( {\mathbb {1}}_{k_C}\otimes D_D\right) \Lambda _C = \left( D_C\otimes {\mathbb {1}}_{k_D}\right) \Lambda _D = \textrm{Diag}\left( \frac{d_ip_j}{\gcd \left( d_i,p_j\right) }\right) . \end{aligned}$$
(E90)

The matrices \(G^\prime _C\) and \(E^\prime _C\), and \(G^\prime _D\) and \(E^\prime _D\), in Eq. (E87), are related to the weak boundaries. More precisely, we have

$$\begin{aligned} {\partial ^{\mathcal {C}}}^T {G^\prime _C}^T&= {E^\prime _C}^T D_C,\end{aligned}$$
(E91)
$$\begin{aligned} {\partial ^{\mathcal {D}}}^T {G^\prime _D}^T&= {E^\prime _D}^T D_D. \end{aligned}$$
(E92)

With this we can check that

$$\begin{aligned} H_Z L_X^T&= \begin{pmatrix} {\mathbb {1}}_{n_C}\otimes {\partial ^{\mathcal {D}}}^T&{\partial ^{\mathcal {C}}}^T \otimes {\mathbb {1}}_{m_D} \end{pmatrix} \begin{pmatrix} \Lambda _C\left( E^\prime _C\otimes G^\prime _D\right)&-\Lambda _D\left( G^\prime _C\otimes E^\prime _D\right) \end{pmatrix}^T\end{aligned}$$
(E93)
$$\begin{aligned}&=\left( {E_C^\prime }^T\otimes {E^\prime _D}^TD_D\right) \Lambda _C - \left( {E_C^\prime }^TD_C \otimes {E^\prime _D}^T\right) \Lambda _D\end{aligned}$$
(E94)
$$\begin{aligned}&= \left( {E_C^\prime }^T\otimes {E^\prime _D}^T\right) \left( {\mathbb {1}}\otimes D_D\right) \Lambda _C -\left( {E_C^\prime }^T\otimes {E^\prime _D}^T\right) \left( D_C\otimes {\mathbb {1}}\right) \Lambda _D\end{aligned}$$
(E95)
$$\begin{aligned}&=0, \end{aligned}$$
(E96)

where the last line is obtained from the previous one using Eq. (E90). One can see that it is crucial to get some common divisor in the torsion of \({\mathcal {C}}\) and \({\mathcal {D}}\). If there is no common divisor for some pair \((d_i,p_j)\) then the corresponding entries in \(\Lambda _C\) and \(\Lambda _j\) would be \(d_i\) and \(p_j\) respectively. It would still follow that the corresponding row in \(L_X\) commutes with the \(Z\) stabilizers but it would also be trivial (because generated by the \(X\) stabilizers) since we have that

$$\begin{aligned} {{\varvec{g}}_C}_i^\prime \otimes {{\varvec{g}}_D}_j^\prime H_X&={{\varvec{g}}_C}_i^\prime \otimes {{\varvec{g}}_D}_j^\prime \begin{pmatrix} \partial ^{\mathcal {C}}\otimes {\mathbb {1}}_{n_D}&-{\mathbb {1}}_{m_C} \otimes \partial ^{\mathcal {D}} \end{pmatrix}\end{aligned}$$
(E97)
$$\begin{aligned}&=\begin{pmatrix} d_i{{\varvec{e}}_C}_i^\prime \otimes {{\varvec{g}}_D}_j^\prime&-p_j{{\varvec{g}}_C}_i^\prime \otimes {{\varvec{e}}_D}_j^\prime \end{pmatrix}. \end{aligned}$$
(E98)

For the \(Z\) logical operators we have

$$\begin{aligned} L_Z = \begin{pmatrix} U\left( G_C^\prime \otimes E_D^\prime \right)&V\left( E_C^\prime \otimes G_D^\prime \right) \end{pmatrix}, \end{aligned}$$
(E99)

where the matrices \(U\) and \(V\) are diagonal matrices of size \((k_C\times k_D)^2\) recording the smallest Bézout coefficients for all pairs \((d_i, p_j)\), i.e so that \(d_iu_{ij} - p_jv_{ij} = \gcd (d_i,p_j)\), we therefore have that

$$\begin{aligned} \left( D_C\otimes {\mathbb {1}}\right) U - \left( {\mathbb {1}}\otimes D_D\right) V = \textrm{Diag}\left( \gcd (d_i,p_j)\right) . \end{aligned}$$
(E100)

We can check that

$$\begin{aligned} H_XL_Z^T&= \begin{pmatrix} \partial ^{\mathcal {C}}\otimes {\mathbb {1}}_{n_D}&-{\mathbb {1}}_{m_C} \otimes \partial ^{\mathcal {D}} \end{pmatrix} \begin{pmatrix} U\left( G_C^\prime \otimes E_D^\prime \right)&V\left( E_C^\prime \otimes G_D^\prime \right) \end{pmatrix}^T\end{aligned}$$
(E101)
$$\begin{aligned}&= \left( {E_C^\prime }^T D_C\otimes {E_D^\prime }^T\right) U - \left( {E_C^\prime }^T\otimes {E_D^\prime }^T D_D\right) V\end{aligned}$$
(E102)
$$\begin{aligned}&=\left( {E_C^\prime }^T\otimes {E_D^\prime }^T \right) \left( \left( D_C\otimes {\mathbb {1}}\right) U - \left( {\mathbb {1}}\otimes D_D\right) V\right) \end{aligned}$$
(E103)
$$\begin{aligned}&=\left( {E_C^\prime }^T\otimes {E_D^\prime }^T \right) \textrm{Diag}\left( \gcd (d_i,p_j)\right) . \end{aligned}$$
(E104)

We see that this would be trivial when multiplied by phases in \({\mathbb {Z}}^*_{\gcd (d_i,p_j)}\).

As for a concrete example, we can again use the Hamming code and the square matrix in Eq. (E81) for both \(\partial ^{\mathcal {C}}\) and \(\partial ^{\mathcal {D}}\). This example as well as other examples of square parity check matrices of classical codes can be found in [76] where they are used in a product for different reasons. The parameters are given by

$$\begin{aligned} \llbracket 98, (0,2^{15}\cdot 4), (3,\delta _Z)\rrbracket _{\textrm{rot}},\qquad 3\ge \delta _Z. \end{aligned}$$
(E105)

Observe that compared to the qubit version,—a qubit code with parameters \(\llbracket 98,32,3\rrbracket \) given in [76], the quantum rotor code has a bit above half as many qubits. This is due to the fact that in the qubit case the two blocks do not have to conspire to form logical \(X\) operators but can do so independently.

Appendix F Schrieffer-Wolff Perturbative Analysis of the Four-Phase Gadget

In this Appendix, we derive an effective low-energy Hamiltonian for the four-phase gadget introduced in Sect. 5.2 and shown in Fig. 7. We will focus on the regime where \(C \gg C_g, C_J\) and when \(E_J\) is smaller than the typical energy of an agiton excitation. Our analysis will closely follow the one of the current-mirror qubit in Ref. [16]. In order to perform the perturbative analysis, we work with exciton and agiton variables, and our starting point is the quantized version of the classical Hamiltonian shown in Eq. (128).

When \(C \gg C_g, C_J\) the charging energy of a single exciton in either the left or the right rung is given by \(E_C^{(e)}\) given in Eq. (133) in the main text, which is much smaller than the energy of a single agiton \(4 E_{C,11}^{(a)} = 4 e^2 \frac{C_g + C_J}{C_g(C_g + 2 C_J)}\). We want to obtain an effective low-energy Hamiltonian for the zero-agiton subspace defined as

$$\begin{aligned} {\mathcal {H}}_{a=0} = \bigl \{{|{\psi }\rangle } \, |\quad {\hat{\ell }}_{L, Ra} {|{\psi }\rangle } = 0 \bigr \}. \end{aligned}$$
(F106)

We will denote the non-zero agiton subspace, perpendicular to \({\mathcal {H}}_{a=0}\) as \({\mathcal {H}}_{a\ne 0}\).

We carry out the perturbative analysis using a Schrieffer-Wolff transformation following Ref. [77]. In our case, the unperturbed Hamiltonian is the charging term

$$\begin{aligned} H_0 = 4 E_{C,11}^{(e)} \bigl ({\hat{\ell }}_{Le}^2 + {\hat{\ell }}_{Re}^2 \bigr ) + 8 E_{C, 12}^{(e)} {\hat{\ell }}_{Le} {\hat{\ell }}_{Re} + 4 E_{C, 11}^{(a)} \bigl ({\hat{\ell }}_{La}^2 + \ell _{Ra}^2 \bigr ) + 8 E_{C, 12}^{(a)} {\hat{\ell }}_{La} {\hat{\ell }}_{Ra}\nonumber \\ \end{aligned}$$
(F107)

while the perturbation is given by the Josephson contribution

$$\begin{aligned} V = -2 E_J \cos \biggr [\frac{1}{2}\bigl ({\hat{\theta }}_{La} - {\hat{\theta }}_{Ra} \bigr ) \biggr ]\cos \biggr [\frac{1}{2}\bigl ({\hat{\theta }}_{Le} - {\hat{\theta }}_{Re} \bigr ) \biggr ]. \end{aligned}$$
(F108)

In order to understand the relevant processes, let us consider a state with \(m_e \in {\mathbb {Z}}\) excitons on the left rung and \(m_e' \in {\mathbb {Z}}\) excitons on the right rung. We denote this state as \({|{m_e, m_e'}\rangle }\) and it is formally defined as a state in the charge basis such that

$$\begin{aligned} {|{m_e, m_e' }\rangle } =&{|{\ell _{Le} = m_e, \ell _{Re} = m_e', \ell _{La} = 0, \ell _{Ra} = 0}\rangle } \nonumber \\ =&{|{\ell _1 = m_e, \ell _2 = m_e', \ell _3 = -m_e, \ell _4 = -m_e'}\rangle }. \end{aligned}$$
(F109)

We also wrote the state in terms of the original charge operators because the action of the Josephson potential is more readily understood in terms of these variables. In fact, the Josephson junction on the upper (lower) part of the circuit in Fig. 7 allows the tunneling of a single Cooper-pair from node 1 (3) to node 2 (4), and vice versa. Thus, a transition \({|{m_e, m_e' }\rangle }\leftrightarrow {|{m_e - 1, m_e' + 1}\rangle }\) within the zero-agiton subspace can be effectively realized via two processes which are mediated by the non-zero agiton states

$$\begin{aligned}&{|{a_+; m_e, m_e' }\rangle } = {|{ \ell _{Le} = m_e - \frac{1}{2}, \ell _{Re} = m_e' + \frac{1}{2}, \ell _{La} = -\frac{1}{2}, \ell _{Ra} = \frac{1}{2}}\rangle } \nonumber \\&\quad = {|{\ell _1 = m_e -1, \ell _2 = m_e' + 1, \ell _3 = -m_e, \ell _4 = -m_e'}\rangle }, \end{aligned}$$
(F110a)
$$\begin{aligned}&{|{a_-; m_e, m_e'}\rangle } = {|{\ell _{Le} = m_e - \frac{1}{2}, \ell _{Re} = m_e' + \frac{1}{2}, \ell _{La} = +\frac{1}{2}, \ell _{Ra} = -\frac{1}{2}}\rangle } \nonumber \\&= {|{\ell _1 = m_e, \ell _2 = m_e', \ell _3 = -m_e + 1, \ell _4 = -m_e' -1}\rangle }. \end{aligned}$$
(F110b)

The two processes are

$$\begin{aligned} {|{m_e, m_e'}\rangle } \rightarrow {|{a_+; m_e, m_e'}\rangle } \rightarrow {|{m_e-1, m_e' + 1}\rangle }, \end{aligned}$$
(F111a)
$$\begin{aligned} {|{m_e, m_e'}\rangle } \rightarrow {|{a_-; m_e, m_e' }\rangle }\rightarrow {|{m_e-1, m_e' + 1}\rangle }, \end{aligned}$$
(F111b)

as well as the opposite processes.

The above-mentioned processes cause hopping of two Cooper-pairs from one rung to the other. However, we also have to take into account the second order processes which bring back a single Cooper-pair to the rung where it was coming from. These processes are also mediated by the non-zero agiton states in Eq. (F110). The effect of these processes is to shift the energy of \({|{m_e, m_e' }\rangle }\), but we will see that in a first approximation each state \({|{m_e, m_e' }\rangle }\) gets approximately the same shift and so we are essentially summing an operator proportional to the identity in the zero-agiton subspace, which is irrelevant.

The charging energy of an exciton state \({|{m_e, m_e' }\rangle }\) is

$$\begin{aligned} E(m_e, m_e' ) = 4 E_{C,11}^{(e)} \bigl (m_e^2 + m_e'^2 \bigr ) + 8 E_{C, 12}^{(e)} m_e m_e', \end{aligned}$$
(F112)

while the intermediate non-zero agiton states \({|{a_{\pm }; m_e, m_e}\rangle }\) both have the same charging energy

$$\begin{aligned}&E(a; m_{e}, m_{e}') = 4 E_{C, 11}^{(e)} \biggl (m_{e} - \frac{1}{2} \biggr )^2 + 4 E_{C,11}^{(e)} \biggl (m_{e}' + \frac{1}{2} \biggr )^2 + 8 E_{C, 12}^{(e)}\biggl (m_{e} - \frac{1}{2} \biggr )\biggl (m_{e}' + \frac{1}{2} \biggr ) \nonumber \\&\quad +2 \bigl ( E_{C,11}^{(a)} - E_{C,12}^{(a)} \bigr ) \approx 2 \bigl ( E_{C,11}^{(a)} - E_{C,12}^{(a)} \bigr ) = \frac{2 e^2}{C_g + 2 C_J} \equiv 2 E_{C, \textrm{diff}}^{(a)} \end{aligned}$$
(F113)

where the last approximation is valid when \(m_e, m_e'\) are small. Analogously, the states \({|{a_{\pm }; m_e, m_e' }\rangle }\) have energy

$$\begin{aligned}&E(a; m_e, m_e') = 4 E_{C,11}^{(e)} \biggl (m_e + \frac{1}{2} \biggr )^2 + 4 E_{C,11}^{(e)} \biggl (m_e' - \frac{1}{2} \biggr )^2 \nonumber \\&\quad + 8 E_{C,12}^{(e)}\biggl (m_e +\frac{1}{2} \biggr )\biggl (m_e' - \frac{1}{2} \biggr ) +2 \bigl ( E_{C,11}^{(a)} - E_{C,12}^{(a)} \bigr ) \approx 2 E_{C, \textrm{diff}}^{(a)}. \end{aligned}$$
(F114)

In the limit of \(C \gg C_g, C_J\) we can also make the approximation

$$\begin{aligned} E(a; m_e, m_e') - E(m_e, m_e') \approx 2 E_{C, \textrm{diff}}^{(a)}. \end{aligned}$$
(F115)

The matrix elements of the perturbation, i.e., the Josephson potential in Eq. (F108) between the exciton states and the intermediate agiton states are given by

$$\begin{aligned} {\langle {m_e, m_e' | V |a_{\pm }; m_e, m_e'}\rangle } = -\frac{E_J}{2}. \end{aligned}$$
(F116)

Importantly, these are the only non-zero matrix elements of V between states in \({\mathcal {H}}_{a=0}\) and \({\mathcal {H}}_{a \ne 0}\).

We now proceed with the perturbative Schrieffer-Wolff analysis. Let \({\mathcal {E}}_{a =0}\) (\({\mathcal {E}}_{a \ne 0}\)) be the set of eigenvalues of \(H_0\) associated with eigenvectors in \({\mathcal {H}}_{a=0}\) (\({\mathcal {H}}_{a\ne 0}\)). We denote by \(P_{a =0}\) the projector onto the zero-agiton subspace and by \(P_{a \ne 0}\) the projector onto the subspace orthogonal to it. We define the block-off-diagonal operator associated with the perturbation V in Eq. (F108) as

$$\begin{aligned} V_{\textrm{od}} = P_{a=0} V P_{a \ne 0} + P_{a \ne 0} V P_{a=0} = P_{a=0} V P_{a \ne 0} + \mathrm {h.c.} \end{aligned}$$
(F117)

The effective second order Schrieffer-Wolff Hamiltonian is given by

$$\begin{aligned} H_{\textrm{eff}} = P_{a=0} (H_0 + V) P_{a=0} + \frac{1}{2} P_{a=0} [S_1, V_{\textrm{od}} ] P_{a=0}, \end{aligned}$$
(F118)

where the approximate generator of the Schrieffer-Wolff transformation is given by the anti-Hermitian operator

$$\begin{aligned} S_1 = {\tilde{S}}_1 - \mathrm {h.c.}, \end{aligned}$$
(F119)

with

$$\begin{aligned} {\tilde{S}}_1 = \sum _{E \in {\mathcal {E}}_{a =0}} \sum _{E' \in {\mathcal {E}}_{a \ne 0}} \frac{{\langle {E | V_{\textrm{od}}|E'}\rangle }}{E - E'} {|{E}\rangle } {\langle {E'}|}. \end{aligned}$$
(F120)

The first term on the right-hand side of Eq. (F118) reads

$$\begin{aligned} P_{a=0} (H_0 + V) P_{a=0} = 4 E_{C,11}^{(e)} ({\hat{\ell }}_{0, L}^{(e)})^2 + 4 E_{C,11}^{(e)} ({\hat{\ell }}_{0,R}^{(e)})^2 + 8 E_{C,12}^{(e)} {\hat{\ell }}_{0,L}^{(e)} {\hat{\ell }}_{0, R}^{(e)}, \end{aligned}$$
(F121)

where the operators \({\hat{\ell }}_{0, L}\) and \({\hat{\ell }}_{0, R}^{(e)}\) are the projection of the exciton charge operators \({\hat{\ell }}_{L, R}^{(e)}\) onto the zero-agiton subspace, i.e., \({\hat{\ell }}_{0, L}^{(e)} = P_{a=0} {\hat{\ell }}_{L}^{(e)} P_{a=0}\) and \({\hat{\ell }}_{0, R}^{(e)} = P_{a=0} {\hat{\ell }}_{R}^{(e)} P_{a=0}\). The operators \({\hat{\ell }}_{0, L}^{(e)}\) and \({\hat{\ell }}_{0, R}^{(e)}\) have only integer eigenvalues.

The explicit calculation of \({\tilde{S}}_1\) using Eq. (F116) gives

$$\begin{aligned} {\tilde{S}}_1 = - \frac{1}{2}\sum _{m_e, m_e' \in {\mathbb {Z}}} \sum _{s =\pm }\frac{E_J}{E(m_e, m_e') - E(a;m_e, m_e')} {|{m_e, m_e'}\rangle } {\langle {a_s;m_e, m_e'}|} -\mathrm {h.c.}.\nonumber \\ \end{aligned}$$
(F122)

Straightforward algebra shows that the last term in Eq. (F118) can be simply rewritten as

$$\begin{aligned} \frac{1}{2} P_{a=0} [S_1, V_{\textrm{od}}] P_{a=0} = \frac{1}{2}{\tilde{S}}_1 P_{a \ne 0} V P_{a = 0} + \mathrm {h.c.}. \end{aligned}$$
(F123)

Writing explicitly \(P_{a \ne 0} V P_{a = 0}\) gives

$$\begin{aligned} P_{a \ne 0} V P_{a =0} = - \frac{E_J}{2} \sum _{m_e, m_e' \in {\mathbb {Z}}} \sum _{s=\pm } {|{a_s;m_e, m_e'}\rangle } {\langle {m_e, m_e'}|}. \end{aligned}$$
(F124)

Plugging into Eq. (F123), we obtainFootnote 6

$$\begin{aligned}&\frac{1}{2} P_{a=0} [S_1, V_{\textrm{od}}] P_{a=0} \!= \!\frac{1}{4} \sum _{m_e, m_e' \in {\mathbb {Z}}} \frac{E_J^2}{E(m_e, m_e') - E(a;m_e, m_e')} {|{m_e, m_e'}\rangle }{\langle {m_e, m_e'}|} \nonumber \\&\qquad + \frac{1}{4} \sum _{m_e, m_e' \in {\mathbb {Z}}} \frac{E_J^2}{E(m_e, m_e') - E(a;m_e, m_e')} {|{m_e, m_e'}\rangle }{\langle {m_e-1, m_e' + 1}|} + \mathrm {h.c.} \nonumber \\&\quad = \frac{1}{2} \sum _{m_e, m_e' \in {\mathbb {Z}}} \frac{E_J^2}{E(m_e, m_e') - E(a;m_e, m_e')} {|{m_e, m_e'}\rangle }{\langle {m_e, m_e'}|} \nonumber \\&\quad + \frac{1}{4} \biggl ( \sum _{m_e, m_e' \in {\mathbb {Z}}} \frac{E_J^2}{E(m_e, m_e') - E(a;m_e, m_e')} {|{m_e, m_e'}\rangle }{\langle {m_e-1, m_e'+1}|} + \mathrm {h.c.} \biggr ). \end{aligned}$$
(F125)

We obtain the effective Hamiltonian

$$\begin{aligned}&H_{\textrm{eff}} = 4 E_{C,11}^{(e)} ({\hat{\ell }}_{0, L}^{(e)})^2 + 4 E_{C, 11}^{(e)} ({\hat{\ell }}_{0, R}^{(e)})^2 + 8 E_{C,12}^{(e)} {\hat{\ell }}_{0, L}^{(e)} {\hat{\ell }}_{0, R}^{(e)} \nonumber \\&\quad + \frac{1}{2} \sum _{m_e, m_e' \in {\mathbb {Z}}} \frac{E_J^2}{E(m_e, m_e') - E(a ;m_e, m_e')} {|{m_e, m_e'}\rangle }{\langle {m_e, m_e'}|} \nonumber \\&\quad + \frac{1}{4} \biggl ( \sum _{m_e, m_e' \in {\mathbb {Z}}} \frac{E_J^2}{E(m_e, m_e') - E(a;m_e, m_e')} {|{m_e, m_e'}\rangle }{\langle {m_e-1, m_e'+1}|} + \mathrm {h.c.} \biggr ). \end{aligned}$$
(F126)

Using the approximation in Eq. (F115) we can write the effective Hamiltonian more compactly as

$$\begin{aligned}&H_{\textrm{eff}} = 4 E_{C,11}^{(e)} ({\hat{\ell }}_{0,L}^{(e)})^2 + 4 E_{C, 11}^{(e)} ({\hat{\ell }}_{0,R}^{(e)})^2 + 8 E_{C,12}^{(e)} {\hat{\ell }}_{0, L}^{(e)} {\hat{\ell }}_{0, R}^{(e)} \nonumber \\&\quad - \frac{E_J^2}{4 E_{C, \textrm{diff}}^{(a)}} \biggl ( \frac{1}{2} \sum _{m_e, m_e' \in {\mathbb {Z}}} {|{m_e, m_e'}\rangle }{\langle {m_e-1, m_e'+1}|} + \mathrm {h.c.} \biggr ) - \frac{E_J^2}{4 E_{C, \textrm{diff}}^{(a)}} P_{a=0}, \end{aligned}$$
(F127)

where the last term proportional to \(P_{a=0}\) can be neglected since it is the identity on the zero-agiton subspace. We identify the operators \(e^{i \theta _{0, L}}\) and \(e^{i \theta _{0, R}}\) as

$$\begin{aligned} e^{i {{\theta }}_{0,L}^{(e)}} = \sum _{m_{e}\in {\mathbb {Z}}} {|{m_{e}}\rangle }{\langle {m_{e}-1}|} \otimes I, \quad e^{i {{\theta }}_{0,R}^{(e)}} = I \otimes \sum _{m_{e}'\in {\mathbb {Z}}} {|{m_{e}'}\rangle }{\langle {m_{e}'-1}|} \end{aligned}$$
(F128)

where the subscript 0 specifies that these are defined within the zero-agiton subspace.

In this way we rewrite the effective Hamiltonian as

$$\begin{aligned} H_{\textrm{eff}} = 4 E_{C,11}^{(e)} ({\hat{\ell }}_{0, L}^{(e)})^2 + 4 E_{C,11}^{(e)} ({\hat{\ell }}_{0, R}^{(e)})^2 + 8 E_{C,12}^{(e)} {\hat{\ell }}_{0, L}^{(e)} {\hat{\ell }}_{0, R}^{(e)} -E_{J, \textrm{eff}}\cos ({\hat{\theta }}_{0, L}^{(e)} - {\hat{\theta }}_{0, R}^{(e)} ), \nonumber \\ \end{aligned}$$
(F129)

with the effective Josephson energy \(E_{J, \textrm{eff}}\) defined in Eq. (131) of the main text. Finally, in terms of the original node variables projected onto the zero-agiton subspace that we denote as \({\hat{\theta }}_{0, k}\) we get

$$\begin{aligned} \cos ({\hat{\theta }}_{0, L}^{(e)} - {\hat{\theta }}_{0, R}^{(e)} ) = \cos ({\hat{\theta }}_{0, 1} + {\hat{\theta }}_{0,4} - {\hat{\theta }}_{0, 3} - {\hat{\theta }}_{0, 2}). \end{aligned}$$
(F130)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Vuillot, C., Ciani, A. & Terhal, B.M. Homological Quantum Rotor Codes: Logical Qubits from Torsion. Commun. Math. Phys. 405, 53 (2024). https://doi.org/10.1007/s00220-023-04905-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s00220-023-04905-4

Navigation