Skip to main content

Advertisement

Log in

Hardware efficient decomposition of the Laplace operator and its application to the Helmholtz and the Poisson equation on quantum computer

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

    We’re sorry, something doesn't seem to be working properly.

    Please try refreshing the page. If that doesn't work, please contact support so we can address the problem.

Abstract

With the rapid advancement of quantum computers in the past few years, there is ongoing development of algorithms aimed at solving problems that are difficult to tackle with classical computers. A pertinent instance of this is the resolution of partial differential equations (PDEs), where a current trend involves the exploration of variational quantum algorithms (VQAs) tailored to efficiently function on the noisy intermediate-scale quantum (NISQ) devices. Recently, VQAs for solving the Poisson equation have been proposed, and these algorithms require highly entangled quantum states or specific types of qubit entanglement to compute the expectation value of the Laplace operator. Implementing such requirements on NISQ devices poses a significant challenge. To overcome this problem, we propose a new method for representing the Laplace operator in the finite difference formulation. Since the quantum circuits introduced for evaluating the expectation value of the Laplace operator through proposed method do not require processes that degrade the fidelity of computation, such as swap operations or generation of highly entangled states, they can be easily implemented on NISQ devices. In the regime of quantum supremacy (the number of qubits is approximately 50), our proposed approach necessitates approximately one-third fewer CNOT operations compared to conventional methods. To assess the effectiveness of the proposed method, we conduct computations for finding the eigenvalues of the Helmholtz equation and solving the Poisson equation on cloud-based quantum hardware. We calculate the fidelity of quantum states required for each method through quantum tomography and also estimate the fidelity in the quantum supremacy regime. We believe that the proposed method can be applied to other PDEs having the Laplace operator and greatly assists in solving them.

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

Access this article

Subscribe and save

Springer+ Basic
€32.70 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (France)

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
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

Data availability

The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.

