This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Quantum algorithm for calculation of transition amplitudes in hybrid tensor networks

Shu Kanno [email protected] Department of Materials Science and Engineering, Tokyo Institute of Technology, 2-12-1 O-okayama, Meguro-ku, Tokyo 152-8552, Japan    Suguru Endo [email protected] NTT Secure Platform Laboratories, NTT Corporation, Musashino 180-8585, Japan JST, PRESTO, 4-1-8 Honcho, Kawaguchi, Saitama, 332-0012, Japan    Yasunari Suzuki NTT Secure Platform Laboratories, NTT Corporation, Musashino 180-8585, Japan JST, PRESTO, 4-1-8 Honcho, Kawaguchi, Saitama, 332-0012, Japan    Yuuki Tokunaga NTT Secure Platform Laboratories, NTT Corporation, Musashino 180-8585, Japan
Abstract

The hybrid tensor network approach allows us to perform calculations on systems larger than the scale of a quantum computer. However, when calculating transition amplitudes, there is a problem that the number of terms to be measured increases exponentially with that of the contracted operators. The problem is caused by the fact that the contracted operators are represented as non-Hermitian operators. In this study, we propose a method for the hybrid tensor network calculation that contracts non-Hermitian operators without an exponential increase in the number of terms. In the proposed method, transition amplitudes are calculated by combining the singular value decomposition of the contracted non-Hermitian operators with a Hadamard test. The method significantly extends the applicability of the hybrid tensor network approach.

I introduction

Quantum computers are expected to be capable of executing classically intractable calculations [1, 2, 3, 4, 5, 6, 7, 8]. It has been reported that quantum computers can outperform classical computers in some tasks [9, 10, 11]. However, quantum resource limitations are obstacles to the practical application of quantum computers. Current quantum computers are so-called noisy intermediate-scale quantum (NISQ) devices [12], and we can control only tens to hundreds of noisy qubits on them [13, 14, 15, 4, 16, 17, 18]. Their hardware limitation makes it difficult to apply quantum computers to practical tasks that require large numbers of qubits or deep quantum circuits [19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31].

The hybrid tensor network approach has recently been proposed to overcome the limitations of NISQ devices  [19]. The approach enables the treatment of a larger number of quantum states than the number of qubits of actual quantum devices by representing quantum states as a combination of conventional classical tensors and quantum tensors. A quantum tensor has upper and lower indices, for example, ψi1,i2iKj1,j2jL\psi_{i_{1},i_{2}\dots i_{K}}^{j_{1},j_{2}\dots j_{L}}, which represents KK-qubit systems indexed by an LL-bit string. In other words, the quantum state is defined in terms of LL classical bits (j1,j2,,jL)(j_{1},j_{2},\dots,j_{L}) as

|ψj1,j2,jL=i1,i2,,iKψi1,i2,,iKj1,j2,,jL|i1i2iK,\displaystyle\ket{\psi^{j_{1},j_{2},\dots j_{L}}}=\sum_{i_{1},i_{2},\dots,i_{K}}\psi_{i_{1},i_{2},\dots,i_{K}}^{j_{1},j_{2},\dots,j_{L}}\ket{i_{1}i_{2}\dots i_{K}}, (1)

where ψi1,i2,,iKj1,j2,,jL\psi_{i_{1},i_{2},\dots,i_{K}}^{j_{1},j_{2},\dots,j_{L}}\in\mathbb{C}, i1,i2,,iK|ψi1,i2,,iKj1,j2,,jL|2=1\sum_{i_{1},i_{2},\dots,i_{K}}|\psi_{i_{1},i_{2},\dots,i_{K}}^{j_{1},j_{2},\dots,j_{L}}|^{2}=1, and |i1i2iK\ket{i_{1}i_{2}\dots i_{K}} is a computational basis of the KK-qubit Hilbert space. One of the most vital forms of the hybrid tensor network is the hybrid tree-tensor network, where a network of quantum and classical tensors composes a tree graph. While contraction of general hybrid tensor networks can be costly, hybrid tree-tensor networks can be contracted efficiently to obtain expectation values [19]. In this paper, we mainly discuss a two-layer hybrid tree-tensor network with only quantum tensors, which is called a quantum-quantum tree-tensor network, since it captures the essential properties of hybrid tree-tensor networks and the use of classical tensors restricts the range of representation to classically tractable quantum states such as matrix product states [32]. A quantum-quantum tree-tensor network that expresses kk subsystems of nn-qubit states is represented as

|ψHT=i1,i2,,ikψi1,i2,,ik|φi1|φi2|φik,\displaystyle\ket{\psi_{HT}}=\sum_{i_{1},i_{2},\dots,i_{k}}\psi_{i_{1},i_{2},\dots,i_{k}}\ket{\varphi^{i_{1}}}\otimes\ket{\varphi^{i_{2}}}\otimes\dots\otimes\ket{\varphi^{i_{k}}}, (2)

where |ψHT\ket{\psi_{HT}} is the unnormalized state, ψi1,i2,,ik=i1i2ik|ψ\psi_{i_{1},i_{2},\dots,i_{k}}=\braket{i_{1}i_{2}\dots i_{k}}{\psi} is the probability amplitude of a kk-qubit state |ψ\ket{\psi}, and |φim(m=1,2,,k)\ket{\varphi^{i_{m}}}(m=1,2,\dots,k) is an nn-qubit state of the mm-th subsystem indexed by a classical bit imi_{m}. Figure 1 shows the network diagram of |ψHT\ket{\psi_{HT}}. While the state |ψHT\ket{\psi_{HT}} represents a knkn-qubit state, we can efficiently calculate the expectation value of an observable O=m=1kOmO=\bigotimes_{m=1}^{k}O_{m}, where OmO_{m} operates on |φim\ket{\varphi^{i_{m}}} via proper tensor contractions, using a quantum computer with O(max(k,n))O(\max(k,n)) qubits. The contraction for evaluating the expectation value O=ψHT|O|ψHT\braket{O}=\bra{\psi_{HT}}O\ket{\psi_{HT}} (without normalization) can be implemented as follows. First, we measure OmO_{m} with multiple states and construct operators Mmimim=φim|Om|φimM_{m}^{i^{\prime}_{m}i_{m}}=\bra{\varphi^{i^{\prime}_{m}}}O_{m}\ket{\varphi^{i_{m}}}. Note that each MmM_{m} is a 2×22\times 2 Hermitian matrix when OmO_{m} is Hermitian. Then, since MmM_{m} is Hermitian, we can measure the expectation value of m=1kMm\bigotimes_{m=1}^{k}M_{m} for the state |ψ\ket{\psi}, which is equal to O\braket{O}.

Refer to caption
Figure 1: A quantum-quantum tree-tensor network as in Eq. (2). φj1,j2,,jnim\varphi_{j_{1},j_{2},\dots,j_{n}}^{i_{m}} is defined as j1j2jn|φim\braket{j_{1}j_{2}\dots j_{n}}{\varphi^{i_{m}}}. In a quantum-classical tree-tensor network, ψi1,i2,,ik\psi_{i_{1},i_{2},\dots,i_{k}} is replaced with a classical tensor, while in a classical-quantum tree-tensor network, classical tensors are used in place of φj1,j2,,jnim\varphi_{j_{1},j_{2},\dots,j_{n}}^{i_{m}}.

The approach allows for simulations beyond the scale of the quantum hardware. For example, the energy and spin-spin correlation functions of electrons can be calculated with this approach. However, the approach has a serious problem preventing it from being used in a range of applications: it can only calculate the expectation value of observables. In other words, there is a problem in the approach when the contracted operator MmM_{m} is non-Hermitian. Hereinafter, we denote the Hermitian and non-Hermitian contracted operators as MmM_{m} and NmN_{m}, respectively. The reason for the problem is that the number of terms to be measured increases exponentially with kk when m=1kNm\bigotimes_{m=1}^{k}N_{m} is calculated naively. Specifically, non-Hermitian operators are decomposed into sums of Pauli operators, as in m=1kNm=m=1k(hImIm+hXmXm+hYmYm+hZmZm)\bigotimes_{m=1}^{k}N_{m}=\bigotimes_{m=1}^{k}(h_{Im}I_{m}+h_{Xm}X_{m}+h_{Ym}Y_{m}+h_{Zm}Z_{m}), where ImI_{m} is the identity operator, XmX_{m}, YmY_{m}, and ZmZ_{m} are Pauli operators which act on the mm-th qubit, and hα(α{Im,Xm,Ym,Zm})h_{\alpha}(\alpha\in\{I_{m},X_{m},Y_{m},Z_{m}\}) are the corresponding coefficients, with up to 4k4^{k} terms appearing. One example where the problem occurs is in the calculation of the transition amplitude related to Green’s functions and photon emissions/absorptions [33, 34]. Overlap of two quantum states, which is exploited in subroutines in many algorithms [35, 36, 37, 38], is a special case of the transition amplitude. Thus, the difficulty of computing the expectation value of a non-Hermitian operator limits the applicability of the hybrid tensor network approach.

In this study, we propose a method for calculating transition amplitudes with the hybrid tensor network approach. The main point of the method is the treatment of tensor products of non-Hermitian operators. In a naive calculation, an exponential number of terms in m=1kNm\bigotimes_{m=1}^{k}N_{m} will appear. We propose two ways to avoid the problem. One is a Monte-Carlo contraction method and the other is a singular value decomposition (SVD) contraction method, and the second method is the main proposal in this paper. Although the first method can avoid having to measure all the terms whose number increases exponentially with kk, the second method is exponentially more efficient than the first one in terms of the sampling cost.