References

  1. Feynman, R.P.: Simulating physics with computers. Int. J. Theor. Phys. 21, (2018)

  2. Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factoring. In: Proceedings 35th annual symposium on foundations of computer science. pp. 124–134. IEEE (1994)

  3. Grover, L.K.: Quantum mechanics helps in searching for a needle in a haystack. Phys. Rev. Lett. 79, 325–328 (1997). https://doi.org/10.1103/PhysRevLett.79.325

    Article  ADS  Google Scholar 

  4. Harrow, A.W., Hassidim, A., Lloyd, S.: Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103, 150502 (2009). https://doi.org/10.1103/PhysRevLett.103.150502

    Article  ADS  MathSciNet  Google Scholar 

  5. Rebentrost, P., Mohseni, M., Lloyd, S.: Quantum support vector machine for big data classification. Phys. Rev. Lett. 113, 130503 (2014). https://doi.org/10.1103/PhysRevLett.113.130503

    Article  ADS  Google Scholar 

  6. Duan, B., Yuan, J., Liu, Y., Li, D.: Quantum algorithm for support matrix machines. Phys. Rev. A 96, 032301 (2017). https://doi.org/10.1103/PhysRevA.96.032301

    Article  ADS  Google Scholar 

  7. Wiebe, N., Braun, D., Lloyd, S.: Quantum algorithm for data fitting. Phys. Rev. Lett. 109, 050505 (2012). https://doi.org/10.1103/PhysRevLett.109.050505

    Article  ADS  Google Scholar 

  8. Yu, C.-H., Gao, F., Wen, Q.-Y.: An improved quantum algorithm for ridge regression. IEEE Trans. Knowl. Data Eng. 33, 858–866 (2021). https://doi.org/10.1109/TKDE.2019.2937491

    Article  Google Scholar 

  9. Biamonte, J., Wittek, P., Pancotti, N., Rebentrost, P., Wiebe, N., Lloyd, S.: Quantum machine learning. Nature 549, 195–202 (2017)

    Article  ADS  Google Scholar 

  10. Cao, Y., Romero, J., Olson, J.P., Degroote, M., Johnson, P.D., Kieferová, M., Kivlichan, I.D., Menke, T., Peropadre, B., Sawaya, N.P.: Quantum chemistry in the age of quantum computing. Chem. Rev. 119, 10856–10915 (2019)

    Article  Google Scholar 

  11. McArdle, S., Endo, S., Aspuru-Guzik, A., Benjamin, S.C., Yuan, X.: Quantum computational chemistry. Rev. Mod. Phys. 92, 015003 (2020)

    Article  ADS  MathSciNet  Google Scholar 

  12. Aspuru-Guzik, A., Dutoi, A.D., Love, P.J., Head-Gordon, M.: Simulated quantum computation of molecular energies. Science 309, 1704–1707 (2005)

    Article  ADS  Google Scholar 

  13. Cao, Y., Papageorgiou, A., Petras, I., Traub, J., Kais, S.: Quantum algorithm and circuit design solving the Poisson equation. New J. Phys. 15, 013021 (2013). https://doi.org/10.1088/1367-2630/15/1/013021

    Article  ADS  MathSciNet  Google Scholar 

  14. Vazquez, A.C., Hiptmair, R., Woerner, S.: Enhancing the quantum linear systems algorithm using Richardson extrapolation. ACM Trans. Quant. Comput. 3, 1–37 (2022)

    Article  MathSciNet  Google Scholar 

  15. Childs, A.M., Kothari, R., Somma, R.D.: Quantum algorithm for systems of linear equations with exponentially improved dependence on precision. SIAM J. Comput. 46, 1920–1950 (2017)

    Article  MathSciNet  Google Scholar 

  16. Lloyd, S., De Palma, G., Gokler, C., Kiani, B., Liu, Z.-W., Marvian, M., Tennie, F., Palmer, T.: Quantum algorithm for nonlinear differential equations. arXiv preprint arXiv:2011.06571. (2020)

  17. Preskill, J.: Quantum computing in the NISQ era and beyond. Quantum (2018). https://doi.org/10.22331/q-2018-08-06-79

    Article  Google Scholar 

  18. Cerezo, M., Arrasmith, A., Babbush, R., Benjamin, S.C., Endo, S., Fujii, K., McClean, J.R., Mitarai, K., Yuan, X., Cincio, L., Coles, P.J.: Variational quantum algorithms. Nat. Rev. Phys. 3, 625–644 (2021). https://doi.org/10.1038/s42254-021-00348-9

    Article  Google Scholar 

  19. McClean, J.R., Romero, J., Babbush, R., Aspuru-Guzik, A.: The theory of variational hybrid quantum-classical algorithms. New J. Phys. 18, 023023 (2016). https://doi.org/10.1088/1367-2630/18/2/023023

    Article  ADS  Google Scholar 

  20. Lubasch, M., Joo, J., Moinier, P., Kiffner, M., Jaksch, D.: Variational quantum algorithms for nonlinear problems. Phys. Rev. A 101, 010301 (2020). https://doi.org/10.1103/PhysRevA.101.010301

    Article  ADS  Google Scholar 

  21. Liu, H.-L., Wu, Y.-S., Wan, L.-C., Pan, S.-J., Qin, S.-J., Gao, F., Wen, Q.-Y.: Variational quantum algorithm for the Poisson equation. Phys. Rev. A 104, 022418 (2021). https://doi.org/10.1103/PhysRevA.104.022418

    Article  ADS  MathSciNet  Google Scholar 

  22. Sato, Y., Kondo, R., Koide, S., Takamatsu, H., Imoto, N.: Variational quantum algorithm based on the minimum potential energy for solving the Poisson equation. Phys. Rev. A 104, 052409 (2021). https://doi.org/10.1103/PhysRevA.104.052409

    Article  ADS  MathSciNet  Google Scholar 

  23. Kondo, R., Sato, Y., Koide, S., Kajita, S., Takamatsu, H.: Computationally efficient quantum expectation with extended bell measurements. Quantum (2022). https://doi.org/10.22331/q-2022-04-13-688

    Article  Google Scholar 

  24. Sato, Y., Watanabe, H.C., Raymond, R., Kondo, R., Wada, K., Endo, K., Sugawara, M., Yamamoto, N.: A Variational Quantum Algorithm for Generalized Eigenvalue Problems and Its Application to Finite Element Method, http://arxiv.org/abs/2302.12602, (2023)

  25. IBM Quantum, https://quantum-computing.ibm.com/

  26. Introduction to partial differential equations. (2020)

  27. Functional Analysis, Sobolev spaces and partial differential equations, Springer Link, https://link.springer.com/book/https://doi.org/10.1007/978-0-387-70914-7

  28. Chowdhury, S., Das, P.K., Faruque, S.B.: Numerical solutions of boundary value problems with finite difference method. Morgan & Claypool Publishers, San Rafael (2018)

    Book  Google Scholar 

  29. Higgott, O., Wang, D., Brierley, S.: Variational quantum computation of excited states. Quantum 3, 156 (2019). https://doi.org/10.22331/q-2019-07-01-156

    Article  Google Scholar 

  30. Arute, F., Arya, K., Babbush, R., Bacon, D., Bardin, J.C., Barends, R., Biswas, R., Boixo, S., Brandao, F.G.S.L., Buell, D.A., Burkett, B., Chen, Y., Chen, Z., Chiaro, B., Collins, R., Courtney, W., Dunsworth, A., Farhi, E., Foxen, B., Fowler, A., Gidney, C., Giustina, M., Graff, R., Guerin, K., Habegger, S., Harrigan, M.P., Hartmann, M.J., Ho, A., Hoffmann, M., Huang, T., Humble, T.S., Isakov, S.V., Jeffrey, E., Jiang, Z., Kafri, D., Kechedzhi, K., Kelly, J., Klimov, P.V., Knysh, S., Korotkov, A., Kostritsa, F., Landhuis, D., Lindmark, M., Lucero, E., Lyakh, D., Mandrà, S., McClean, J.R., McEwen, M., Megrant, A., Mi, X., Michielsen, K., Mohseni, M., Mutus, J., Naaman, O., Neeley, M., Neill, C., Niu, M.Y., Ostby, E., Petukhov, A., Platt, J.C., Quintana, C., Rieffel, E.G., Roushan, P., Rubin, N.C., Sank, D., Satzinger, K.J., Smelyanskiy, V., Sung, K.J., Trevithick, M.D., Vainsencher, A., Villalonga, B., White, T., Yao, Z.J., Yeh, P., Zalcman, A., Neven, H., Martinis, J.M.: Quantum supremacy using a programmable superconducting processor. Nature 574, 505–510 (2019). https://doi.org/10.1038/s41586-019-1666-5

    Article  ADS  Google Scholar 

  31. Kim, Y., Eddins, A., Anand, S., Wei, K.X., van den Berg, E., Rosenblatt, S., Nayfeh, H., Wu, Y., Zaletel, M., Temme, K., Kandala, A.: Evidence for the utility of quantum computing before fault tolerance. Nature 618, 500–505 (2023). https://doi.org/10.1038/s41586-023-06096-3

    Article  ADS  Google Scholar 

  32. Acharya, R., Aleiner, I., Allen, R., Andersen, T.I., Ansmann, M., Arute, F., Arya, K., Asfaw, A., Atalaya, J., Babbush, R., Bacon, D., Bardin, J.C., Basso, J., Bengtsson, A., Boixo, S., Bortoli, G., Bourassa, A., Bovaird, J., Brill, L., Broughton, M., Buckley, B.B., Buell, D.A., Burger, T., Burkett, B., Bushnell, N., Chen, Y., Chen, Z., Chiaro, B., Cogan, J., Collins, R., Conner, P., Courtney, W., Crook, A.L., Curtin, B., Debroy, D.M., Del Toro Barba, A., Demura, S., Dunsworth, A., Eppens, D., Erickson, C., Faoro, L., Farhi, E., Fatemi, R., Flores Burgos, L., Forati, E., Fowler, A.G., Foxen, B., Giang, W., Gidney, C., Gilboa, D., Giustina, M., Grajales Dau, A., Gross, J.A., Habegger, S., Hamilton, M.C., Harrigan, M.P., Harrington, S.D., Higgott, O., Hilton, J., Hoffmann, M., Hong, S., Huang, T., Huff, A., Huggins, W.J., Ioffe, L.B., Isakov, S.V., Iveland, J., Jeffrey, E., Jiang, Z., Jones, C., Juhas, P., Kafri, D., Kechedzhi, K., Kelly, J., Khattar, T., Khezri, M., Kieferová, M., Kim, S., Kitaev, A., Klimov, P.V., Klots, A.R., Korotkov, A.N., Kostritsa, F., Kreikebaum, J.M., Landhuis, D., Laptev, P., Lau, K.-M., Laws, L., Lee, J., Lee, K., Lester, B.J., Lill, A., Liu, W., Locharla, A., Lucero, E., Malone, F.D., Marshall, J., Martin, O., McClean, J.R., McCourt, T., McEwen, M., Megrant, A., Meurer Costa, B., Mi, X., Miao, K.C., Mohseni, M., Montazeri, S., Morvan, A., Mount, E., Mruczkiewicz, W., Naaman, O., Neeley, M., Neill, C., Nersisyan, A., Neven, H., Newman, M., Ng, J.H., Nguyen, A., Nguyen, M., Niu, M.Y., O’Brien, T.E., Opremcak, A., Platt, J., Petukhov, A., Potter, R., Pryadko, L.P., Quintana, C., Roushan, P., Rubin, N.C., Saei, N., Sank, D., Sankaragomathi, K., Satzinger, K.J., Schurkus, H.F., Schuster, C., Shearn, M.J., Shorter, A., Shvarts, V., Skruzny, J., Smelyanskiy, V., Smith, W.C., Sterling, G., Strain, D., Szalay, M., Torres, A., Vidal, G., Villalonga, B., Vollgraff Heidweiller, C., White, T., Xing, C., Yao, Z.J., Yeh, P., Yoo, J., Young, G., Zalcman, A., Zhang, Y., Zhu, N., Google Quantum, A.I.: Suppressing quantum errors by scaling a surface code logical qubit. Nature 614, 676–681 (2023). https://doi.org/10.1038/s41586-022-05434-1

    Article  ADS  Google Scholar 

  33. Yuan, P., Allcock, J., Zhang, S.: Does qubit connectivity impact quantum circuit complexity? In: IEEE Transactions on computer-aided design of integrated circuits and systems. 1–1 (2023). https://doi.org/10.1109/TCAD.2023.3311734

  34. Impact of qubit connectivity on quantum algorithm performance – IOP Science, https://iopscience.iop.org/article/https://doi.org/10.1088/2058-9565/ab73e0/meta

  35. Chatterjee, A., Stevenson, P., De Franceschi, S., Morello, A., de Leon, N.P., Kuemmeth, F.: Semiconductor qubits in practice. Nat. Rev. Phys. 3, 157–177 (2021)

    Article  Google Scholar 

  36. Dutt, M.G., Childress, L., Jiang, L., Togan, E., Maze, J., Jelezko, F., Zibrov, A.S., Hemmer, P.R., Lukin, M.D.: Quantum register based on individual electronic and nuclear spin qubits in diamond. Science 316, 1312–1316 (2007)

    Article  Google Scholar 

  37. Kandala, A., Mezzacapo, A., Temme, K., Takita, M., Brink, M., Chow, J.M., Gambetta, J.M.: Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature 549, 242–246 (2017). https://doi.org/10.1038/nature23879

    Article  ADS  Google Scholar 

  38. Leone, L., Oliviero, S.F.E., Cincio, L., Cerezo, M.: On the practical usefulness of the Hardware Efficient Ansatz, http://arxiv.org/abs/2211.01477, (2022)

  39. Qiskit contributors: Qiskit: An Open-source Framework for Quantum Computing, (2023)

  40. Nelder, J.A., Mead, R.: A simplex method for function minimization. Comput. J. 7, 308–313 (1965). https://doi.org/10.1093/comjnl/7.4.308

    Article  MathSciNet  Google Scholar 

  41. Virtanen, P., Gommers, R., Oliphant, T.E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., van der Walt, S.J., Brett, M., Wilson, J., Millman, K.J., Mayorov, N., Nelson, A.R.J., Jones, E., Kern, R., Larson, E., Carey, C.J., Polat, İ, Feng, Y., Moore, E.W., VanderPlas, J., Laxalde, D., Perktold, J., Cimrman, R., Henriksen, I., Quintero, E.A., Harris, C.R., Archibald, A.M., Ribeiro, A.H., Pedregosa, F., van Mulbregt, P.: SciPy 1.0 Contributors: SciPy 1.0: fundamental algorithms for scientific computing in python. Nature Methods. 17, 261–272 (2020). https://doi.org/10.1038/s41592-019-0686-2

    Article  Google Scholar 

  42. Satoh, T., Oomura, S., Sugawara, M., Yamamoto, N.: Pulse-engineered Controlled-V gate and its applications on superconducting quantum device. IEEE Trans. Quant. Eng.. 3, 1–10 (2022)

    Article  Google Scholar 

  43. Jackson, J.D.: Classical electrodynamics, (1999)

  44. Waseem, M.H., Faizan-e-Ilahi, Anwar, M.S.: Quantum state tomography. In: Quantum mechanics in the single photon laboratory. IOP Publishing (2020)

  45. Jozsa, R.: Fidelity for mixed quantum states. J. Mod. Opt. 41, 2315–2323 (1994)

    Article  ADS  MathSciNet  Google Scholar 

  46. Knill, E., Leibfried, D., Reichle, R., Britton, J., Blakestad, R.B., Jost, J.D., Langer, C., Ozeri, R., Seidelin, S., Wineland, D.J.: Randomized benchmarking of quantum gates. Phys. Rev. A 77, 012307 (2008). https://doi.org/10.1103/PhysRevA.77.012307

    Article  ADS  Google Scholar 