In the following, we give an overview of quantum-quantum tree-tensor networks [19] for obtaining the expectation values of observables in Sec. II. Then, the method of calculating transition amplitudes and overlaps is described in Sec. III; the contraction of quantum tensors in subsystems is discussed in Sec. III.1 and the contraction of non-Hermitian matrices in Sec. III.2. We discuss the future applications of the method in Sec. IV.

II Overview of the hybrid tensor network

We present an overview of the hybrid tensor network simulation on the state described by Eq. (2) introduced in Ref. [19]. Letting the observable OO be O=m=1kOmO=\bigotimes_{m=1}^{k}O_{m} and Om=r=1nOmrO_{m}=\bigotimes_{r=1}^{n}O_{mr} (r=1,2,,nr=1,2,\dots,n), the expectation value of the observable including the normalization constant can be described as

O\displaystyle\braket{O} =1A2ψHT|O|ψHT\displaystyle=\frac{1}{A^{2}}\bra{\psi_{HT}}O\ket{\psi_{HT}} (3)
=1A2iiψiψim=1kMmimim\displaystyle=\frac{1}{A^{2}}\sum_{\vec{i}^{\prime}~{}\vec{i}}\psi_{\vec{i}^{\prime}}^{*}\psi_{\vec{i}}\prod_{m=1}^{k}M_{m}^{i_{m}^{\prime}i_{m}}

and

A\displaystyle A =ψHT|ψHT\displaystyle=\sqrt{\braket{\psi_{HT}}{\psi_{HT}}} (4)
=iiψiψim=1kMAmimim,\displaystyle=\sqrt{\sum_{\vec{i}^{\prime}~{}\vec{i}}\psi_{\vec{i}^{\prime}}^{*}\psi_{\vec{i}}\prod_{m=1}^{k}M_{Am}^{i_{m}^{\prime}i_{m}}},

where AA is a normalization constant, i=(i1,i2,,ik)\vec{i}=(i_{1},i_{2},\dots,i_{k}) with imi_{m} taking either 0 or 11, Mmimim=φim|Om|φimM_{m}^{i_{m}^{\prime}i_{m}}=\bra{\varphi^{i_{m}^{\prime}}}O_{m}\ket{\varphi^{i_{m}}}, and MAmimim=φim|φimM_{Am}^{i_{m}^{\prime}i_{m}}=\braket{\varphi^{i_{m}^{\prime}}}{\varphi^{i_{m}}}. MmimimM_{m}^{i_{m}^{\prime}i_{m}} (MAmimimM_{Am}^{i_{m}^{\prime}i_{m}}) is an element of the 2×22\times 2 matrix MmM_{m} (MAmM_{Am}). When OmO_{m} is assumed to be an observable, i.e., a Hermitian operator, MmM_{m} also becomes a Hermitian operator. MAmM_{Am} is a Hermitian operator since MAmM_{Am} is a special case of Om=ImO_{m}=I_{m} in MmM_{m}, where ImI_{m} is the identity operator.

The procedure for constructing MmM_{m} and MAmM_{Am} depends on how the indices imi_{m} of the wave function |φim\ket{\varphi^{i_{m}}} are mapped. We suppose there are two cases of the mapping; one case is where the indices imi_{m} are mapped to unitary gates, i.e., |φim=UCmim|0n\ket{\varphi^{i_{m}}}=U_{Cm}^{i_{m}}\ket{0}^{\otimes n}; the other case is where the indices imi_{m} are mapped to the initial wave function as |φim=UCm|im|0n1\ket{\varphi^{i_{m}}}=U_{Cm}\ket{{i_{m}}}\ket{0}^{\otimes n-1}, where UCmimU_{Cm}^{i_{m}} and UCmU_{Cm} are unitary operators with polynomial depth in the mm-th subsystem. The second case can be regarded as a special example of the first case, since |φim=UCm|im|0n1=UCm(X1)im|0n\ket{\varphi^{i_{m}}}=U_{Cm}\ket{{i_{m}}}\ket{0}^{\otimes n-1}=U_{Cm}(X_{1})^{i_{m}}\ket{0}^{\otimes n} and we can think of UCm(X1)imU_{Cm}(X_{1})^{i_{m}} as UCmimU_{Cm}^{i_{m}}, where X1X_{1} is a Pauli XX operator which acts on the first qubit. Note that the first method needs a Hadamard test circuit while MmM_{m} and MAmM_{Am} can be efficiently constructed via direct measurements in the second case, as will be described later.

First, we consider the construction of MmM_{m} in the case of |φim=UCmim|0n\ket{\varphi^{i_{m}}}=U_{Cm}^{i_{m}}\ket{0}^{\otimes n}. Since the procedure for measuring the diagonal elements is relatively straightforward, we will focus on the measurement of the non-diagonal elements. Figure 2(a) shows a quantum circuit to obtain the matrix element MmimimM_{m}^{i_{m}^{\prime}i_{m}}. The procedure for constructing MmM_{m} is as follows. First, we prepare initial states. We use a Hadamard test to prepare |φim=UCmim|0n\ket{\varphi^{i_{m}^{\prime}}}=U_{Cm}^{i_{m}^{\prime}}\ket{0}^{\otimes n} and |φim=UCmim|0n\ket{\varphi^{i_{m}}}=U_{Cm}^{i_{m}}\ket{0}^{\otimes n}. The ancilla qubit is initialized to |0+eiα|12\frac{\ket{0}+e^{i\alpha}\ket{1}}{\sqrt{2}}, where α\alpha is the phase. We set α=0\alpha=0 (α=π2\alpha=\frac{\pi}{2}) to obtain the real (imaginary) part of MmimimM_{m}^{i_{m}^{\prime}i_{m}}. Since MmM_{m} is a Hermitian matrix, only measurements of Re(Mm01)\mathrm{Re}(M_{m}^{01}), and Im(Mm01)\mathrm{Im}(M_{m}^{01}) are required. Then, we measure on a computational basis. We use the fact that OmrO_{mr} is a Hermitian operator and has a spectral decomposition: Omr=UmrDmrUmrO_{mr}=U_{mr}^{{\dagger}}D_{mr}U_{mr}, where UmrU_{mr} is a unitary matrix and DmrD_{mr} is a diagonal matrix. Also, we assign elements of DmrD_{mr} to the measurement results. More concretely, denoting Dmr=diag[λjr=0(mr),λjr=1(mr)]D_{mr}=\mathrm{diag}[\lambda^{(mr)}_{j_{r}=0},\lambda^{(mr)}_{j_{r}=1}], the measured value is computed as r=1nλjr(mr)\prod_{r=1}^{n}\lambda^{(mr)}_{j_{r}} corresponding to the measured outcome j=(j1,j2,,jn)\vec{j}=(j_{1},j_{2},\dots,j_{n}).

Refer to caption
Figure 2: Quantum circuits for obtaining O\braket{O}. In (a) and (b), the topmost line represents an ancilla qubit and the other lines represent system qubits, and in (c) and (d), all lines represent system qubits. Real and imaginary components are obtained by setting α=0\alpha=0 and α=π2\alpha=\frac{\pi}{2}, respectively. A white (black) circle in a controlled gate means that the unitary operation is performed on the target qubits when the control qubit is |0\ket{0} (|1\ket{1}). (a) A quantum circuit to construct MmM_{m} in the case of |φim=UCmim|0n\ket{\varphi^{i_{m}}}=U_{Cm}^{i_{m}}\ket{0}^{\otimes n}. (b) A quantum circuit to construct MAmM_{Am} in the case of |φim=UCmim|0n\ket{\varphi^{i_{m}}}=U_{Cm}^{i_{m}}\ket{0}^{\otimes n}. (c) A quantum circuit to construct MmM_{m} in the case of |φim=UCm|im|0n1\ket{\varphi^{i_{m}}}=U_{Cm}\ket{{i_{m}}}\ket{0}^{\otimes n-1}. |am\ket{a_{m}} takes |0\ket{0}, |1\ket{1}, |+\ket{+} and |+y\ket{+y}. (d) A quantum circuit to measure MmM_{m} and MAmM_{Am}.

We explain how to construct MAmM_{Am}. Figure 2(b) shows the circuit to construct MAmM_{Am}. In the case of |φim=UCmim|0n\ket{\varphi^{i_{m}}}=U_{Cm}^{i_{m}}\ket{0}^{\otimes n}, since the |φim\ket{\varphi^{i_{m}}} are non-orthogonal to each other, we have A1A\neq 1. Therefore, MAmM_{Am} must be calculated. The circuit in Fig. 2(b) is a modified version of that in Fig. 2(a), except that system measurements are not necessary; we can construct MAmM_{Am} by using the same construction procedure as for MmM_{m}.

Next, we assume the case of |φim=UCm|im|0n1\ket{\varphi^{i_{m}}}=U_{Cm}\ket{{i_{m}}}\ket{0}^{\otimes n-1}. In this case, we can obtain all the elements of MmM_{m} only from the results of direct measurements. Figure 2(c) shows a quantum circuit to construct MmM_{m}. The initial states are set to |am|0n1\ket{a_{m}}\ket{0}^{\otimes n-1}, where |am\ket{a_{m}} takes four states as |0\ket{0}, |1\ket{1}, |+\ket{+} and |+y\ket{+y}. MmM_{m} can be obtained using the corresponding measurement results. Refer to Appendix A for the details of the procedure. Also, since |φim\ket{\varphi^{i_{m}}} is orthogonal, A=1A=1 and MAmM_{Am} does not have to be calculated.