Download references

Acknowledgements

We acknowledge the use of IBM Quantum services for this work. The views expressed are those of the authors and do not reflect the official policy or position of IBM or the IBM Quantum team.

Author information

Authors and Affiliations

Authors

Contributions

J.B conceived and conducted the research, performing specific calculations, and writing the script. G.Y analyzed the data and wrote the script. S.N and S.O analyzed relevant existing research and wrote the script. D.K supervised the entire research.

Corresponding author

Correspondence to Jaehyun Bae.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

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

Appendices

Appendix A: Derivation of Hamiltonian decomposition

Here, we prove the Proposition 1 in the Section III A.

We prove

$${\text{P}}_{\text{n}}^{-1}\left({\text{I}}^{\otimes \text{n}-1}\otimes \text{X}\right){\text{P}}_{\text{n}}= \sum_{\text{i}=1}^{\text{n}-1}{\text{B}}_{\text{i}}\left(\text{n}\right)$$
(A1)

by using the mathematical induction.

For the case of n = 2, it is easy to show that Eq. (A1) holds by construction. By definition of operations,

$${\text{P}}_{2}= \left(\begin{array}{cc}\begin{array}{cc}0& 0\\ 1& 0\end{array}& \begin{array}{cc}0& 1\\ 0& 0\end{array}\\ \begin{array}{cc}0& 1\\ 0& 0\end{array}& \begin{array}{cc}0& 0\\ 1& 0\end{array}\end{array}\right),\text{ I}\otimes \text{X}=\left(\begin{array}{cc}\begin{array}{cc}0& 1\\ 1& 0\end{array}& \begin{array}{cc}0& 0\\ 0& 0\end{array}\\ \begin{array}{cc}0& 0\\ 0& 0\end{array}& \begin{array}{cc}0& 1\\ 1& 0\end{array}\end{array}\right),{\text{T}}_{1}\left(2\right)=\left(\begin{array}{cc}\begin{array}{cc}1& 0\\ 0& -1\end{array}& \begin{array}{cc}0& 0\\ 0& 0\end{array}\\ \begin{array}{cc}0& 0\\ 0& 0\end{array}& \begin{array}{cc}1& 0\\ 0& -1\end{array}\end{array}\right),\text{C}\left(1\right)=\frac{1}{\sqrt{2}} \left(\begin{array}{cc}\begin{array}{cc}1& 0\\ 1& 0\end{array}& \begin{array}{cc}0& 1\\ 0& -1\end{array}\\ \begin{array}{cc}0& 1\\ 0& -1\end{array}& \begin{array}{cc}1& 0\\ 1& 0\end{array}\end{array}\right),$$

Both LHS and RHS of Eq. (A1) are given by,

$$\left(\begin{array}{cc}\begin{array}{cc}0& 0\\ 0& 0\end{array}& \begin{array}{cc}0& 1\\ 1& 0\end{array}\\ \begin{array}{cc}0& 1\\ 1& 0\end{array}& \begin{array}{cc}0& 0\\ 0& 0\end{array}\end{array}\right).$$

Then, we will show that for every \(\text{n}\ge 2\), if Eq. (A1) for n holds, then the Eq. (A1) for n + 1 also holds. For the sake of simplicity, we denote the LHS and the RHS of equation (A1) to \(\text{L}(\text{n})\) and \(\text{R}\left(\text{n}\right)\) , respectively. By the definition of the shift operation, the matrix element of the \(\text{L}(\text{n})\) is given by,