Finally, we show the procedure to obtain ψHT|O|ψHT\bra{\psi_{HT}}O\ket{\psi_{HT}}, which can be implemented by contracting MmM_{m} and MAmM_{A_{m}}. Now, denoting |ψ=iψi|i=i1,i2,,ikψi1,i2,,ik|i1i2ik\ket{\psi}=\sum_{\vec{i}}\psi_{\vec{i}}\ket{\vec{i}}=\sum_{i_{1},i_{2},\dots,i_{k}}\psi_{i_{1},i_{2},\dots,i_{k}}\ket{i_{1}i_{2}\dots i_{k}}, we can rewrite Eq. (3) as

A2O\displaystyle A^{2}\braket{O} =ψ|m=1kMm|ψ\displaystyle=\bra{\psi}\bigotimes_{m=1}^{k}M_{m}\ket{\psi} (5)
=ψ|m=1kUmDmUm|ψ,\displaystyle=\bra{\psi}\bigotimes_{m=1}^{k}U_{m}^{\dagger}D_{m}U_{m}\ket{\psi},

where we have used the fact that MmM_{m} is a Hermitian operator and has a spectral decomposition, Mm=UmDmUmM_{m}=U_{m}^{{\dagger}}D_{m}U_{m}. Figure 2(d) shows a quantum circuit to measure MmM_{m}. Henceforth, we will assume |ψ=UM|0n\ket{\psi}=U_{M}\ket{0}^{\otimes n}, where UMU_{M} is a unitary operator with polynomial depth. We can compute A2OA^{2}\braket{O} by applying UmU_{m}, measuring in a computational basis, and assigning elements of DmD_{m} to the measurement results. More concretely, denoting Dm=diag[λim=0(m),λim=1(m)]D_{m}=\mathrm{diag}[\lambda^{(m)}_{i_{m}=0},\lambda^{(m)}_{i_{m}=1}], the measured value is computed as m=1kλim(m)\prod_{m=1}^{k}\lambda^{(m)}_{i_{m}} corresponding to the measured outcome i=(i1,i2,,ik)\vec{i}=(i_{1},i_{2},\dots,i_{k}). In a similar procedure, we can measure A2A^{2} by contracting MAmM_{A_{m}}; hence, we can obtain O\braket{O}.

III Calculation of transition amplitudes and overlaps

We describe the measurement of transition amplitudes with the hybrid tensor network approach. The difference from Sec. II is that we need to contract a non-Hermitian operator NmN_{m}.

Refer to caption
Figure 3: Quantum circuits for obtaining transition amplitudes and overlaps. In all the figures, the topmost line represents an ancilla qubit and the other lines represent system qubits. Real and imaginary components are obtained by setting α=0\alpha=0 and α=π2\alpha=\frac{\pi}{2}, respectively. A white (black) circle in a controlled gate means that a unitary operation is performed on the target qubits when the control qubit is |0\ket{0} (|1\ket{1}). (a) A quantum circuit to construct NmN_{m} for calculating transition amplitudes in the case of |φim(l)=UCmim(l)|0n\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{i_{m}(l)}\ket{0}^{\otimes n}. (b) A quantum circuit to construct NmN_{m} for calculating transition amplitudes in the case of |φim(l)=UCm(l)|im|0n1\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{(l)}\ket{{i_{m}}}\ket{0}^{\otimes n-1}. (c) A quantum circuit to construct NmN_{m} for calculating overlaps in the case of |φim(l)=UCmim(l)|0n\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{i_{m}(l)}\ket{0}^{\otimes n}. (d) A quantum circuit to construct NmN_{m} for calculating overlaps in the case of |φim(l)=UCm(l)|im|0n1\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{(l)}\ket{{i_{m}}}\ket{0}^{\otimes n-1}. (e) A quantum circuit to measure NmN_{m} for calculating transition amplitudes or overlaps.

III.1 Contraction of quantum tensors in subsystems

This section describes construction of NmN_{m} in the calculation of ψHT(1)|O|ψHT(2)\bra{\psi^{(1)}_{HT}}O\ket{\psi^{(2)}_{HT}} in the transition amplitudes and that of ψHT(1)|ψHT(2)\braket{\psi^{(1)}_{HT}}{{\psi^{(2)}_{HT}}} in the overlaps, where |ψHT(1)\ket{\psi_{HT}^{(1)}} and |ψHT(2)\ket{\psi^{(2)}_{HT}} are two different states represented by a quantum-quantum tensor network.

To begin with, we will consider the calculation of the transition amplitude because the overlap is a special case of O=IO=I in the transition amplitude, where II is the identity operator. We will comment on the overlap at the end of this section. The transition amplitude TT can be defined as

T\displaystyle T =1A(1)A(2)ψHT(1)|O|ψHT(2)\displaystyle=\frac{1}{A^{(1)}A^{(2)}}\bra{\psi_{HT}^{(1)}}O\ket{\psi_{HT}^{(2)}} (6)
=1A(1)A(2)iiψi(1)ψi(2)m=1kNmimim\displaystyle=\frac{1}{A^{(1)}A^{(2)}}\sum_{\vec{i}^{\prime}~{}\vec{i}}\psi_{\vec{i}^{\prime}}^{(1)*}\psi_{\vec{i}}^{(2)}\prod_{m=1}^{k}N_{m}^{i_{m}^{\prime}i_{m}}
=1A(1)A(2)ψ(1)|m=1kNm|ψ(2),\displaystyle=\frac{1}{A^{(1)}A^{(2)}}\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}},

where A(l)A^{(l)} (l=1,2)(l=1,2) is a normalization constant corresponding to |ψHT(l)\ket{\psi_{HT}^{(l)}}, i=(i1,i2,,ik)\vec{i}=(i_{1},i_{2},\dots,i_{k}), NmN_{m} is a 2×22\times 2 matrix with elements of Nmimim=φim(1)|Om|φim(2)N_{m}^{i_{m}^{\prime}i_{m}}=\bra{\varphi^{i_{m}^{\prime}(1)}}O_{m}\ket{\varphi^{i_{m}(2)}}, and |ψ(l)=iψi(l)|i=i1,i2,,ikψi1,i2,,ik(l)|i1i2ik\ket{\psi^{(l)}}=\sum_{\vec{i}}\psi_{\vec{i}}^{(l)}\ket{\vec{i}}=\sum_{i_{1},i_{2},\dots,i_{k}}\psi_{i_{1},i_{2},\dots,i_{k}}^{(l)}\ket{i_{1}i_{2}\dots i_{k}}. The notation is the same as in Eqs. (3), (4) and (5), except for the superscript (l)(l), which corresponds to |ψHT(l)\ket{\psi_{HT}^{(l)}}. The reason that NmN_{m} is a non-Hermitian matrix comes from the fact that (Nmimim)Nmimim(N_{m}^{i_{m}^{\prime}i_{m}})^{*}\neq N_{m}^{i_{m}i_{m}^{\prime}}. We will not discuss A(l)A^{(l)} in the following since the procedure for calculating A(l)A^{(l)} is the same as the one for AA in the previous section.

First, let us consider the case of |φim(l)=UCmim(l)|0n\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{i_{m}(l)}\ket{0}^{\otimes n}. Figure 3(a) shows the quantum circuit for constructing NmN_{m}. The flow of constructing NmN_{m} is similar to that of MmM_{m}. However, since NmN_{m} is a 2×22\times 2 non-Hermitian matrix with elements of complex numbers, eight types of measurement are required to construct NmN_{m}. Next, we consider the case of |φim(l)=UCm(l)|im|0n1\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{(l)}\ket{{i_{m}}}\ket{0}^{\otimes n-1}. Figure 3(b) shows a quantum circuit to obtain the matrix element NmimimN_{m}^{i_{m}^{\prime}i_{m}}. Specifically, the wave function is initialized by using one of the four types of unitary gates UinitU_{init} in the lower panel in Fig. 3(b) to prepare the initial states |im|0n1\ket{{i_{m}^{\prime}}}\ket{0}^{\otimes n-1} and |im|0n1\ket{{i_{m}}}\ket{0}^{\otimes n-1}. The subsequent process is the same as in the case of |φim(l)=UCmim(l)|0n\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{i_{m}(l)}\ket{0}^{\otimes n}.

When calculating the overlap SS, i.e., the case of O=IO=I in Eq. (6), only the circuits to construct NmN_{m} (Figs. 3(a) and (b)) differ from the cases of the transition amplitude. Figures 3(c) and (d) shows the circuits in the cases of |φim(l)=UCmim(l)|0n\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{i_{m}(l)}\ket{0}^{\otimes n} and |φim(l)=UCm(l)|im|0n1\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{(l)}\ket{{i_{m}}}\ket{0}^{\otimes n-1}, which are the same quantum circuits as in Figs. 3(a) and (b) except that the measurements of the system qubits are not involved. Note that although the calculation of the transition amplitude and the overlap requires the construction of non-Hermitian operators using the ancilla qubit in general, it can be circumvented in the calculation of the square of the overlap by using the destructive SWAP test [36] (Appendix B for details).

III.2 Contraction of non-Hermitian matrices

The next step is to calculate ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} for 2×22\times 2 non-Hermitian matrices NmN_{m}. We describe two methods of contraction: a Monte-Carlo contraction method and an SVD contraction method. In this section, we describe the SVD contraction method because it is exponentially more efficient than the Monte-Carlo contraction method in terms of the sampling cost. Refer to Appendixes C and D for details of the Monte-Carlo contraction method and the comparison of the two methods, respectively.

Now let us describe how to perform the SVD contraction method. We perform SVD Nm=BmDmCmN_{m}=B_{m}^{{\dagger}}D_{m}^{\prime}C_{m} for each NmN_{m}, that is, m=1kNm=m=1kBmDmCm\bigotimes_{m=1}^{k}N_{m}=\bigotimes_{m=1}^{k}B_{m}^{{\dagger}}D_{m}^{\prime}C_{m}, where BmB_{m} and CmC_{m} are unitary matrices and DmD_{m}^{\prime} is a diagonal matrix with non-negative elements. ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} can be described as

ψ(1)|m=1kNm|ψ(2)\displaystyle\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} (7)
=ψ(1)|m=1kBmDmCm|ψ(2)\displaystyle=\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}B_{m}^{{\dagger}}D^{\prime}_{m}C_{m}\ket{\psi^{(2)}}
=(m=1kNmop)ψ(1)|m=1kBmd(m)Cm|ψ(2)\displaystyle=(\prod_{m=1}^{k}\|N_{m}\|_{op})\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}B_{m}^{{\dagger}}d^{\prime(m)}C_{m}\ket{\psi^{(2)}}
=2(m=1kNmop)12×[Re(ψ(1)|m=1kBmd(m)Cm|ψ(2))\displaystyle=2(\prod_{m=1}^{k}\|N_{m}\|_{op})\cdot\frac{1}{2}\times\big{[}\mathrm{Re}(\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}B_{m}^{{\dagger}}d^{\prime(m)}C_{m}\ket{\psi^{(2)}})
+iIm(ψ(1)|m=1kBmd(m)Cm|ψ(2))],\displaystyle+i\mathrm{Im}(\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}B_{m}^{{\dagger}}d^{\prime(m)}C_{m}\ket{\psi^{(2)}})\big{]},

where Aop\|A\|_{op} is the operator norm of an operator AA, d(m)=Dm/Nmopd^{\prime(m)}=D^{\prime}_{m}/\|N_{m}\|_{op}. We can assume that d(m)=diag[λ~im=0(m),λ~im=1(m)]=diag[1,λ~im=1(m)]d^{\prime(m)}=\mathrm{diag}[\tilde{\lambda}^{\prime(m)}_{i_{m}=0},\tilde{\lambda}^{\prime(m)}_{i_{m}=1}]=\mathrm{diag}[1,\tilde{\lambda}^{\prime(m)}_{i_{m}=1}], where λ~im=0(m)λ~im=1(m)\tilde{\lambda}^{\prime(m)}_{i_{m}=0}\geq\tilde{\lambda}^{\prime(m)}_{i_{m}=1}, λ~im=0(m)=1\tilde{\lambda}^{\prime(m)}_{i_{m}=0}=1, and λ~im=1(m)\tilde{\lambda}^{\prime(m)}_{i_{m}=1} takes a value in a range [0,1][0,1], without loss of generality.

Figure 3(e) shows the circuit for measuring ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} by using the SVD contraction method. We can compute ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} as follows. We implement a Hadamard test circuit for m=1kBmd(m)Cm\bigotimes_{m=1}^{k}B_{m}^{{\dagger}}d^{\prime(m)}C_{m} for obtaining the real or imaginary part of ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} with probability 1/21/2 (i.e., 1:1 ratio) by changing the phase of the ancilla qubit. We define μs(Re)=2(m=1kNmop)(m=1kλ~ims(m))bs\mu_{s}^{(\mathrm{Re})}=2(\prod_{m=1}^{k}\|N_{m}\|_{op})(\prod_{m=1}^{k}\tilde{\lambda}^{\prime(m)}_{i_{ms}})b_{s} and μs(Im)=2i(m=1kNmop)(m=1kλ~ims(m))bs\mu_{s}^{(\mathrm{Im})}=2i(\prod_{m=1}^{k}\|N_{m}\|_{op})(\prod_{m=1}^{k}\tilde{\lambda}^{\prime(m)}_{i_{ms}})b_{s} in the cases of measurements of the real and imaginary parts, respectively, where ims{0,1}i_{ms}\in\{0,1\} and bs{1,1}b_{s}\in\{-1,1\} are the measurement outcomes of the system and ancilla qubits in the ss-th measurement, respectively. Then, the sum of the total sample averages of each of μs(Re)\mu_{s}^{(\mathrm{Re})} and μs(Im)\mu_{s}^{(\mathrm{Im})} approximates ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}}.

Letting x¯\bar{x} denote the sample average of a random variable xx, E[x]\mathrm{E}[x] denotes the expected value of xx, and μ¯s\bar{\mu}_{s} = μ¯s(Re)+μ¯s(Im)\bar{\mu}_{s}^{(\mathrm{Re})}+\bar{\mu}_{s}^{(\mathrm{Im})} approximates ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}}. Denoting the number of measurements as NSVDN_{SVD} and assuming mNmop=Nconstop\forall m~{}\|N_{m}\|_{op}=\|N_{const}\|_{op}, we have

E[|μ¯sψ(1)|m=1kNm|ψ(2)|]=O((Nconstop)kNSVD).\displaystyle\mathrm{E}[|\bar{\mu}_{s}-\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}}|]=O\bigg{(}\frac{(\|N_{const}\|_{op})^{k}}{\sqrt{N_{SVD}}}\bigg{)}. (8)

Thus, we have

NSVD=O((Nconstop)2kε2)N_{SVD}=O\bigg{(}\frac{(\|N_{const}\|_{op})^{2k}}{\varepsilon^{2}}\bigg{)} (9)

for the required accuracy ε\varepsilon.

We mention that NSVDN_{SVD} is expected not to increase exponentially with kk if nn is large enough. Here, we consider the case where the measured observable OO is a product of Pauli operators. This is because in the conventional variational quantum eigensolver (VQE) [13] scenario, we decompose the Hermitian operator of interest into a linear combination of a polynomial number of products of Pauli operators with the system size. We numerically generate four types of 2n×2n2^{n}\times 2^{n} random unitary matrices, U0(1)U^{0(1)}, U1(1)U^{1(1)}, U0(2)U^{0(2)}, and U1(2)U^{1(2)}, and a product of random Pauli operators, OrandO_{rand}, and create a 2×22\times 2 matrix NconstN_{const} consisting of elements Nconstii=0|nUi(1)OrandUi(2)|0nN^{i^{\prime}i}_{const}=\bra{0}^{\otimes n}U^{i^{\prime}(1){\dagger}}O_{rand}U^{i(2)}\ket{0}^{\otimes n}, where ii^{\prime} and ii take 0 or 1. Then, we evaluate the average values of Nconstop\|N_{const}\|_{op} obtained using 10,00010,000 samples of NconstN_{const}. As a result, we obtain Nconstop<1\|N_{const}\|_{op}<1, including error bars when n3n\geq 3 (See Appendix D for details). Therefore, if nn is large enough, NSVDO(1/ε2)N_{SVD}\leq O(1/\varepsilon^{2}) will be valid.

Additionally, we should note that in the case of |φim(l)=UCm(l)|im|0n1\ket{\varphi^{i_{m}(l)}}=U_{Cm}^{(l)}\ket{{i_{m}}}\ket{0}^{\otimes n-1}, NSVDO(1/ε2)N_{SVD}\leq O(1/\varepsilon^{2}) is strictly satisfied regardless of nn. In this case, since NmN_{m} can be regarded as a submatrix of the unitary matrix UCm(1)OmUCm(2)U_{Cm}^{(1){\dagger}}O_{m}U_{Cm}^{(2)} as Nmimim=im|0|n1UCm(1)OmUCm(2)|im|0n1N_{m}^{i_{m}^{\prime}i_{m}}=\bra{i_{m}^{\prime}}\bra{0}^{\otimes n-1}U_{Cm}^{(1){\dagger}}O_{m}U_{Cm}^{(2)}\ket{i_{m}}\ket{0}^{\otimes n-1}, we have NmopOmop\|N_{m}\|_{op}\leq\|O_{m}\|_{op}. Thus, because we have assumed Omop=1\|O_{m}\|_{op}=1 here, we have NSVDO(1/ε2)N_{SVD}\leq O(1/\varepsilon^{2}) regardless of nn.

IV Conclusion

We proposed a method to calculate transition amplitudes using a hybrid tensor network. When the hybrid tensor network approach is naively applied to the transition amplitude calculation, the contracted operators become non-Hermitian, and the number of terms to be measured increases exponentially. Our method obtains the expectation value without increasing the number of terms exponentially by using singular value decomposition and a Hadamard test. Our theory can be easily generalized to cases with a mixture of classical and quantum tensors called quantum-classical and classical-quantum tree-tensor networks, and those with deeper tree structures. Moreover, we can easily extend the scenario to the case where the measured operator OO is a tensor product of non-Hermitian operators by using the SVD contraction method. This study significantly expands the applicability of the hybrid tensor network.

Future work includes the application of our method to algorithms related to hybrid tensor networks. For example, Deep VQE, [20, 21], which is a large-scale computational algorithm for NISQ devices based on the divide and conquer method, can be treated in the framework of hybrid tensor networks in theory. By applying the proposed method to such algorithms, we can extend the range of applications to various large-scale quantum algorithms.