$$\text{L}{\left(\text{n}\right)}_{\text{ij}}=\left\{\begin{array}{c}1, if \left(\text{i},\text{j}\right)=\left(2\text{k}, 2\text{k}+1\right)\, or \,\left(2\text{k}+1, 2\text{k}\right) for 1\le k\le {2}^{\text{n}-1}-1\\ 0, otherwise\end{array}\right..$$
(A2)

By equation (A2), \(\text{L}\left(\text{n}+1\right)\) can be expressed by,

$$\text{L}\left(\text{n}+1\right)=\text{I}\otimes \text{L}\left(\text{n}\right)+\left(-\text{I}+\text{X}\right)\otimes \left({\text{X}}_{0}^{\otimes \text{n}}+{\text{X}}_{1}^{\otimes \text{n}}\right), $$
(A3)

where \({\text{X}}_{0}= \left(\begin{array}{cc}0& 1\\ 0& 0\end{array}\right)\) and \({\text{X}}_{1}= \left(\begin{array}{cc}0& 0\\ 1& 0\end{array}\right)\). By the definition of \({\text{B}}_{\text{i}}\left(\text{n}\right),\text{ C}(\text{i})\) and \({\text{T}}_{\text{i}}(\text{n})\) in Eq. (27)–(30) in the main text, we can write the operations acting on the n + 1 qubits quantum state as that of on n qubits quantum state,

$$\text{C}\left(\text{i},\text{n}+1\right)=\text{I}\otimes \text{C}\left(\text{i},\text{ n}\right),$$
(A4)
$${\text{T}}_{\text{i}}\left(\text{n}+1\right)=\text{I}\otimes {\text{T}}_{\text{i}}\left(\text{n}\right)\text{ for }1\le \text{i}\le \text{n}-2,$$
(A5)
$${\text{T}}_{\text{n}-1}\left(\text{n}+1\right)=\text{I}\otimes {\text{T}}_{\text{n}-1}\left(\text{n}\right)-\text{I}\otimes \left({\text{I}}_{0}^{\otimes \text{n}-1}\otimes \text{Z}\right),$$
(A6)
$${\text{T}}_{\text{n}}\left(\text{n}+1\right)=\text{I}\otimes {\text{I}}_{0}^{\text{n}-1}\otimes \text{Z},$$
(A7)

where, \(\text{C}\left(\text{i},\text{ n}\right)\) is the \(\text{C}(\text{i})\) in the n qubits space. Hence,

$${\text{B}}_{\text{i}}\left(\text{n}+1\right)=\text{I}\otimes {\text{B}}_{\text{i}}\left(\text{n}\right)\text{ for }1\le \text{i}\le \text{n}-2,$$
(A8)
$${\text{B}}_{\text{n}-1}\left(\text{n}+1\right)=\text{I}\otimes {\text{B}}_{\text{n}-1}\left(\text{n}\right)-\text{C}{\left(\text{n}-1,\text{n}+1\right)}^{-1}\left[\text{I}\otimes {\text{I}}_{0}^{\otimes \text{n}-1}\otimes \text{Z}\right]\text{C}\left(\text{n}-1,\text{ n}+1\right),$$
(A9)
$${\text{B}}_{\text{n}}\left(\text{n}+1\right)=\text{C}{\left(\text{n},\text{ n}+1\right)}^{-1}{\text{T}}_{\text{n}}\left(\text{n}+1\right)\text{C}\left(\text{n},\text{ n}+1\right).$$
(A10)

Using above relations, it can be shown that,

$$\text{R}\left(\text{n}+1\right)=\text{I}\otimes \text{R}\left(\text{n}\right)-\text{C}{\left(\text{n}-1,\text{ n}+1\right)}^{-1}\left[\text{I}\otimes {\text{I}}_{0}^{\otimes \text{n}-1}\otimes \text{Z}\right]\text{C}\left(\text{n}-1,\text{ n}+1\right)+\text{C}{\left(\text{n},\text{ n}+1\right)}^{-1}{\text{T}}_{\text{n}}\left(\text{n}+1\right)\text{C}\left(\text{n},\text{n}+1\right).$$
(A11)

By the definition of \(\text{C}(\text{i},\text{n})\),

$$\text{C}\left(\text{n},\text{ n}+1\right)=\text{C}\left(\text{n}-1,\text{ n}+1\right)\text{CX}\left(0,\text{ n}\right),$$
(A12)

and the last term in the Eq. (A11) can be written by,

$$\begin{aligned}\text{C}{\left(\text{n},\text{ n}+1\right)}^{-1}{\text{T}}_{\text{n}}\left(\text{n}+1\right)\text{C}\left(\text{n},\text{ n}+1\right)=\text{CX}\left(0,\text{n}\right)\text{C}{\left(\text{n}-1,\text{n}+1\right)}^{-1}\\ \left[\text{I}\otimes {\text{I}}_{0}^{\otimes \text{n}-1}\otimes \text{Z}\right]\text{C}\left(\text{n}-1,\text{n}+1\right)\text{CX}\left(0,\text{ n}\right).\end{aligned}$$
(A13)

From \(\text{C}\left(\text{n}-1,\text{ n}+1\right)=\text{H}(0)\prod_{\text{q}=1}^{\text{n}-1}\text{CX}(0,\text{ q})\),

$$\text{C}\left(\text{n}-1,\text{ n}+1\right)=\text{H}\left(0\right)\text{I}\otimes \left[{\text{I}}^{\otimes \text{n}-1}\otimes {\text{I}}_{0}+{\text{X}}^{\otimes \text{n}-1}\otimes {\text{I}}_{1}\right],$$
(A14)

where, \({\text{I}}_{0}= \left(\begin{array}{cc}1& 0\\ 0& 0\end{array}\right)\) and \({\text{I}}_{1}= \left(\begin{array}{cc}0& 0\\ 0& 1\end{array}\right)\). If we insert the Eq. (A14) into the second term of Eq. (A11),

$$\text{C}{\left(\text{n}-1,\text{ n}+1\right)}^{-1}\left[\text{I}\otimes {\text{I}}_{0}^{\otimes \text{n}-1}\otimes \text{Z}\right]\text{C}\left(\text{n}-1,\text{ n}+1\right)=\text{I}\otimes \left\{\left({\text{I}}^{\otimes \text{n}-1}\otimes {\text{I}}_{0}+{\text{X}}^{\otimes \text{n}-1}\otimes {\text{I}}_{1}\right)\left[{\text{I}}^{\otimes \text{n}-1}\otimes {\text{I}}_{0}+{\text{X}}^{\otimes \text{n}-1}\otimes {\text{I}}_{1}\right]\left({\text{I}}^{\otimes \text{n}-1}\otimes {\text{I}}_{0}+{\text{X}}^{\otimes \text{n}-1}\otimes {\text{I}}_{1}\right)\right\}=\text{I}\otimes \left({\text{X}}_{0}^{\otimes \text{n}}+{\text{X}}_{1}^{\otimes \text{n}}\right).$$
(A15)

Similarly, if we insert Eq. (A14) into the third term of Eq. (A11) through Eq. (A13) using the matrix representation of CNOT operation, \(\text{CX}\left(0,\text{ n}\right)= {\text{I}}^{\otimes \text{n}}\otimes {\text{I}}_{0}+\text{X}\otimes {\text{I}}^{\otimes \text{n}-1}\otimes {\text{I}}_{1}\),

$$\text{C}{\left(\text{n},\text{ n}+1\right)}^{-1}{\text{T}}_{\text{n}}\left(\text{n}+1\right)\text{C}\left(\text{n},\text{n}+1\right)=\text{X}\otimes \left({\text{X}}_{0}^{\otimes \text{n}}+{\text{X}}_{1}^{\otimes \text{n}}\right).$$
(A16)

Therefore, \(\text{R}(\text{n}+1)\) in Eq. (A11) is written as,

$$\text{R}\left(\text{n}+1\right)=\text{I}\otimes \text{R}\left(\text{n}\right)+\left(-\text{I}+\text{X}\right)\otimes \left({\text{X}}_{0}^{\otimes \text{n}}+{\text{X}}_{1}^{\otimes \text{n}}\right).$$
(A17)

By comparing Eq. (A3) and Eq. (A17), we can check \(\text{L}\left(\text{n}+1\right)=\text{R}(\text{n}+1)\), and we can conclude that Eq. (A1) holds for all \(\text{n}\ge 2\). Similar to this argument, we can prove Eqs. (25) and (26) for \({\text{B}}_{\text{D}}\left(\text{n}\right)\) and \({\text{B}}_{\text{N}}\left(\text{n}\right)\) , respectively. □

Appendix B: Derivation of Hamiltonian decomposition

Here, we prove the Proposition 2 in the Sec. III A.

We prove.

$$\text{C}{\left(\text{i}\right)}^{-1}{\text{T}}_{\text{i}}\left(\text{n}\right)\text{C}\left(\text{i}\right)=\widetilde{\text{C}}{\left(\text{i}\right)}^{-1}{\text{T}}_{\text{i}}\left(\text{n}\right)\widetilde{\text{C}}\left(\text{i}\right),$$
(B1)

here,

$${\text{T}}_{\text{i}}\left(\text{n}\right)=\left\{\begin{array}{c}{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes Z, 1\le i\le n-2\\ I\otimes {\text{I}}_{0}^{\otimes \text{n}-2}\otimes Z, i=n-1\end{array}\right.,$$
(B2)
$$\text{C}\left(\text{i}\right)=\text{H}\left(0\right)\prod_{\text{q}=1}^{\text{i}}\text{CX}\left(0,\text{ q}\right),$$
(B3)

and,

$$\widetilde{\text{C}}\left(\text{i}\right)=\text{H}\left(0\right)\prod_{\text{q}=1}^{\text{i}}\text{CX}\left(\text{q}-1,\text{ q}\right).$$
(B4)

For the sake of convenience, we denote the LHS for i and n as LHS(i, n) and RHS for i and n as RHS(i, n).

We express LHS(i,n) and RHS(i, n) as the tensor products of \(\text{I}, {\text{ I}}_{0}, {\text{ I}}_{1},\text{ X},{\text{ X}}_{0}\) and \({\text{X}}_{1}\), and the check that results are the same.

During the proof, we use the following identities,

$$\text{CX}\left(\text{0,1}\right)=\text{I}\otimes {\text{I}}_{0}+\text{X}\otimes {\text{I}}_{1},$$
(B6)
$$\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)\left[{\text{I}}_{0}\otimes {\text{X}}_{0}\right]\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)={\text{X}}_{0}^{\otimes 2},$$
(B7)
$$\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)\left[{\text{I}}_{0}\otimes {\text{X}}_{1}\right]\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)={\text{X}}_{1}^{\otimes 2},$$
(B8)
$$\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)\left[{\text{I}}_{1}\otimes {\text{X}}_{0}\right]\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)={\text{X}}_{1}{\otimes \text{X}}_{0},$$
(B9)
$$\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)\left[{\text{I}}_{1}\otimes {\text{X}}_{1}\right]\left(\text{I}{\otimes \text{I}}_{0}+\text{X}{\otimes \text{I}}_{1}\right)={\text{X}}_{0}\otimes {\text{X}}_{1}.$$
(B10)

For \(\text{i}=1\), LHS(1, n) can be expressed by,