V Acknowledgments

This work is supported by PRESTO, JST, Grants No. JPMJPR1916 and No. JPMJPR2114; ERATO, JST, Grant No. JPMJER1601; CREST, JST, Grant No. JPMJCR1771; Moonshot R&D, JST, Grant No. JPMJMS2061; MEXT Q-LEAP Grant No. JPMXS0120319794 and JPMXS0118068682. S.E. acknowledges useful discussions with Jinzhao Sun and Xiao Yuan.

References

  • Bharti et al. [2021] K. Bharti, A. Cervera-Lierta, T. H. Kyaw, T. Haug, S. Alperin-Lea, A. Anand, M. Degroote, H. Heimonen, J. S. Kottmann, T. Menke, W.-K. Mok, S. Sim, L.-C. Kwek,  and A. Aspuru-Guzik,  (2021), arXiv:2101.08448 [quant-ph] .
  • Cerezo et al. [2020] M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan, L. Cincio,  and P. J. Coles,  (2020), arXiv:2012.09265 [quant-ph] .
  • Cao et al. [2019] Y. Cao, J. Romero, J. P. Olson, M. Degroote, P. D. Johnson, M. Kieferová, I. D. Kivlichan, T. Menke, B. Peropadre, N. P. D. Sawaya, S. Sim, L. Veis,  and A. Aspuru-Guzik, Chem. Rev. 119, 10856 (2019).
  • Endo et al. [2021] S. Endo, Z. Cai, S. C. Benjamin,  and X. Yuan, J. Phys. Soc. Jpn. 90, 032001 (2021).
  • Shikano et al. [2020] Y. Shikano, H. C. Watanabe, K. M. Nakanishi,  and Y.-Y. Ohnishi,   (2020), arXiv:2011.01544 [quant-ph] .
  • McArdle et al. [2020] S. McArdle, S. Endo, A. Aspuru-Guzik, S. C. Benjamin,  and X. Yuan, Rev. Mod. Phys. 92, 015003 (2020).
  • Bauer et al. [2020] B. Bauer, S. Bravyi, M. Motta,  and G. Kin-Lic Chan, Chem. Rev. 120, 12685 (2020).
  • Moll et al. [2018] N. Moll, P. Barkoutsos, L. S. Bishop, J. M. Chow, A. Cross, D. J. Egger, S. Filipp, A. Fuhrer, J. M. Gambetta, M. Ganzhorn, A. Kandala, A. Mezzacapo, P. Müller, W. Riess, G. Salis, J. Smolin, I. Tavernelli,  and K. Temme, Quantum Sci. Technol. 3, 030503 (2018).
  • Arute et al. [2019] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G. S. L. Brandao, D. A. Buell, B. Burkett, Y. Chen, Z. Chen, B. Chiaro, R. Collins, W. Courtney, A. Dunsworth, E. Farhi, B. Foxen, A. Fowler, C. Gidney, M. Giustina, R. Graff, K. Guerin, S. Habegger, M. P. Harrigan, M. J. Hartmann, A. Ho, M. Hoffmann, T. Huang, T. S. Humble, S. V. Isakov, E. Jeffrey, Z. Jiang, D. Kafri, K. Kechedzhi, J. Kelly, P. V. Klimov, S. Knysh, A. Korotkov, F. Kostritsa, D. Landhuis, M. Lindmark, E. Lucero, D. Lyakh, S. Mandrà, J. R. McClean, M. McEwen, A. Megrant, X. Mi, K. Michielsen, M. Mohseni, J. Mutus, O. Naaman, M. Neeley, C. Neill, M. Y. Niu, E. Ostby, A. Petukhov, J. C. Platt, C. Quintana, E. G. Rieffel, P. Roushan, N. C. Rubin, D. Sank, K. J. Satzinger, V. Smelyanskiy, K. J. Sung, M. D. Trevithick, A. Vainsencher, B. Villalonga, T. White, Z. J. Yao, P. Yeh, A. Zalcman, H. Neven,  and J. M. Martinis, Nature 574, 505 (2019).
  • Zhong et al. [2020] H.-S. Zhong, H. Wang, Y.-H. Deng, M.-C. Chen, L.-C. Peng, Y.-H. Luo, J. Qin, D. Wu, X. Ding, Y. Hu, P. Hu, X.-Y. Yang, W.-J. Zhang, H. Li, Y. Li, X. Jiang, L. Gan, G. Yang, L. You, Z. Wang, L. Li, N.-L. Liu, C.-Y. Lu,  and J.-W. Pan, Science 370, 1460 (2020).
  • Wu et al. [2021] Y. Wu, W.-S. Bao, S. Cao, F. Chen, M.-C. Chen, X. Chen, T.-H. Chung, H. Deng, Y. Du, D. Fan, M. Gong, C. Guo, C. Guo, S. Guo, L. Han, L. Hong, H.-L. Huang, Y.-H. Huo, L. Li, N. Li, S. Li, Y. Li, F. Liang, C. Lin, J. Lin, H. Qian, D. Qiao, H. Rong, H. Su, L. Sun, L. Wang, S. Wang, D. Wu, Y. Xu, K. Yan, W. Yang, Y. Yang, Y. Ye, J. Yin, C. Ying, J. Yu, C. Zha, C. Zhang, H. Zhang, K. Zhang, Y. Zhang, H. Zhao, Y. Zhao, L. Zhou, Q. Zhu, C.-Y. Lu, C.-Z. Peng, X. Zhu,  and J.-W. Pan,   (2021), arXiv:2106.14734 [quant-ph] .
  • Preskill [2018] J. Preskill, Quantum 2, 79 (2018).
  • Peruzzo et al. [2014] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik,  and J. L. O’Brien, Nat. Commun. 5, 4213 (2014).
  • Kandala et al. [2017] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, J. M. Chow,  and J. M. Gambetta, Nature 549, 242 (2017).
  • Temme et al. [2017] K. Temme, S. Bravyi,  and J. M. Gambetta, Phys. Rev. Lett. 119, 180509 (2017).
  • Endo et al. [2018] S. Endo, S. C. Benjamin,  and Y. Li, Phys. Rev. X 8, 031027 (2018).
  • Kandala et al. [2019] A. Kandala, K. Temme, A. D. Córcoles, A. Mezzacapo, J. M. Chow,  and J. M. Gambetta, Nature 567, 491 (2019).
  • Takagi [2021] R. Takagi, Phys. Rev. Research 3, 033178 (2021).
  • Yuan et al. [2021] X. Yuan, J. Sun, J. Liu, Q. Zhao,  and Y. Zhou, Phys. Rev. Lett. 127, 040501 (2021).
  • Fujii et al. [2020] K. Fujii, K. Mitarai, W. Mizukami,  and Y. O. Nakagawa,   (2020), arXiv:2007.10917 [quant-ph] .
  • Mizuta et al. [2021] K. Mizuta, M. Fujii, S. Fujii, K. Ichikawa, Y. Imamura, Y. Okuno,  and Y. O. Nakagawa,   (2021), arXiv:2104.00855 [quant-ph] .
  • Takeshita et al. [2020] T. Takeshita, N. C. Rubin, Z. Jiang, E. Lee, R. Babbush,  and J. R. McClean, Phys. Rev. X 10, 011004 (2020).
  • Yamazaki et al. [2018] T. Yamazaki, S. Matsuura, A. Narimani, A. Saidmuradov,  and A. Zaribafiyan,  (2018), arXiv:1806.01305 [quant-ph] .
  • Bauman et al. [2019] N. P. Bauman, E. J. Bylaska, S. Krishnamoorthy, G. H. Low, N. Wiebe, C. E. Granade, M. Roetteler, M. Troyer,  and K. Kowalski, J. Chem. Phys. 151, 014107 (2019).
  • Kottmann et al. [2021] J. S. Kottmann, P. Schleich, T. Tamayo-Mendoza,  and A. Aspuru-Guzik, J. Phys. Chem. Lett. 12, 663 (2021).
  • Huggins et al. [2019] W. Huggins, P. Patil, B. Mitchell, K. Birgitta Whaley,  and E. Miles Stoudenmire, Quantum Sci. Technol. 4, 024001 (2019).
  • Cong et al. [2019] I. Cong, S. Choi,  and M. D. Lukin, Nat. Phys. 15, 1273 (2019).
  • Kim [2017] I. H. Kim,   (2017), arXiv:1702.02093 [quant-ph] .
  • Liu et al. [2019] J.-G. Liu, Y.-H. Zhang, Y. Wan,  and L. Wang, Phys. Rev. Research 1, 023025 (2019).
  • Foss-Feig et al. [2020] M. Foss-Feig, D. Hayes, J. M. Dreiling, C. Figgatt, J. P. Gaebler, S. A. Moses, J. M. Pino,  and A. C. Potter,   (2020), arXiv:2005.03023 [quant-ph] .
  • Eddins et al. [2021] A. Eddins, M. Motta, T. P. Gujarati, S. Bravyi, A. Mezzacapo, C. Hadfield,  and S. Sheldon,   (2021), arXiv:2104.10220 [quant-ph] .
  • Schollwöck [2011] U. Schollwöck, Ann. Phys. 326, 96 (2011).
  • Endo et al. [2020] S. Endo, I. Kurata,  and Y. O. Nakagawa, Phys. Rev. Research 2, 033281 (2020).
  • Ibe et al. [2020] Y. Ibe, Y. O. Nakagawa, N. Earnest, T. Yamamoto, K. Mitarai, Q. Gao,  and T. Kobayashi,   (2020), arXiv:2002.11724 [quant-ph] .
  • Romero et al. [2017] J. Romero, J. P. Olson,  and A. Aspuru-Guzik, Quantum Sci. Technol. 2, 045001 (2017).
  • LaRose et al. [2019] R. LaRose, A. Tikku, É. O’Neel-Judy, L. Cincio,  and P. J. Coles, npj Quantum Information 5, 1 (2019).
  • Jones et al. [2019] T. Jones, S. Endo, S. McArdle, X. Yuan,  and S. C. Benjamin, Phys. Rev. A 99, 062304 (2019).
  • Higgott et al. [2019] O. Higgott, D. Wang,  and S. Brierley, Quantum 3, 156 (2019).

Appendix A Construction of MmM_{m} in the case where indices imi_{m} are mapped to initial wave functions

We explain the procedure of constructing MmM_{m} in the case of |φim=UCm|im|0n1\ket{\varphi^{i_{m}}}=U_{Cm}\ket{{i_{m}}}\ket{0}^{\otimes n-1} by using the circuit in Fig. 2(c). The diagonal elements, Mm00M_{m}^{00} and Mm11M_{m}^{11}, can be easily obtained by measuring the expectation values of OmO_{m} for |φim=0\ket{\varphi^{i_{m}=0}} and |φim=1\ket{\varphi^{i_{m}=1}} because Mm00=φim=0|Om|φim=0M_{m}^{00}=\bra{\varphi^{i_{m}=0}}O_{m}\ket{\varphi^{i_{m}=0}} and Mm11=φim=1|Om|φim=1M_{m}^{11}=\bra{\varphi^{i_{m}=1}}O_{m}\ket{\varphi^{i_{m}=1}}, respectively. We can also obtain non-diagonal elements by combining four types of measurement results. By setting |+(m)=(|φim=0+|φim=1)/2\ket{+^{(m)}}=(\ket{\varphi^{i_{m}=0}}+\ket{\varphi^{i_{m}=1}})/\sqrt{2} and |+y(m)=(|φim=0+i|φim=1)/2\ket{+y^{(m)}}=(\ket{\varphi^{i_{m}=0}}+i\ket{\varphi^{i_{m}=1}})/\sqrt{2}, we have

+(m)|Om|+(m)\displaystyle\bra{+^{(m)}}O_{m}\ket{+^{(m)}} =12(Mm00+Mm01+Mm10+Mm11)\displaystyle=\frac{1}{2}(M_{m}^{00}+M_{m}^{01}+M_{m}^{10}+M_{m}^{11}) (10)

and

+y(m)|Om|+y(m)\displaystyle\bra{+y^{(m)}}O_{m}\ket{+y^{(m)}} =12(Mm00+iMm01iMm10+Mm11).\displaystyle=\frac{1}{2}(M_{m}^{00}+iM_{m}^{01}-iM_{m}^{10}+M_{m}^{11}). (11)

Then, we can obtain the non-diagonal elements by

Mm01\displaystyle M_{m}^{01} =i12φim=0|Om|φim=0\displaystyle=\frac{i-1}{2}\bra{\varphi^{i_{m}=0}}O_{m}\ket{\varphi^{i_{m}=0}} (12)
+i12φim=1|Om|φim=1\displaystyle+\frac{i-1}{2}\bra{\varphi^{i_{m}=1}}O_{m}\ket{\varphi^{i_{m}=1}}
++(m)|Om|+(m)\displaystyle+\bra{+^{(m)}}O_{m}\ket{+^{(m)}}
i+y(m)|Om|+y(m)\displaystyle-i\bra{+y^{(m)}}O_{m}\ket{+y^{(m)}}

and Mm10=Mm01M_{m}^{10}=M_{m}^{01*}.

Appendix B Calculation of the square of overlaps without the ancilla qubit

In this section, we show the procedure of the calculation for the square of overlaps |ψHT(1)|ψHT(2)|2|\braket{\psi^{(1)}_{HT}}{{\psi^{(2)}_{HT}}}|^{2} by using the destructive SWAP test without using the ancilla qubit. The main point of the procedure is that we regard |ψHT(1)|ψHT(2)|2|\braket{\psi^{(1)}_{HT}}{{\psi^{(2)}_{HT}}}|^{2} as the expectation value of the SWAP operator for the 2nk2nk state |ψ~HT=|ψHT(1)|ψHT(2)\ket{\tilde{\psi}_{HT}}=\ket{\psi^{(1)}_{HT}}\ket{\psi^{(2)}_{HT}}, where |ψHT(1)\ket{\psi_{HT}^{(1)}} and |ψHT(2)\ket{\psi^{(2)}_{HT}} are two different states represented by a quantum-quantum tensor network. Since the SWAP operator is an observable, we can calculate |ψHT(1)|ψHT(2)|2|\braket{\psi^{(1)}_{HT}}{{\psi^{(2)}_{HT}}}|^{2} by following almost the same procedure as Sec. II without the ancilla qubit.

Specifically, letting the SWAP operator SWAP=m=1kSWAPmSWAP=\bigotimes_{m=1}^{k}SWAP_{m} and SWAPm=r=1nSWAPmrSWAP_{m}=\bigotimes_{r=1}^{n}SWAP_{mr} and substituting |ψ~HT\ket{\tilde{\psi}_{HT}} for |ψHT\ket{\psi_{HT}} and SWAPSWAP for OO in Eq. (3), the square of overlaps |ψHT(1)|ψHT(2)|2|\braket{\psi^{(1)}_{HT}}{{\psi^{(2)}_{HT}}}|^{2} can be obtained from the expectation value SWAP\braket{SWAP} as

SWAP\displaystyle\braket{SWAP} (13)
=ψ~HT|SWAP|ψ~HT\displaystyle=\bra{\tilde{\psi}_{HT}}SWAP\ket{\tilde{\psi}_{HT}}
=ψHT(1)|ψHT(2)|SWAP|ψHT(1)|ψHT(2)\displaystyle=\bra{\psi^{(1)}_{HT}}\bra{\psi^{(2)}_{HT}}SWAP\ket{\psi^{(1)}_{HT}}\ket{\psi^{(2)}_{HT}}
=(ψHT(1)|ψHT(2)|)(|ψHT(2)|ψHT(1))\displaystyle=(\bra{\psi^{(1)}_{HT}}\bra{\psi^{(2)}_{HT}})(\ket{\psi^{(2)}_{HT}}\ket{\psi^{(1)}_{HT}})
=|ψHT(1)|ψHT(2)|2,\displaystyle=|\braket{\psi^{(1)}_{HT}}{{\psi^{(2)}_{HT}}}|^{2},

and SWAP\braket{SWAP} can be also described as

SWAP\displaystyle\braket{SWAP} (14)
=i(1)i(2)i(1)i(2)ψi(1)(1)ψi(2)(2)ψi(1)(1)ψi(2)(2)m=1kM~mi(1)mi(2)mi(1)mi(2)m\displaystyle=\sum_{\begin{subarray}{c}\vec{i}^{\prime}_{(1)}~{}\vec{i}^{\prime}_{(2)}\\ \vec{i}_{(1)}~{}\vec{i}_{(2)}\end{subarray}}\psi_{\vec{i}^{\prime}_{(1)}}^{(1)*}\psi_{\vec{i}^{\prime}_{(2)}}^{(2)*}\psi_{\vec{i}_{(1)}}^{(1)}\psi_{\vec{i}_{(2)}}^{(2)}\prod_{m=1}^{k}\tilde{M}_{m}^{i_{(1)m}^{\prime}i_{(2)m}^{\prime}i_{(1)m}i_{(2)m}}
=ψ(1)|ψ(2)|m=1kM~m|ψ(1)|ψ(2),\displaystyle=\bra{\psi^{(1)}}\bra{\psi^{(2)}}\bigotimes_{m=1}^{k}\tilde{M}_{m}\ket{\psi^{(1)}}\ket{\psi^{(2)}},

where i(l)=(i(l)1,i(l)2,,i(l)k)\vec{i}_{(l)}=(i_{(l)1},i_{(l)2},\dots,i_{(l)k}) (l=1,2l=1,2) with i(l)mi_{(l)m} taking either 0 or 11, and M~m\tilde{M}_{m} is a 4×44\times 4 matrix with elements of

M~mi(1)mi(2)mi(1)mi(2)m\displaystyle\tilde{M}_{m}^{i_{(1)m}^{\prime}i_{(2)m}^{\prime}i_{(1)m}i_{(2)m}} (15)
=φi(1)m(1)|φi(2)m(2)|SWAPm|φi(1)m(1)|φi(2)m(2)\displaystyle=\bra{\varphi^{i_{(1)m}^{\prime}(1)}}\bra{\varphi^{i_{(2)m}^{\prime}(2)}}SWAP_{m}\ket{\varphi^{i_{(1)m}(1)}}\ket{\varphi^{i_{(2)m}(2)}}
=φi(1)m(1)|φi(2)m(2)|r=1nSWAPmr|φi(1)m(1)|φi(2)m(2).\displaystyle=\bra{\varphi^{i_{(1)m}^{\prime}(1)}}\bra{\varphi^{i_{(2)m}^{\prime}(2)}}\bigotimes_{r=1}^{n}SWAP_{mr}\ket{\varphi^{i_{(1)m}(1)}}\ket{\varphi^{i_{(2)m}(2)}}.