$$\text{LHS}\left(1,\text{ n}\right)=\text{CX}\left(\text{0,1}\right)\left[{\text{I}}^{\otimes \text{n}-2}\otimes {\text{I}}_{1}\otimes \text{X}\right]\text{CX}\left(\text{0,1}\right)={\text{I}}^{\otimes \text{n}-2}\otimes \left({\text{X}}_{1}\otimes {\text{X}}_{0}+{\text{X}}_{0}\otimes {\text{X}}_{1}\right).$$
(B11)

For \(2\le \text{i}\le \text{n}-2\), LHS(i, n) is given by,

$$\begin{aligned} \text{LHS}\left(\text{i},\text{n}\right)& =\text{CX}\left(0,\text{i}\right)\text{CX}\left(0,\text{i}-1\right)\dots \text{CX}\left(\text{0,1}\right)\\ &\quad \left[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}\right]\text{CX}\left(\text{0,1}\right)\dots \text{CX}\left(0,\text{i}-1\right)\text{CX}\left(0,\text{i}\right). \end{aligned}$$
(B5)

We can express \(\text{CX}\left(\text{0,1}\right)[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}]\text{CX}\left(\text{0,1}\right)\) as

$$\text{CX}\left(\text{0,1}\right)\left[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}\right]\text{CX}\left(\text{0,1}\right)={\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-2}\otimes \left({\text{X}}_{0}^{\otimes 2}+{\text{X}}_{1}^{\otimes 2}\right),$$
(B11)

and \(\text{CX}(\text{0,2})\text{CX}\left(\text{0,1}\right)[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}]\text{CX}\left(\text{0,1}\right)\text{CX}(\text{0,2})\) as

$$\text{CX}(\text{0,2})\text{CX}\left(\text{0,1}\right)\left[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}\right]\text{CX}\left(\text{0,1}\right)\text{CX}(\text{0,2})={\text{CX}\left(\text{0,2}\right)[\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-2}\otimes \left({\text{X}}_{0}^{2}+{\text{X}}_{1}^{2}\right)]\text{CX}(\text{0,2})={[\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-3}\otimes \left({\text{X}}_{0}^{\otimes 3}+{\text{X}}_{1}^{\otimes 3}\right)].$$
(B12)

If we repeat above steps, for \(2\le \text{i}\le \text{n}-3\), we can obtain

$$\text{LHS}\left(\text{i},\text{n}\right)={\text{I}}^{\otimes \text{n}-\text{i}-1}\otimes {\text{I}}_{1}\otimes \left({\text{X}}_{0}^{\otimes \text{i}}+{\text{X}}_{1}^{\otimes \text{i}}\right).$$
(B13)

For \(\text{i}=\text{n}-2\),

$$\text{LHS}\left(\text{n}-2,\text{n}\right)=\text{CX}\left(0,\text{ n}-2\right)\text{LHS}\left(\text{n}-3,\text{n}\right)\text{CX}\left(0,\text{ n}-2\right)=\text{I}\otimes \left({\text{X}}_{1}{\otimes \text{X}}_{0}^{\otimes \text{n}-2}+{\text{X}}_{0}\otimes {\text{X}}_{1}^{\otimes \text{n}-2}\right).$$
(B14)

Similarly for \(\text{i}=\text{n}-1\),

$$\begin{aligned} \text{LHS}\left(\text{n}-1,\text{n}\right) & =\text{C}{\left(\text{n}\right)}^{-1}\left[\text{I}\otimes {\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{Z}\right]\text{C}\left(\text{n}\right)\\ & =\text{CX}\left(0,\text{n}-1\right)\left[\text{I}\otimes {(\text{X}}_{0}^{\otimes \text{n}-1}+{\text{X}}_{1}^{\otimes \text{n}-1}) \right]\text{CX}\left(0,\text{n}-1\right)\\ & =\text{X}\otimes {(\text{X}}_{0}^{\otimes \text{n}-1}+{\text{X}}_{1}^{\otimes \text{n}-1}). \end{aligned}$$
(B15)

We repeat same procedure for RHS(i, n). For \(\text{i}=1\), \(\text{C}\left(\text{i}\right)=\widetilde{\text{C}}(\text{i})\), so \(\text{LHS}\left(1,\text{n}\right)=\text{RHS}(1,\text{n})\). For \(2\le \text{i}\le \text{n}-2\), RHS(i, n) is given by,

$$\text{RHS}\left(\text{i},\text{n}\right)=\text{CX}\left(\text{i}-1,\text{ i}\right)\text{CX}\left(\text{i}-2,\text{i}-1\right)\dots \text{CX}\left(\text{0,1}\right)\left[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}\right]\text{CX}\left(\text{0,1}\right)\dots \text{CX}\left(\text{i}-2,\text{i}-1\right)\text{CX}\left(\text{i}-1,\text{i}\right).$$
(B16)

We can express \(\text{CX}\left(\text{1,2}\right)\text{CX}\left(\text{0,1}\right)\left[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}\right]\text{CX}\left(\text{0,1}\right)\text{CX}\left(\text{1,2}\right)\) as,

$$\text{CX}(\text{1,2})\text{CX}\left(\text{0,1}\right)\left[{\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-1}\otimes \text{X}\right]\text{CX}\left(\text{0,1}\right)\text{CX}(\text{1,2})={\text{CX}\left(\text{1,2}\right)[\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-2}\otimes \left({\text{X}}_{0}^{2}+{\text{X}}_{1}^{2}\right)]\text{CX}(\text{1,2})={\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\text{i}-3}\otimes [\text{CX}\left(\text{1,2}\right)\left({\text{I}}_{0}\otimes {\text{X}}_{0}\right)\text{CX}\left(\text{1,2}\right)\otimes {\text{X}}_{0}+\text{CX}\left(\text{1,2}\right)\left({\text{I}}_{0}\otimes {\text{X}}_{1}\right)\text{CX}\left(\text{1,2}\right)\otimes {\text{X}}_{1}]={[\text{I}}^{\otimes \text{n}-1-\text{i}}\otimes {\text{I}}_{1}\otimes {\text{I}}_{0}^{\otimes \text{i}-3}\otimes \left({\text{X}}_{0}^{\otimes 3}+{\text{X}}_{1}^{\otimes 3}\right)].$$
(B17)

If we repeat above steps, for \(2\le \text{i}\le \text{n}-3\), we can obtain

$$\text{RHS}\left(\text{i},\text{n}\right)={\text{I}}^{\otimes \text{n}-\text{i}-1}\otimes {\text{I}}_{1}\otimes \left({\text{X}}_{0}^{\otimes \text{i}}+{\text{X}}_{1}^{\otimes \text{i}}\right).$$
(B18)

Eq. (B18) is same as Eq. (B13). This is because, when applying the CNOT(0, m) operation (in calculation of LHS) or CNOT(m-1,m) operation (in the calculation of RHS) into the tensor products, the matrices corresponding to the controlled qubit for each case are the same. Using this property, it is easy to check that \(\text{LHS}\left(\text{i},\text{n}\right)=\text{RHS}(\text{i},\text{n})\) for \(\text{n}-3\le \text{i}\le \text{n}-2\). □

Appendix C: Derivation of Hamiltonian matrix for \(|\mathbf{u}\rangle \)

Here, we prove the Proposition 2 in the Sec. III B. For the simplicity, we denote the quantum state \(\left|\uppsi \right.\rangle = \frac{1}{\sqrt{2}}(|0\rangle \otimes \left|\upphi \right.\rangle +{\left(-1\right)}^{\text{P}}|1\rangle \otimes \text{J}\left(\frac{\text{N}}{2}\right)|\upphi \rangle )\) as,

$$\left|\uppsi \right.\rangle =\frac{1}{\sqrt{2}}\left(\genfrac{}{}{}{}{|\upphi \rangle }{{\left(-1\right)}^{\text{P}}\text{J}|\upphi \rangle }\right),$$
(B1)

where, \(\text{J}=\text{J}\left(\frac{\text{N}}{2}\right)\). The energy function \(\langle\uppsi \left|\text{A}\right|\uppsi \rangle \) for \(\text{A}=\left(\begin{array}{cc}{\text{A}}_{00}& {\text{A}}_{01}\\ {\text{A}}_{10}& {\text{A}}_{11}\end{array}\right)\) is expressed by,