Here, M~m\tilde{M}_{m} is an observable on mm-th qubits of |ψ(1)\ket{\psi^{(1)}} and |ψ(2)\ket{\psi^{(2)}}, and SWAPmrSWAP_{mr} is an observable on rr-th qubits of |φi(1)m(1)\ket{\varphi^{i_{(1)m}(1)}} and |φi(2)m(2)\ket{\varphi^{i_{(2)m}(2)}}. We consider only the case of |φi(l)m(l)=UCm(l)|i(l)m|0n1\ket{\varphi^{i_{(l)m}(l)}}=U_{Cm}^{(l)}\ket{{i_{(l)m}}}\ket{0}^{\otimes n-1}, and thus we omit the normalization constant.

Figure 4(a) shows a quantum circuit to obtain the matrix element M~mi(1)mi(2)mi(1)mi(2)m\tilde{M}_{m}^{i_{(1)m}^{\prime}i_{(2)m}^{\prime}i_{(1)m}i_{(2)m}} using the destructive SWAP test. The procedure of obtaining the matrix elements is as follows. Firstly, the initial states are set to |a(1)m|0n1|a(2)m|0n1\ket{a_{(1)m}}\ket{0}^{\otimes n-1}\ket{a_{(2)m}}\ket{0}^{\otimes n-1}, where |a(l)m\ket{a_{(l)m}} takes four states as |0\ket{0}, |1\ket{1}, |+\ket{+} and |+y\ket{+y}. To construct M~m\tilde{M}_{m}, 4×4=164\times 4=16 types of the states are required in total (Table 1). After preparing the states (UCm(1)UCm(2))|a(1)m|0n1|a(2)m|0n1(U_{Cm}^{(1)}\otimes U_{Cm}^{(2)})\ket{a_{(1)m}}\ket{0}^{\otimes n-1}\ket{a_{(2)m}}\ket{0}^{\otimes n-1}, unitary gates for the measurement U~mr\tilde{U}_{mr} consisting of CNOT gates and Hadamard gates HH are applied. Here, U~mr\tilde{U}_{mr} is obtained by the spectral decomposition of SWAPmrSWAP_{mr} as SWAPmr=U~mrD~mrU~mrSWAP_{mr}=\tilde{U}_{mr}^{{\dagger}}\tilde{D}_{mr}\tilde{U}_{mr}, where U~mr\tilde{U}_{mr} is a unitary matrix and D~mr\tilde{D}_{mr} is a diagonal matrix. Finally, we assign elements of D~mr\tilde{D}_{mr} to the measurement results from each qubit pair.

Refer to caption
Figure 4: Quantum circuits for obtaining |ψHT(1)|ψHT(2)|2|\braket{\psi^{(1)}_{HT}}{{\psi^{(2)}_{HT}}}|^{2}. The operation in the area enclosed by the dashed line (labeled U~mr\tilde{U}_{mr} in (a) and U~m\tilde{U}_{m} in (b)) represents the unitary gate for the measurement for a pair of qubits. (a) A quantum circuit to construct M~m\tilde{M}_{m}. (b) A quantum circuit to measure M~m\tilde{M}_{m}.
Table 1: Construction of matrix elements of M~m\tilde{M}_{m} by using the 16 types of the measurement results for the SWAPmSWAP_{m} operator. The results S~a(1)ma(2)m\tilde{S}_{a_{(1)m}a_{(2)m}} are denoted as S~a(1)ma(2)m=a(1)m|0|n1a(2)m|0|n1(UCm(1)UCm(2))SWAPm(UCm(1)UCm(2))|a(1)m|0n1|a(2)m|0n1\tilde{S}_{a_{(1)m}a_{(2)m}}=\bra{a_{(1)m}}\bra{0}^{\otimes n-1}\bra{a_{(2)m}}\bra{0}^{\otimes n-1}(U_{Cm}^{(1){\dagger}}\otimes U_{Cm}^{(2){\dagger}})SWAP_{m}(U_{Cm}^{(1)}\otimes U_{Cm}^{(2)})\ket{a_{(1)m}}\ket{0}^{\otimes n-1}\ket{a_{(2)m}}\ket{0}^{\otimes n-1}, where a(l)ma_{(l)m} takes 0, 11, ++, and +y+y.
M~m0000\tilde{M}_{m}^{0000}
S~00\tilde{S}_{00}
M~m0001\tilde{M}_{m}^{0001}
1i2(S~00S~01+(1+i)S~0++(1i)S~0(+y))\frac{1-i}{2}(-\tilde{S}_{00}-\tilde{S}_{01}+(1+i)\tilde{S}_{0+}+(1-i)\tilde{S}_{0(+y)})
M~m0010\tilde{M}_{m}^{0010}
1i2(S~00S~10+(1+i)S~+0+(1i)S~(+y)0)\frac{1-i}{2}(-\tilde{S}_{00}-\tilde{S}_{10}+(1+i)\tilde{S}_{+0}+(1-i)\tilde{S}_{(+y)0})
M~m0011\tilde{M}_{m}^{0011}
i2(S~00+S~01+(1i)S~0++(1+i)S~0(+y)+S~10+S~11+(1i)S~1++(1+i)S~1(+y)-\frac{i}{2}(\tilde{S}_{00}+\tilde{S}_{01}+(-1-i)\tilde{S}_{0+}+(-1+i)\tilde{S}_{0(+y)}+\tilde{S}_{10}+\tilde{S}_{11}+(-1-i)\tilde{S}_{1+}+(-1+i)\tilde{S}_{1(+y)}
+(1i)S~+0+(1i)S~+1+2iS~+++2S~+(+y)+(1+i)S~(+y)0+(1+i)S~(+y)1+2S~(+y)+2iS~(+y)(+y))+(-1-i)\tilde{S}_{+0}+(-1-i)\tilde{S}_{+1}+2i\tilde{S}_{++}+2\tilde{S}_{+(+y)}+(-1+i)\tilde{S}_{(+y)0}+(-1+i)\tilde{S}_{(+y)1}+2\tilde{S}_{(+y)+}-2i\tilde{S}_{(+y)(+y)})
M~m0100\tilde{M}_{m}^{0100}
M~m0001\tilde{M}_{m}^{0001*}
M~m0101\tilde{M}_{m}^{0101}
S~01\tilde{S}_{01}
M~m0110\tilde{M}_{m}^{0110}
i2(iS~00+iS~01+(1i)S~0++(1i)S~0(+y)+iS~10+iS~11+(1i)S~1++(1i)S~1(+y)-\frac{i}{2}(i\tilde{S}_{00}+i\tilde{S}_{01}+(-1-i)\tilde{S}_{0+}+(1-i)\tilde{S}_{0(+y)}+i\tilde{S}_{10}+i\tilde{S}_{11}+(-1-i)\tilde{S}_{1+}+(1-i)\tilde{S}_{1(+y)}
+(1i)S~+0+(1i)S~+1+2iS~++2S~+(+y)+(1i)S~(+y)0+(1i)S~(+y)1+2S~(+y)++2iS~(+y)(+y))+(1-i)\tilde{S}_{+0}+(1-i)\tilde{S}_{+1}+2i\tilde{S}_{++}-2\tilde{S}_{+(+y)}+(-1-i)\tilde{S}_{(+y)0}+(-1-i)\tilde{S}_{(+y)1}+2\tilde{S}_{(+y)+}+2i\tilde{S}_{(+y)(+y)})
M~m0111\tilde{M}_{m}^{0111}
1i2(S~01S~11+(1+i)S~+1+(1i)S~(+y)1)\frac{1-i}{2}(-\tilde{S}_{01}-\tilde{S}_{11}+(1+i)\tilde{S}_{+1}+(1-i)\tilde{S}_{(+y)1})
M~m1000\tilde{M}_{m}^{1000}
M~m0010\tilde{M}_{m}^{0010*}
M~m1001\tilde{M}_{m}^{1001}
M~m0110\tilde{M}_{m}^{0110*}
M~m1010\tilde{M}_{m}^{1010}
S~10\tilde{S}_{10}
M~m1011\tilde{M}_{m}^{1011}
1i2(S~10S~11+(1+i)S~1++(1i)S~1(+y))\frac{1-i}{2}(-\tilde{S}_{10}-\tilde{S}_{11}+(1+i)\tilde{S}_{1+}+(1-i)\tilde{S}_{1(+y)})
M~m1100\tilde{M}_{m}^{1100}
M~m0011\tilde{M}_{m}^{0011*}
M~m1101\tilde{M}_{m}^{1101}
M~m0111\tilde{M}_{m}^{0111*}
M~m1110\tilde{M}_{m}^{1110}
M~m1011\tilde{M}_{m}^{1011*}
M~m1111\tilde{M}_{m}^{1111}
S~11\tilde{S}_{11}

Figure 4(b) shows a quantum circuit to construct M~m\tilde{M}_{m}. We can obtain ψ(1)|ψ(2)|m=1kM~m|ψ(1)|ψ(2)\bra{\psi^{(1)}}\bra{\psi^{(2)}}\bigotimes_{m=1}^{k}\tilde{M}_{m}\ket{\psi^{(1)}}\ket{\psi^{(2)}} by preparing |ψ(1)|ψ(2)=(UM(1)UM(2))|0k|0k\ket{\psi^{(1)}}\ket{\psi^{(2)}}=(U_{M}^{(1)}\otimes U_{M}^{(2)})\ket{0}^{\otimes k}\ket{0}^{\otimes k} , applying unitary gates for the measurement U~m\tilde{U}_{m}, and assigning elements of D~m\tilde{D}_{m} to the measurement results from each qubit pair, where M~m=U~mD~mU~m\tilde{M}_{m}=\tilde{U}_{m}^{{\dagger}}\tilde{D}_{m}\tilde{U}_{m}, U~m\tilde{U}_{m} is a unitary matrix, and D~m\tilde{D}_{m} is a diagonal matrix.

Since the destructive SWAP test circumvents the use of ancilla qubits and the effects of additional noise, it should be used in algorithms such as the variational quantum deflation for evaluating excited states [38] and variational quantum state diagonalization [36].

Appendix C Monte-Carlo contraction method

In this section, we introduce a Monte-Carlo contraction method and discuss the sampling cost. We decompose m=1kNm=m=1k(hImIm+hXmXm+hYmYm+hZmZm)\bigotimes_{m=1}^{k}N_{m}=\bigotimes_{m=1}^{k}(h_{Im}I_{m}+h_{Xm}X_{m}+h_{Ym}Y_{m}+h_{Zm}Z_{m}), where ImI_{m} is an identity operator, XmX_{m}, YmY_{m} and ZmZ_{m} are Pauli operators which act on the mm-th qubit, and hα(α{Im,Xm,Ym,Zm})h_{\alpha}(\alpha\in\{I_{m},X_{m},Y_{m},Z_{m}\}) are the corresponding coefficients. If we expand the last expression, it has an exponentially increasing number of terms with kk. To circumvent this problem, a Monte-Carlo implementation can be used to calculate ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}}. From now on, for notational simplicity, we will denote σ0(m)=Im\sigma^{(m)}_{0}=I_{m}, σ1(m)=Xm\sigma^{(m)}_{1}=X_{m}, σ2(m)=Ym\sigma^{(m)}_{2}=Y_{m}, σ3(m)=Zm\sigma^{(m)}_{3}=Z_{m}, h0(m)=hImh^{(m)}_{0}=h_{Im}, h1(m)=hXmh^{(m)}_{1}=h_{Xm}, h2(m)=hYmh^{(m)}_{2}=h_{Ym}, and h3(m)=hZmh^{(m)}_{3}=h_{Zm}. Introducing γ(m)=k=03|hk(m)|\gamma^{(m)}=\sum_{k=0}^{3}|h^{(m)}_{k}|, pk(m)=|hk(m)|/γ(m)p^{(m)}_{k}=|h^{(m)}_{k}|/\gamma^{(m)}, ϕim(m)\phi^{(m)}_{i_{m}}\in\mathbb{R}, and eiϕim(m)=him(m)/|him(m)|e^{i\phi^{(m)}_{i_{m}}}=h^{(m)}_{i_{m}}/|h^{(m)}_{i_{m}}|, we have impim(m)=1\sum_{i_{m}}p^{(m)}_{i_{m}}=1 and

ψ(1)|m=1kNm|ψ(2)\displaystyle\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} (16)
=2(m=1kγ(m))i1,i2,,ik(m=1kpim(m))12×eim=1kϕim(m)\displaystyle=2(\prod_{m=1}^{k}\gamma^{(m)})\sum_{i_{1},i_{2},...,i_{k}}(\prod_{m=1}^{k}p^{(m)}_{i_{m}})\cdot\frac{1}{2}\times e^{i\sum_{m=1}^{k}\phi^{(m)}_{i_{m}}}
×[Re(ψ(1)|m=1kσim(m)|ψ(2))+iIm(ψ(1)|m=1kσim(m)|ψ(2))].\displaystyle\times\big{[}\mathrm{Re}(\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}\sigma_{i_{m}}^{(m)}\ket{\psi^{(2)}})+i\mathrm{Im}(\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}\sigma_{i_{m}}^{(m)}\ket{\psi^{(2)}})\big{]}.

Therefore, we can compute ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} as follows. We generate m=1kσim(m)\bigotimes_{m=1}^{k}\sigma_{i_{m}}^{(m)} with probability m=1kpim(m)\prod_{m=1}^{k}p^{(m)}_{i_{m}} and implement a Hadamard test circuit for obtaining the real or imaginary part of ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}} with probability 1/21/2 (i.e., 1:1 ratio) by changing the phase of the ancilla qubit. We define μs(Re)=2(m=1kγ(m))eim=1kϕim(m)bs\mu_{s}^{\prime(\mathrm{Re})}=2(\prod_{m=1}^{k}\gamma^{(m)})e^{i\sum_{m=1}^{k}\phi^{(m)}_{i_{m}}}b_{s}^{\prime} and μs(Im)=2i(m=1kγ(m))eim=1kϕim(m)bs\mu_{s}^{\prime(\mathrm{Im})}=2i(\prod_{m=1}^{k}\gamma^{(m)})e^{i\sum_{m=1}^{k}\phi^{(m)}_{i_{m}}}b_{s}^{\prime} in the cases of measurements of the real and imaginary parts, respectively, where bs{1,1}b_{s}^{\prime}\in\{-1,1\} is the measurement outcomes of the ancilla qubit in the ss-th measurement. Then, the sum of the total sample averages of each of μs(Re)\mu_{s}^{\prime(\mathrm{Re})} and μs(Im)\mu_{s}^{\prime(\mathrm{Im})} approximates ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}}.

Below, x¯\bar{x} denotes the sample average of a random variable xx, E[x]\mathrm{E}[x] denotes the expected value of xx, and μ¯s=μ¯s(Re)+μ¯s(Im)\bar{\mu}_{s}^{\prime}=\bar{\mu}_{s}^{\prime(\mathrm{Re})}+\bar{\mu}_{s}^{\prime(\mathrm{Im})} approximates ψ(1)|m=1kNm|ψ(2)\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}}. Denoting the number of measurements as NMCN_{MC} and assuming mγ(m)=γ\forall m~{}\gamma^{(m)}=\gamma, we have

E[|μ¯sψ(1)|m=1kNm|ψ(2)|]=O(γk/NMC).\displaystyle\mathrm{E}[|\bar{\mu}_{s}^{\prime}-\bra{\psi^{(1)}}\bigotimes_{m=1}^{k}N_{m}\ket{\psi^{(2)}}|]=O(\gamma^{k}/\sqrt{N_{MC}}). (17)

Thus, we need

NMC=O(γ2k/ε2)N_{MC}=O(\gamma^{2k}/\varepsilon^{2}) (18)

for the required accuracy ε\varepsilon.

Appendix D Comparison of Monte-Carlo contraction method and SVD contraction method

Here, we compare NMCN_{MC} with NSVDN_{SVD}. Since Nm=imhimσim(m)N_{m}=\sum_{i_{m}}h_{i_{m}}\sigma_{i_{m}}^{(m)}, we have

Nmopim|him|σim(m)op=γ(m),\displaystyle\|N_{m}\|_{op}\leq\sum_{i_{m}}|h_{i_{m}}|\|\sigma_{i_{m}}^{(m)}\|_{op}=\gamma^{(m)}, (19)

where we have used σim(m)op=1\|\sigma_{i_{m}}^{(m)}\|_{op}=1.

Equations (9), (18), and (19) indicate γ/Nconstop1\gamma/\|N_{const}\|_{op}\geq 1 and

NMCNSVD=O((γ/Nconstop)2k).\displaystyle\frac{N_{MC}}{N_{SVD}}=O((\gamma/\|N_{const}\|_{op})^{2k}). (20)

Thus, the SVD contraction method is exponentially more efficient than the Monte-Carlo contraction method in terms of the sampling cost.

We present numerical calculations for γ/Nconstop\gamma/\|N_{const}\|_{op} in order to check the superiority of the SVD contraction method over the Monte-Carlo contraction method. We obtain 10,00010,000 samples of NconstN_{const} and Nconstop\|N_{const}\|_{op} by the procedure in Sec. III.2 and γ\gamma from the Pauli decomposition of NconstN_{const}. Fig. 5(a) shows the average of the ratio γ/Nconstop\gamma/\|N_{const}\|_{op}; we found that the average value is about 1.41.4 for any nn. Therefore, from Eq. (20) and the result in Fig. 5(a), we can conclude that the SVD contraction method is expected to be O((1.4)2k)O((1.4)^{2k}) times faster on average than the Monte-Carlo contraction method.

We also numerically evaluate the number of measurements for the two methods. The averages of γ\gamma and Nconstop\|N_{const}\|_{op} are shown in Fig. 5(b). γ\gamma and Nconstop\|N_{const}\|_{op} in n4n\geq 4 and n3n\geq 3, respectively, can be considered to be less than 1, including the standard deviation. Thus, we expect NMCO(1/ε2)N_{MC}\leq O(1/\varepsilon^{2}) and NSVDO(1/ε2)N_{SVD}\leq O(1/\varepsilon^{2}); that is, NMCN_{MC} and NSVDN_{SVD} are not expected to increase exponentially with kk, if nn is large enough.

Refer to caption
Figure 5: Average values of γ\gamma / Nconstop\|N_{const}\|_{op}, γ\gamma, and Nconstop\|N_{const}\|_{op} depending on the number of qubits nn (10,000 samples). Each point and error bar represent the average value and standard deviation of the samples, respectively. (a) Average value of γ\gamma / Nconstop\|N_{const}\|_{op}. (b) Average values of γ\gamma (circule, red) and Nconstop\|N_{const}\|_{op} (diamond, blue).