$$\begin{aligned}&\langle \uppsi \left|\text{A}\right|\uppsi \rangle = \frac{1}{2}\left(\begin{array}{cc}\langle\upphi |& {\left(-1\right)}^{\text{P}}\langle\upphi |\text{J}\end{array}\right)\left(\begin{array}{cc}{\text{A}}_{00}& {\text{A}}_{01}\\ {\text{A}}_{10}& {\text{A}}_{11}\end{array}\right)\left(\genfrac{}{}{0pt}{}{\left|\upphi \right.\rangle }{{\left(-1\right)}^{\text{P}}\text{J}\left|\upphi \right.\rangle }\right)= \frac{1}{2}\left(\langle \upphi \left|{\text{A}}_{00}\right|\upphi \rangle \right.\\ &\left. +{\left(-1\right)}^{\text{P}}\langle \upphi\left|{\text{A}}_{01}\text{J}\right|\upphi \rangle+{\left(-1\right)}^{\text{P}}\langle \upphi \left|{\text{JA}}_{10}\right|\upphi \rangle +\langle \upphi \left|{\text{JA}}_{11}\text{J}\right|\upphi \rangle \right),\end{aligned}$$
(B2)

and, consequently leading to the Hamiltonian for \(|\upphi \rangle \), \({\text{A}}^{\upphi }\),

$${\text{A}}^{\upphi }= \frac{1}{2}\left({\text{A}}_{00}+{\left(-1\right)}^{\text{P}}{\text{A}}_{01}\text{J}+{\left(-1\right)}^{\text{P}}{\text{JA}}_{10}+{\text{JA}}_{11}\text{J}\right),$$
(B3)

First, we derive the \({\text{A}}^{\upphi }\) for the Hamiltonian with the periodic boundary condition, \({\text{A}}_{\text{periodic}}\left(\text{n}\right)={\text{A}}_{1}+{\text{A}}_{2}+{\text{A}}_{3}= 2{\text{I}}^{\otimes \text{n}}-{\text{I}}^{\otimes \text{n}-1}\otimes \text{X}-{\text{B}}_{\text{P}}\)(n) in Eq. (14) of main text. The first term of the Hamiltonian, \({\text{A}}_{1}= 2{\text{I}}^{\otimes \text{n}}\), is partitioned into \(\left(\begin{array}{cc}2{\text{I}}^{\otimes \text{n}-1}& 0\\ 0& 2{\text{I}}^{\otimes \text{n}-1}\end{array}\right)\), and it is trivial to show that

$${\text{A}}_{1}^{\upphi }= \frac{1}{2}\left(2{\text{I}}^{\otimes \text{n}-1}+2{\text{JI}}^{\otimes \text{n}-1}\text{J}\right).$$

\({\text{A}}_{2}= {\text{I}}^{\otimes \text{n}-1}\otimes \text{X}\) is partitioned into \(\left(\begin{array}{cc}{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}& 0\\ 0& {\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\end{array}\right)\), and

$${\text{A}}_{2}^{\upphi }= \frac{1}{2}({\text{I}}^{\otimes \text{n}-2}\otimes \text{X}+\text{J}{[\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]\text{J}).$$

The shift operation \({\text{P}}_{\text{n}}\in {\mathbb{R}}^{{2}^{\text{n}}\times {2}^{\text{n}}}\) in Eq. (20) of main text is partitioned into \(\left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}& {\text{R}}_{\text{n}-1} \\ {\text{R}}_{\text{n}-1} & {\text{Q}}_{\text{n}-1}\end{array}\right)\), where \({\text{Q}}_{\text{n}-1}\in {\mathbb{R}}^{{2}^{\text{n}-1} \times {2}^{\text{n}-1}}\) and \({\text{R}}_{\text{n}-1}\in {\mathbb{R}}^{{2}^{\text{n}-1} \times {2}^{\text{n}-1}}\) is given by,

$${\text{Q}}_{\text{n}-1}= \left(\begin{array}{cc}\begin{array}{ccc}0& 0& \dots \\ 1& 0& \dots \\ 0& 1& \dots \end{array}& \begin{array}{ccc}0& 0& 0\\ 0& 0& 0\\ 0& 0& 0\end{array}\\ \begin{array}{ccc}\dots & \dots & \dots \\ 0& 0& \dots \\ 0& 0& \dots \end{array}& \begin{array}{ccc}\dots & \dots & \dots \\ 1& 0& 0\\ 0& 1& 0\end{array}\end{array}\right), {\text{R}}_{\text{n}-1}= \left(\begin{array}{cc}\begin{array}{ccc}0& 0& \dots \\ 0& 0& \dots \\ 0& 0& \dots \end{array}& \begin{array}{ccc}0& 0& 1\\ 0& 0& 0\\ 0& 0& 0\end{array}\\ \begin{array}{ccc}\dots & \dots & \dots \\ 0& 0& \dots \\ 0& 0& \dots \end{array}& \begin{array}{ccc}\dots & \dots & \dots \\ 0& 0& 0\\ 0& 0& 0\end{array}\end{array}\right),$$

respectively. Therefore, \({\text{A}}_{3}={\text{P}}_{\text{n}}^{-1}\left({\text{I}}^{\otimes \text{n}-1}\otimes \text{X}\right){\text{P}}_{\text{n}}\) can be partitioned into

$${\text{A}}_{3}= \left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}^{\text{T}}& {\text{R}}_{\text{n}-1}^{\text{T}}\\ {\text{R}}_{\text{n}-1}^{\text{T}}& {\text{Q}}_{\text{n}-1}^{\text{T}}\end{array}\right)\left(\begin{array}{cc}{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}& 0\\ 0& {\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\end{array}\right)\left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}& {\text{R}}_{\text{n}-1} \\ {\text{R}}_{\text{n}-1} & {\text{Q}}_{\text{n}-1}\end{array}\right)= \left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{Q}}_{\text{n}-1}+{\text{R}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{R}}_{\text{n}-1}& {\text{Q}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{R}}_{\text{n}-1}+{\text{R}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{Q}}_{\text{n}-1}\\ {\text{Q}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{R}}_{\text{n}-1}+{\text{R}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{Q}}_{\text{n}-1}& {\text{Q}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{Q}}_{\text{n}-1}+{\text{R}}_{\text{n}-1}^{\text{T}}[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}]{\text{R}}_{\text{n}-1}\end{array}\right).$$

By using \({\text{Q}}_{\text{n}-1}={\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\), the (0,0) component of \({\text{A}}_{3}\) is given by,

$${\text{A}}_{3}\left(\text{0,0}\right)=\left({\text{P}}_{\text{n}-1}^{\text{T}}-{\text{R}}_{\text{n}-1}^{\text{T}}\right)\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]\left({\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\right)+{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}= {\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}-{\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}+{2\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}.$$

Each term in the above equation is simplified by,

$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}={\text{D}}_{\text{A}},$$
$${\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}={\text{D}}_{\text{A}}^{\text{T}},$$
$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}=0,$$

where,

$${\text{D}}_{\text{A}}= \left(\begin{array}{cc}\begin{array}{ccc}0& 0& \dots \\ 0& 0& \dots \\ 0& 0& \dots \end{array}& \begin{array}{ccc}0& 0& 0\\ 0& 0& 0\\ 0& 0& 0\end{array}\\ \begin{array}{ccc}\dots & \dots & \dots \\ 0& 0& \dots \\ 1& 0& \dots \end{array}& \begin{array}{ccc}\dots & \dots & \dots \\ 0& 0& 0\\ 0& 0& 0\end{array}\end{array}\right).$$

The above calculation can be repeated for other terms in (B3),

$${\text{A}}_{3}\left(\text{0,1}\right)\text{J}= {\text{Q}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}+{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{Q}}_{\text{n}-1}\text{J}=\left({\text{P}}_{\text{n}-1}^{\text{T}}-{\text{R}}_{\text{n}-1}^{\text{T}}\right)\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}+{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]\left({\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\right)\text{J}.$$

Each term in the above equation is simplified by,

$${\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}={\text{D}}_{3},$$
$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}=0,$$
$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}\text{J}={\text{D}}_{2}-{\text{D}}_{3}.$$

\({\text{JA}}_{3}\left(1, 0\right)={\left({\text{A}}_{3}\left(0, 1\right)\text{J}\right)}^{\text{T}}\). \({\text{JA}}_{3}(\text{1,1})\text{J}\) is given by,

$${\text{JA}}_{3}\left(\text{1,1}\right)\text{J}={\text{JQ}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{Q}}_{\text{n}-1}\text{J}+{\text{JR}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}=\text{J}\left({\text{P}}_{\text{n}-1}^{\text{T}}-{\text{R}}_{\text{n}-1}^{\text{T}}\right)\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]\left({\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\right)\text{J}+ {\text{JR}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}$$

Each term in the above equation is simplified by,

$${\text{JR}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}\text{J}={\text{D}}_{\text{B}},$$
$${\text{JP}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}={\text{D}}_{\text{B}}^{\text{T}},$$
$${\text{JR}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}=0,$$

where,

$${\text{D}}_{\text{B}}= \left(\begin{array}{cc}\begin{array}{ccc}0& 0& \dots \\ 0& 0& \dots \\ 0& 0& \dots \end{array}& \begin{array}{ccc}0& 0& 1\\ 0& 0& 0\\ 0& 0& 0\end{array}\\ \begin{array}{ccc}\dots & \dots & \dots \\ 0& 0& \dots \\ 0& 0& \dots \end{array}& \begin{array}{ccc}\dots & \dots & \dots \\ 0& 0& 0\\ 0& 0& 0\end{array}\end{array}\right).$$

By above calculations, \({\text{A}}_{3}^{\upphi }\) is given by,

$${\text{A}}_{3}^{\upphi }= \frac{1}{2}\left({\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}-{\text{D}}_{1}+{\left(-1\right)}^{\text{P}}{(\text{D}}_{2}+{\text{D}}_{2}^{\text{T}})+{\text{JP}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}\text{J}-{\text{D}}_{1}\right)= \frac{1}{2}\left({\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}+ {\text{JP}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}\text{J}\right)-{\text{D}}_{1}+{\left(-1\right)}^{\text{P}}{\text{D}}_{2}$$

In summary of the above calculation results,

$${\text{A}}_{\text{periodic}}^{\upphi }={\text{A}}_{1}^{\upphi }+{\text{A}}_{2}^{\upphi }+{\text{A}}_{3}^{\upphi }= \frac{1}{2}\left(2{\text{I}}^{\otimes \text{n}-1}+2{\text{JI}}^{\otimes \text{n}-1}\text{J}-{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}-\text{J}{[\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]\text{J}- {\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}- {\text{JP}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}\text{J})+{\text{D}}_{1}-{\left(-1\right)}^{\text{P}}{\text{D}}_{2}= \frac{1}{2}\left(2{\text{I}}^{\otimes \text{n}-1}- {\text{I}}^{\otimes \text{n}-2}\otimes \text{X}- {\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}\right)+ \frac{1}{2}\text{J}\left(2{\text{I}}^{\otimes \text{n}-1}- {\text{I}}^{\otimes \text{n}-2}\otimes \text{X}- {\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}\right)\text{J}+{\text{D}}_{1}-{\left(-1\right)}^{\text{P}}{\text{D}}_{2}= \frac{1}{2}{\text{A}}_{\text{periodic}}^{\text{u}}\left(\text{n}-1\right)+\text{ J}(\frac{1}{2}{\text{A}}_{\text{periodic}}^{\text{u}}\left(\text{n}-1\right))\text{J}+{\text{D}}_{1}-{\left(-1\right)}^{\text{P}}{\text{D}}_{2},$$

which is the Eq. (30) in the main text.

In a similar manner, we can derive \({\text{A}}^{\upphi }\) for the Hamiltonian with the Dirichlet boundary condition, \({\text{A}}_{\text{Dirichlet}}(\text{n})={\text{A}}_{\text{periodic}}+{\text{B}}_{\text{D}}(\text{n})\), by performing the aforementioned calculations again for \({\text{B}}_{\text{D}}(\text{n})\). \({\text{B}}_{\text{D}}\left(\text{n}\right)={\text{P}}_{\text{n}}^{-1}\left({\text{I}}_{0}^{\otimes \text{n}-1}\otimes \text{X}\right){\text{P}}_{\text{n}}\) can be partitioned into

$${\text{B}}_{\text{D}}\left(\text{n}\right)= \left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}^{\text{T}}& {\text{R}}_{\text{n}-1}^{\text{T}}\\ {\text{R}}_{\text{n}-1}^{\text{T}}& {\text{Q}}_{\text{n}-1}^{\text{T}}\end{array}\right)\left(\begin{array}{cc}{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}& 0\\ 0& 0\end{array}\right)\left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}& {\text{R}}_{\text{n}-1} \\ {\text{R}}_{\text{n}-1} & {\text{Q}}_{\text{n}-1}\end{array}\right)= \left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{Q}}_{\text{n}-1}& {\text{Q}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\\ {\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{Q}}_{\text{n}-1}& {\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\end{array}\right).$$

By using \({\text{Q}}_{\text{n}-1}={\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\), the (0,0) component of \({\text{B}}_{\text{D}}(\text{n})\) is given by,

$${\text{B}}_{\text{D}}\left(\text{n}\right)\left(0, 0\right)=\left({\text{P}}_{\text{n}-1}^{\text{T}}-{\text{R}}_{\text{n}-1}^{\text{T}}\right)\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]\left({\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\right)= {\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}-{\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}+{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}.$$

Each term in the above equation is simplified by,

$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{P}}_{\text{n}-1}={\text{D}}_{\text{A}},$$
$${\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}={\text{D}}_{\text{A}}^{\text{T}},$$
$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}=0.$$

\({\text{B}}_{\text{D}}\left(\text{n}\right)\left(0, 1\right)\text{J}\) is given by,

$${\text{B}}_{\text{D}}\left(\text{n}\right)\left(\text{0,1}\right)\text{J}= {\text{Q}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}=\left({\text{P}}_{\text{n}-1}^{\text{T}}-{\text{R}}_{\text{n}-1}^{\text{T}}\right)\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}$$

Each term in the above equation is simplified by,

$${\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}={\text{D}}_{3},$$
$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}=0.$$

\({\text{JB}}_{\text{D}}\left(\text{n}\right)\left(1, 0\right)={\left({\text{B}}_{\text{D}}\left(\text{n}\right)\left(0, 1\right)\text{J}\right)}^{\text{T}}\). \({\text{JB}}_{\text{D}}\left(\text{n}\right)(\text{1,1})\text{J}\) is given by,

$${\text{JB}}_{\text{D}}\left(\text{n}\right)\left(\text{1,1}\right)\text{J}={\text{JR}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{X}\right]{\text{R}}_{\text{n}-1}\text{J}=0.$$

By above calculations, \({\text{B}}_{\text{D}}^{\upphi }(\text{n})\) is given by,

$$ {\text{B}}_{{\text{D}}}^{\upphi } \left( {\text{n}} \right) = \frac{1}{2}\left( {{\text{P}}_{{{\text{n}} - 1}}^{{\text{T}}} \left[ {{\text{I}}_{0}^{{ \otimes {\text{n}} - 2}} \otimes {\text{X}}} \right]{\text{P}}_{{{\text{n}} - 1}} - {\text{D}}_{{\text{A}}} - {\text{D}}_{{\text{A}}}^{{\text{T}}} + \left( { - 1} \right)^{{\text{P}}} {\text{D}}_{3} + \left( { - 1} \right)^{{\text{P}}} {\text{D}}_{3}^{{\text{T}}} } \right) = \frac{1}{2}\left( {{\text{P}}_{{{\text{n}} - 1}}^{{\text{T}}} \left[ {{\text{I}}_{0}^{{ \otimes {\text{n}} - 2}} \otimes {\text{X}}} \right]{\text{P}}_{{{\text{n}} - 1}} - {\text{D}}_{1} + \left( { - 1} \right)^{{\text{P}}} 2{\text{D}}_{3} } \right) = \frac{1}{2}\left( {{\text{P}}_{{{\text{n}} - 1}}^{{\text{T}}} \left[ {{\text{I}}_{0}^{{ \otimes {\text{n}} - 2}} \otimes {\text{X}}} \right]{\text{P}}_{{{\text{n}} - 1}} - {\text{D}}_{1} } \right) + \left( { - 1} \right)^{{\text{P}}} {\text{D}}_{3} = \frac{1}{2}{\text{B}}_{{\text{D}}} \left( {{\text{n}} - 1} \right) - \frac{1}{2}{\text{D}}_{1} + \left( { - 1} \right)^{{\text{P}}} {\text{D}}_{3} . $$

In summary of the above calculation results,

$${\text{A}}_{\text{Dirichlet}}^{\upphi }={\text{A}}_{\text{periodic}}^{\upphi }+{\text{B}}_{\text{D}}^{\upphi }\left(\text{n}\right)={\text{A}}_{\text{periodic}}^{\upphi }+ \frac{1}{2}{\text{B}}_{\text{D}}\left(\text{n}-1\right)-\frac{1}{2}{\text{D}}_{1}+{\left(-1\right)}^{\text{P}}{\text{D}}_{3},$$

which is Eq. (31) in the main text.

In a similar manner, we can derive \({\text{A}}^{\upphi }\) for the Hamiltonian with the Neumann boundary condition, \({\text{A}}_{\text{Neumann}}\left(\text{n}\right)={\text{A}}_{\text{periodic}}+{\text{B}}_{\text{D}}\left(\text{n}\right)-{\text{B}}_{\text{N}}(\text{n})\), by performing the aforementioned calculations again for \({\text{B}}_{\text{N}}\left(\text{n}\right)\). \({\text{B}}_{\text{N}}\left(\text{n}\right)={\text{P}}_{\text{n}}^{-1}\left({\text{I}}_{0}^{\otimes \text{n}-1}\otimes \text{I}\right){\text{P}}_{\text{n}}\) can be partitioned into

$${\text{B}}_{\text{N}}(\text{n})= \left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}^{\text{T}}& {\text{R}}_{\text{n}-1}^{\text{T}}\\ {\text{R}}_{\text{n}-1}^{\text{T}}& {\text{Q}}_{\text{n}-1}^{\text{T}}\end{array}\right)\left(\begin{array}{cc}{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}& 0\\ 0& 0\end{array}\right)\left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}& {\text{R}}_{\text{n}-1} \\ {\text{R}}_{\text{n}-1} & {\text{Q}}_{\text{n}-1}\end{array}\right)= \left(\begin{array}{cc}{\text{Q}}_{\text{n}-1}^{\text{T}}[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}]{\text{Q}}_{\text{n}-1}& {\text{Q}}_{\text{n}-1}^{\text{T}}[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}]{\text{R}}_{\text{n}-1}\\ {\text{R}}_{\text{n}-1}^{\text{T}}[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}]{\text{Q}}_{\text{n}-1}& {\text{R}}_{\text{n}-1}^{\text{T}}[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}]{\text{R}}_{\text{n}-1}\end{array}\right)$$

By using \({\text{Q}}_{\text{n}-1}={\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\), the (0,0) component of \({\text{B}}_{\text{N}}(\text{n})\) is given by,

$${\text{B}}_{\text{N}}\left(\text{n}\right)\left(0, 0\right)=\left({\text{P}}_{\text{n}-1}^{\text{T}}-{\text{R}}_{\text{n}-1}^{\text{T}}\right)\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]\left({\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}\right)= {\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{P}}_{\text{n}-1}-{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{P}}_{\text{n}-1}-{\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}+{\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}.$$

Each term in the above equation is simplified by,

$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{P}}_{\text{n}-1}={\text{D}}_{3}-{\text{D}}_{4},$$
$${\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}={\text{D}}_{3}^{\text{T}}-{\text{D}}_{4}^{\text{T}}={\text{D}}_{3}-{\text{D}}_{4},$$
$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}={\text{D}}_{3}-{\text{D}}_{4}.$$

\({\text{B}}_{\text{N}}\left(\text{n}\right)\left(0, 1\right)\text{J}\) is given by,

$${\text{B}}_{\text{N}}\left(\text{n}\right)\left(\text{0,1}\right)\text{J}= {\text{Q}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}\text{J}=\left({\text{P}}_{\text{n}-1}^{\text{T}}-{\text{R}}_{\text{n}-1}^{\text{T}}\right)\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}\text{J}$$

Each term in the above equation is simplified by,

$${\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}\text{J}={\text{D}}_{\text{A}},$$
$${\text{R}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}\text{J}={\text{D}}_{\text{A}}.$$

\({\text{JB}}_{\text{N}}\left(\text{n}\right)\left(1, 0\right)={\left({\text{B}}_{\text{N}}\left(\text{n}\right)\left(0, 1\right)\text{J}\right)}^{\text{T}}\). \({\text{JB}}_{\text{N}}\left(\text{n}\right)(\text{1,1})\text{J}\) is given by,

$${\text{JB}}_{\text{N}}\left(\text{n}\right)\left(\text{1,1}\right)\text{J}={\text{JR}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{R}}_{\text{n}-1}\text{J}={\text{D}}_{3}.$$

By above calculations, \({\text{B}}_{\text{N}}^{\upphi }(\text{n})\) is given by,

$${\text{B}}_{\text{N}}^{\upphi }\left(\text{n}\right)=\frac{1}{2}\left({\text{P}}_{\text{n}-1}^{\text{T}}\left[{\text{I}}_{0}^{\otimes \text{n}-2}\otimes \text{I}\right]{\text{P}}_{\text{n}-1}+{\text{D}}_{4}+{\left(-1\right)}^{\text{P}}2{\text{D}}_{1}\right)= \frac{1}{2}{\text{B}}_{\text{N}}^{\upphi }\left(\text{n}-1\right)+\frac{1}{2}{\text{D}}_{4}$$

In summary of the above calculation results,

$${\text{A}}_{\text{Neumann}}^{\upphi }={\text{A}}_{\text{periodic}}^{\upphi }+{\text{B}}_{\text{D}}^{\upphi }\left(\text{n}\right)-{\text{B}}_{\text{N}}^{\upphi }\left(\text{n}\right)={\text{A}}_{\text{periodic}}^{\upphi }+ \frac{1}{2}{\text{B}}_{\text{D}}\left(\text{n}-1\right)-\frac{1}{2}{\text{D}}_{1}+{\left(-1\right)}^{\text{P}}{\text{D}}_{3}-\frac{1}{2}{\text{B}}_{\text{N}}\left(\text{n}-1\right)-\frac{1}{2}{\text{D}}_{4},$$

which is Eq. (32) in the main text. □

Appendix D: Expectation value calculation using different machine

Here, we present the results of the expectation value calculation for the ground state and the excited states of the Helmholtz equation using various hardware from IBM Quantum systems. Figures 

Fig. 15
figure 15

Energy expectation values for the ground state and excited states of the Helmholtz equation using various hardware are shown for 8-node FDM. The height of the bar represents the mean, and the error bar indicates the standard deviation of repeated calculations. The dashed horizontal lines show the exact value obtained by classical algorithm

15,

Fig. 16
figure 16

Energy expectation values for the ground state and excited states of the Helmholtz equation using various hardware are shown for 16-node FDM. The height of the bar represents the mean, and the error bar indicates the standard deviation of repeated calculations. The dashed horizontal lines show the exact value obtained by classical algorithm

16 and

Fig. 17
figure 17

Energy expectation values for the ground state and excited states of the Helmholtz equation using various hardware are shown for 32-node FDM. The height of the bar represents the mean, and the error bar indicates the standard deviation of repeated calculations. The dashed horizontal lines show the exact value obtained by classical algorithm

17 are result of the 8, 16, and 32-node FDM, respectively, and correspond to Fig. 4 in the main text.

Appendix E: Qubit map and calibration data of ibmq_mumbai

Figure 18 shows the qubit map of the ibmq_mumbai. The calibration data of ibmq_mumbai is tabulated in Table 

Fig. 18
figure 18

Qubit map of ibmq_mumbai

Table 2 Calibration data of ibmq_mumbai

2.

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

Bae, J., Yoo, G., Nakamura, S. et al. Hardware efficient decomposition of the Laplace operator and its application to the Helmholtz and the Poisson equation on quantum computer. Quantum Inf Process 23, 270 (2024). https://doi.org/10.1007/s11128-024-04458-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11128-024-04458-y

Keywords

Navigation