Abstract
Simulation of quantum systems is expected to be one of the most important applications of quantum computing, with much of the theoretical work so far having focused on fermionic and spin\(\frac{1}{2}\) systems. Here, we instead consider encodings of dlevel (i.e., qudit) quantum operators into multiqubit operators, studying resource requirements for approximating operator exponentials by Trotterization. We primarily focus on spins and truncated bosonic operators in second quantization, observing desirable properties for approaches based on the Gray code, which to our knowledge has not been used in this context previously. After outlining a methodology for implementing an arbitrary encoding, we investigate the interplay between Hamming distances, sparsity patterns, bosonic truncation, and other properties of local operators. Finally, we obtain resource counts for five common Hamiltonian classes used in physics and chemistry, while modeling the possibility of converting between encodings within a Trotter step. The most efficient encoding choice is heavily dependent on the application and highly sensitive to d, although clear trends are present. These operation count reductions are relevant for running algorithms on nearterm quantum hardware because the savings effectively decrease the required circuit depth. Results and procedures outlined in this work may be useful for simulating a broad class of Hamiltonians on qubitbased digital quantum computers.
Introduction
Simulating quantum physics will likely be one of the first practical applications of quantum computers. In simulating the many body problem, most algorithmic progress so far has focused on systems with binary degrees of freedom, e.g., spin\(\frac{1}{2}\) systems^{1,2} or fermionic systems^{3,4}. The latter case is relevant for simulations of chemical electronic structure^{5,6}, nuclear structure^{7}, and condensed matter physics^{8}. This focus on binary degrees of freedom seems to be a natural development, partly because qubitbased quantum computation is the most widespread model used in theory, experiment, and the nascent quantum industry.
However, for a large subset of quantum physics problems, important roles are played by components that are dlevel particles (qudits) with d > 2, including bosonic fundamental particles^{9}, vibrational modes^{10}, spins particles^{11}, or electronic energy levels in molecules^{12} and quantum dots^{13}. Accordingly, several qubitbased quantum algorithms were recently developed for efficiently studying some such processes, including nuclear degrees of freedom in molecules^{14,15,16,17,18}, the Holstein model^{19,20}, and quantum optics^{21,22}.
In principle, there are combinatorially many ways to map a quantum system to a set of qubits^{23,24}. Mapping a dlevel system to a set of qubits may be done by assigning an integer to each of the d levels and then performing an integertobit mapping. Some consideration of dleveltoqubit mappings has been published in the very recent literature, primarily for truncated bosonic degrees of freedom^{14,17,18,19,20,21,25}, but this is still an unexplored area of theory especially in regards to determining which encodings are optimal for which problem instances. The purpose of this work is both to provide a complete yet flexible framework for the mappings, and to analyze several encodings (both newly proposed herein and previously proposed) for a widely used set of operations and Hamiltonians. This aids in determining which mappings are more efficient for particular operators and specific hardware, including nearterm intermediatescale quantum (NISQ) devices.
When choosing which encoding to use for a given problem, it is conceptually useful to think in terms of a hardware budget, as shown in Fig. 1. Similar considerations have been studied for fermionic mappings^{26}. For near and intermediateterm hardware, one will often have stringent resource constraints in terms of both qubit count and gate count. Imagine that one plans to perform Hamiltonian simulation for some Nparticle system. Using some set of criteria for acceptable error and other parameters, one can in principle work backwards to determine how much of a quantum resource is available for each operation. This quantity would be different for each device. Perhaps one quantum computer would allow for more qubits but another allows for more operations, as in Fig. 1. Because different encodings yield differing resource requirements, considering multiple encodings may be essential for determining whether the available resources are sufficient.
Here we briefly summarize our results for resource comparisons of real Hamiltonian problems, in order to highlight the utility of encoding analyses and to demonstrate the ultimate practical objective of this work. Figure 2 shows the relative twoqubit operation requirements for a set of five prominent physics and chemistry problems (defined in Supplementary Section 6). All comparisons are made within a given Hamiltonian. Our investigations revealed a somewhat rich interplay between qubit counts, operation counts, encodings, and conversions. The difficulty in a priori predicting the optimal encoding scheme suggests that sophisticated compilation procedures, for automatically choosing and converting between multiple encodings, will play a large role in future quantum simulation efforts for dlevel systems.
We note that the optimal encoding schemes have differing characteristics, all of which are present in Fig. 2. The results for each Hamiltonian can be categorized as one of four scenarios. Scenario A: the optimal choice is either standard binary (SB) only or Grayonly, with no benefit from converting between encodings (Bose–Hubbard d = 4; 1D QHO d = 4). Scenario B: the optimal choice is to convert between SB and Gray, in order to perform different local operators in different encodings (Heisenberg \(s=\frac{7}{2}\); Franck–Condon d = 4). Scenarios A and B are notable because they require both the fewest operations and the fewest qubits, as there is no benefit to expanding into the qubithungry unary encoding. Scenario C: unaryonly is the optimal choice, and saving memory by compacting the data back to Gray or SB is still cheaper than remaining in the latter encodings (Bose–Hubbard d = 10; boson sampling d = 10; Franck Condon d = 10). Scenario D: unary is the optimal encoding, but only if the data remains in highqubitcount unary for the duration of the calculation (1D QHO d = 10; Heisenberg s = 2). The optimal encoding choice is highly sensitive to both the Hamiltonian class and the truncation value d. This suggests the need to perform an encodingbased analysis for any new digital quantum simulation of dlevel particles.
Throughout this work, we study four encoding types: unary (also called onehot), standard binary, the Gray code, and a new class of encodings we name block unary, all defined in Section Binary encoding. After outlining how to map dlevel operators to qubit operators for any arbitrary encoding in Section Mapping dlevel matrix operators to qubits, we consider resource counts for most standard local operators used in bosonic and spins Hamiltonians in Section Local operators. In Section Conversions between encodings we present circuits for converting between encodings and enumerate their resource counts. Finally, in Section Composite systems we obtain relative resource estimates for various commonly studied Hamiltonians in theoretical physics and chemistry. Conclusions are summarized in Section Discussion. This work highlights how the careful choice of the encoding scheme can greatly reduce the resource requirements when simulating a system of dlevel particles or modes.
Results
Binary encodings
We begin by giving definitions for various integer to binary encodings. In this work, we use the term binary encoding to refer to any code that represents an arbitrary integer as a set of ordered binary numbers, not just the familiar basetwo numbering system. These encodings can be used to represent states regardless of the type of system or basis we are considering. For a given encoding enc, each integer l has some qubit (i.e., binary) representation, denoted \({{\mathcal{R}}}^{{\rm{enc}}}(l)\), which is a bit string on N_{q} bits, \({x}_{{N}_{q}1}\cdots {x}_{1}{x}_{0}\). To specify the value (0 or 1) of a particular bit i in the encoding, we use the notation \({{\mathcal{R}}}^{{\rm{enc}}}(l;i)\).
Standard binary
We refer to the familiar basetwo numbering system as the standard binary (SB) encoding, such that an integer l is represented by
This straightforward mapping has been used for qubitbased quantum simulation of bosons previously^{14,17,18}. The SB mapping uses \({N}_{q}=\lceil {\mathrm{log}\,}_{2}d\rceil\) qubits when the range of integers under consideration is {0, 1, 2, …, d − 1}, where ⌈ ⋅ ⌉ is the ceiling function.
Gray code
In principle there are combinatorically many onetoone mappings between a set of integers and a set of N_{q}bit strings. One mapping from classical information theory with particularly useful properties is called the Gray code or the reflected binary code^{27}. Its defining feature is that the Hamming distance d_{H} between nearestinteger bit strings is always 1, formally \({d}_{H}({{\mathcal{R}}}^{{\rm{Gray}}}(l),{{\mathcal{R}}}^{{\rm{Gray}}}(l+1))=1\). The Hamming distance counts the number of mismatched bits between two bit strings. In other words, moving between adjacent integers requires only one bit flip (see Table 1). As will be seen below, this encoding is especially favorable for tridiagonal operators with zero diagonals, since all nonzero elements \(\leftl\right\rangle \left\langle l^{\prime} \right\) then have hamming distance one. As far as we are aware, the Gray code has not been previously proposed for use in the simulation of bosons and other dlevel systems on a qubitbased quantum computer. This encoding inspires the possibility of having a specialized encoding for many possible matrix sparsity patterns (for example a code for which \({d}_{H}={d}_{H}({{\mathcal{R}}}^{{\rm{Gray}}}(l){{\mathcal{R}}}^{{\rm{Gray}}}(l+1))=2\) to be used for pentadiagonal matrices like \({\hat{q}}^{2}\)), but we do not consider this possibility here. Throughout this work we refer to the SB and Gray codes as compact encodings because they make use of the full Hilbert space of the qubits used.
Unary encoding
Mappings that do not use all \({2}^{{N}_{q}}\) states of the Hilbert space are possible. In the unary encoding (also called onehot^{28}, singleexcitation subspace^{29}, or direct mapping^{17}), the number of qubits required is N_{q} = d. Therefore, only an exponentially small subspace of the qubits’ Hilbert space is used. The relationship between the unencoded and encoded ordered sets is
Previous proposals for bosonic simulation on a universal quantum computer have used this encoding^{17,18,28,29,30} under different names. The Unary encoding makes less efficient use of quantum memory, but it will become clear below that it usually allows for fewer quantum operations.
Block unary encoding
One can interpolate between the two extremes, using less than the full Hilbert space but more of the space than the unary code uses. In some limited instances this allows one to make tunable tradeoffs between required qubit counts and required operation counts, which may be especially useful for mapping physical problems to the specific hardware budget of a particular nearterm intermediatescale (NISQ) device. In this work, we introduce a class of such encodings that we call block unary.
The block unary code is parameterized by choosing an arbitrary compact encoding (e.g., SB or Gray code) and a local parameter g that determines the size of each block. It can be viewed as an extension of the unary code, where each digit (block) ranges from 0 to g. Within each block, the local encoding is used to represent the local digit. The number of qubits required is \({N}_{q}=\lceil \frac{d}{g}\rceil \lceil {\mathrm{log}\,}_{2}(g+1)\rceil\). Examples of the block unary encoding are given in Table 2. We use the notation BU\({}_{g}^{{\rm{enc}}}\) to define block unary with a particular pair of parameters. For a transition within a particular block, the number of operations is similar to a compact code with d = g + 1. For elements that move between different blocks, the transition will be conditional on all qubits in both blocks.
Bitmask subset
Because some encodings do not make use of the full Hilbert space, it will be useful to define the subset of bits that is necessary to determine each integer l. For a given encoding we call this subset the bitmask subset, denoted C(l) where C_{l} ⊆ {0, 1, 2, . . . , N_{q} − 1}. The bitmask subset for the SB and Gray encodings is always C^{SB}(l) = C^{Gray}(l) = {0, 1, 2, . . . , N_{q} − 1}, since all N_{q} bits must be known to determine the integer value. In the unary encoding, the bitmask subset is simply C^{Unary}(l) = {l}, because if one knows that bit l is set to 1, then one knows the other bits are 0. In the block unary code, the bitmask subset simply contains the bits that represent the current block. For example, for the Block Unary Gray code with g = 3 (see Table 2), C^{BU[g=3]}(2) = {0, 1} and C^{BU[g=3]}(3) = {2, 3}.
Mapping dlevel matrix operators to qubits
Any operator for a dlevel system can be written as
where l and \(l^{\prime}\) are integers labelling pairwise orthonormal quantum states. In this work we conceptualize the mappings primarily in terms of Focktype encodings (or alternatively second quantization encodings) where each \(\leftl\right\rangle\) represents one level in the dlevel system. However, the mapping procedure is identical to the one used for first quantization operators^{19,20} that we briefly discuss. When dealing with bosonic degrees of freedom, one must choose an arbitrary level d at which to truncate, since in principle a bosonic mode may have an unbounded particle number. Choosing this cutoff such that truncation error is below a given threshold is an essential step that has been previously studied^{18,31,32}, although it is beyond the scope of the current work.
In performing a mapping of any dbyd matrix operator to a sum of Pauli strings, the following approach may be used. For each term in the sum, one first assigns an integer to each level and then uses an arbitrary binary encoding \({\mathcal{R}}\) to encode each integer:
For codes using less than the full Hilbert space of the qubits (e.g., unary and block unary), some qubits can be safely ignored for a given element \(\leftl\right\rangle \left\langle l^{\prime} \right\). This is because operations on these excluded qubits will not affect the manifold on which the problem is encoded. Therefore, for each element \(\leftl\right\rangle \left\langle l^{\prime} \right\) a mapping needs to consider only the bitmask subsets of the two integers, ignoring other bits. The operator on the qubit space is then
where \(C(l)\cup C(l^{\prime} )\) is the union of the bitmask subsets of the two integers and the subscripts i denote qubit number. One then converts each qubitlocal term \(\left{x}_{j}\right\rangle \left\langle x^{\prime} \right\) to qubit operators using the following four expressions:
For a single term in Eq. (3), the result is a sum of Pauli strings,
where P is the number of Pauli strings in the sum, c_{k} is a coefficient for each Pauli term, and every operator is either a Pauli matrix or the identity: \({\hat{\sigma }}_{kj}\in \ \{\hat \sigma_x,\ \hat \sigma_y,\ \hat \sigma_z \}\cup \{I\}\). Note that in this work the set of Pauli matrices is defined to exclude the identity.
Significance of the Hamming distance
It is useful to analyze encoding efficiency based on the Hamming distance between \({\mathcal{R}}(l)\) and \({\mathcal{R}}(l^{\prime} )\). The Hamming distance, which we denote \({d}_{H}^{{\mathcal{R}}}(l,l^{\prime} )\equiv {d}_{H}({\mathcal{R}}(l),{\mathcal{R}}(l^{\prime} ))\), is defined as the number of unequal bits between two bit strings of equal length. The important observation is that, for a given element \({a}_{l,l^{\prime} }\leftl\right\rangle \left\langle l^{\prime} \right\) in Eq. (3), the average length of the Pauli strings increase as the Hamming distance increases, where length is defined as the number of Pauli operators (excluding identity) in the term. In this subsection, for simplicity we at first assume that the bitmask subset is C(l) = {0, 1, . . . , N_{q} − 1}, implying that we are using a compact code such as Gray or SB. But we note that these Hamming distance considerations are relevant to all encodings. In the case of a noncompact encoding, one would consider only the union of the bitmask subsets. To clarify this result, consider the following. For an arbitrary element \(\leftl\right\rangle \left\langle l^{\prime} \right\) written in binary form \(\left{\mathcal{R}}(l)\right\rangle \left\langle {\mathcal{R}}(l^{\prime} )\right\), one performs the following mapping:
where subscripts denote qubit number, \(\hat{a}\in \{\hat \sigma_x,I\}\), and \(\hat{b}\in \{\pm i\hat \sigma_y,\pm \hat \sigma_z \}\) (according to Eqs. (6) through (9)). Expanding the RHS of Eq. (11) leads to an equation of form (10). For any mismatched qubit j, i.e., any qubit for which \({x}_{j}\,\ne \,x^{\prime}\), the clause \(({\hat{a}}_{j}+{\hat{b}}_{j})\) contains two Pauli operators. For matched qubits (\({x}_{j}=x^{\prime}\)), the clause \(({\hat{a}}_{j}+{\hat{b}}_{j})\) instead has one identity and one Pauli operator. Hence more matched bits lead to more identity operators in expression (11), leading to fewer Pauli operators in the final sum of Pauli strings. It follows that the number of nonidentity operators can be reduced by having a smaller Hamming distance. This is relevant because Hamiltonians with more Pauli operators require more quantum operations to implement.
Consider the illustrative example of mapping the Hermitian term \(\left3\right\rangle \left\langle 4\right+\left4\right\rangle \left\langle 3\right\) to a set of qubits. In the SB encoding, Eqs. (6)–(9) yield the following Pauli string representation:
Using the Gray code, the Pauli string instead takes the form
The Hamming distance between \({\mathcal{R}}(3)\) and \({\mathcal{R}}(4)\) is \({d}_{H}^{{\rm{SB}}}=3\) in the former case and \({d}_{H}^{{\rm{Gray}}}=1\) in the latter. The result is that the Gray code has fewer Pauli operators per Pauli string, meaning that it can be implemented with fewer operations.
Avoiding superfluous terms in noncompact codes
When implementing local products of operators using noncompact codes (unary or BU), one should multiply operators in the matrix representation before performing the encoding to qubits. If one instead first maps local operators to qubit operators, and then multiplies the operators, superfluous terms may result. For example, when implementing an arbitrary squared operator \({\hat{A}}^{2}\), one should begin with the matrix representation of \({\hat{A}}^{2}\) instead of squaring the qubit representation of \(\hat{A}\). To see this, consider the unary encoding of the square of a 3level matrix operator \({\hat{n}}_{d = 3}={\rm{diag}}[0,1,2]\,\)\(\,\mapsto \,\frac{3}{2}I\frac{1}{2}\hat\sigma_z^{(1)}\hat\sigma_z^{(2)}\). If one begins with \({\hat{n}}_{d = 3}^{2}={\rm{diag}}[0,1,4]\), the encoded operator is
If one instead squares the alreadyencoded Pauli operator for \({\hat{n}}_{d = 3}\), this yields
Superscripts denote qubit number. Pauli operators (14) and (15) behave identically on the subspace of the unary encoding, although operator (14) is less costly to implement. One might attempt to eliminate superfluous terms after the mapping is complete, but this is likely a hard problem. In principle it may require combinatorial effort to determine which combinations of operators leave the encoding space unaffected. Hence the most prudent strategy is to always perform as much multiplication as possible in the matrix representation. These considerations are irrelevant when using one of the compact encodings.
Trotterization and gate count upper bounds
Hamiltonian simulation often consists of implementing the unitary operator
for some userdefined timeindependent Hamiltonian \(\hat{H}\), where t is the evolution time and we have set ℏ = 1. Any Hamiltonian can be expressed as a sum of local Pauli strings such that
which takes the same form as Eq. (10) with the Pauli strings and their coefficients compacted into terms \(\{{\hat{h}}_{k}\}\). In practice, Hamiltonian simulation can be performed using a Suzuki–Trotter decomposition
where the expression is exact in the limit of large η or small t^{1,33}. The numerical studies of this work consider the encodingdependent resource counts for Eq. (18), for a subset of prominent physics problems. We focus on determining the resources required for simulating a single Trotter step.
There are several variations and extensions to the Hamiltonian simulation approach of Eq. (18), including higherorder Suzuki–Trotter methods^{33}, the Taylor series algorithm^{34}, quantum signal processing^{35}, and schemes based on randomization^{36,37}. Notably for the current work, recent results suggest that simple firstorder Trotterization will have lower error for near and mediumterm hardware^{38,39}, even if the other methods are asymptotically more efficient. Since \({\hat{h}}_{k}\) takes a different form depending on the chosen encoding, the resource counts as well as the error \( \hat U(t) \tilde U(t) \) will be different. We leave the study of numerical error for future work, as the goal of the current work is to introduce these mappings and to understand some trends in their resource requirements.
Each term \(\exp (it{\hat{h}}_{k})=\exp (it{c{}_{k}\bigotimes }_{j}{\hat{\sigma }}_{kj})\) may be implemented using the wellknown CNOT staircase quantum circuit shown in Fig. 3. If a qubit j is acted on by \(\hat\sigma_x\) or \(\hat\sigma_y\), additional singlequbit gates are placed on qubit j as shown in the figure. H ≡ iR_{x+z}(π) denotes the Hadamard gate that changes between the Z and Xbasis, and iR_{x+y}(π) converts between the Z and Ybasis. To exponentiate a single Pauli string, the number of CNOT (CX) gates required is
where p is the number of Pauli operators (\(\{\hat\sigma_x,\hat\sigma_y,\hat\sigma_z\}\), excluding I) in the term to be exponentiated.
It is instructive to calculate upper bounds for entangling gate counts. Consider a simple Hermitian term \(\alpha \leftl\right\rangle \langle l^{\prime}  +{\alpha }^{* } l^{\prime} \rangle \left\langle l\right\) and a single diagonal element \(\leftl\right\rangle \left\langle l\right\). Here, d_{H} denotes \({d}_{H}({\mathcal{R}}(l),{\mathcal{R}}(l^{\prime} ))\), which will depend on the chosen encoding, and d_{H} = 0 in the case of a diagonal element. We define K as \( {C}^{{\rm{enc}}}(l)\cup {C}^{{\rm{enc}}}(l^{\prime} )\), the number of qubits in the relevant bitmask subsets. As we are considering products of twoterm sums (Eqs. (6)–(9)), the distribution of Pauli strings can be analyzed in terms of binomial coefficients. In the Supplementary Section 1 we show that
where UB denotes upper bound and the \(\frac{1}{2}\) factor is not present for diagonal terms. Some resulting upper bounds for particular Hamming distances are
Again, the above expressions are for a single Hermitian element pair or a single diagonal term. In practice, because substantial gate cancellation is possible once the quantum circuit has been compiled, these upper bounds are not always directly applicable when choosing an encoding. However, the above expressions may find direct utility in limiting cases, and they demonstrate the basic relationship between Hamming distance, size of the bitmask union, and gate counts. Below, we study a common sparsity pattern, a tridiagonal real matrix operator \(\hat{B}\) with zeros on the diagonal, i.e., with matrix structure \(\langle i \hat{B} j\rangle ={\sum }_{k}{B}_{k}({\delta }_{i,k}{\delta }_{j,k+1}+{\delta }_{i,k+1}{\delta }_{j,k})\). This is the sparsity pattern of several commonly used dlevel operators, such as the bosonic position operator \(\hat{q}\).
In Table 3 we show analytical upper bounds for three different levels of sparsity, derived in Supplementary Section 1. We consider a single Hermitian pair, the \(\hat{B}\) operator with O(d) nonzero entries, and a dense matrix operator with O(d^{2}) nonzero entries. In Supplementary Section 1 we show that the upper bound of entangling gate counts for an arbitrary operator on K qubits is O(K4^{K}). Because \(K=\lceil {\mathrm{log}\,}_{2}d\rceil\) in the compact codes, this means that the compact codes will never require more than \(O({d}^{2}\mathrm{log}\,d)\) entangling gates.
An important consequence is that, as the matrix density increases, the comparative advantage of the unary encoding decreases. The compact codes’ upper bound both for a \(\hat{B}\) and for a fully dense operator are both \(O({d}^{2}\mathrm{log}\,d)\), since this is the maximum upper bound. The unary encoding’s upper bound of O(d^{2}) for fully dense operator is only slightly lower. And because actual gate counts for various matrix instances will be less than these upper bounds, it appears possible that compact codes might often be superior for dense matrices in both qubit count and gate count. However, because the most commonly used quantum operators tend to have O(d) density, it is likely that unary will most often be superior in gate counts, at least for Hamiltonian simulation. Many exceptions to these trends are shown in Section Local operators.
As a more concrete demonstration of typical operator scaling, we calculated numerical upper bounds for \(\hat{B}\) with increasing d. Qubit counts and upper bounds for \(\hat{B}\) are shown in Fig. 4, as a function of d for different encodings. We first encoded the entire operator \(\hat{B}\) into a sum of Pauli strings before collecting and cancelling terms, leading to some favorable cancellations. Then we applied Eq. (19). There is roughly an inverted relationship between the qubit counts and the operation counts, because sparser encodings like the unary and block unary have smaller bitmask subsets but require more total qubits.
The differing gate count upper bounds between the SB and gray encodings (Fig. 4) are explained by Hamming distances. Because all nonzero terms in \(\hat{B}\) have unity Hamming distance, upper bounds for the Gray code are substantially lower. The other notable trend is that the unary code has lower upper bounds, asymptotically, than the other codes. This can be explained using Eq. (21) by noting that K = 2 for any matrix element, while \(K=\lceil {\mathrm{log}\,}_{2}d\rceil\) for Gray and SB. In other words, K stays constant in the unary encoding, whereas in the compact codes K increases with d. Upper bounds for BU\({}_{g = 3}^{{\mathrm{Gray}}}\) are between the compact codes and the unary code, as this encoding has an intermediate value of K. Below we will see that, although these trends generally persist, they are less pronounced and less predictable after cancelling of Pauli terms and circuit optimization.
Diagonal binarydecomposable operators
An important class of operators to consider is those which we call diagonal binarydecomposable (DBD). We define DBD operators as being diagonal matrix operators for which the diagonal entries of the operator (\(\hat{O}\)) may be expressed as
where R^{SB}(l; i) ∈ {0, 1}. A common subclass of DBD is the set of diagonal operators containing evenlyspaced entries. We call these diagonal evenlyspaced (DES) operators. An example is the bosonic number operator
and any linear combination \(a\hat{n}+bI\) where a and b are constants. If \({\mathrm{log}\,}_{2}d\) is an integer, then the Pauli operator is simply the basetwo numbering system with k_{i} = 2^{i},
The DBD class of operators is notable because, when \({\mathrm{log}\,}_{2}d\) is an integer, exactly implementing \(\exp (i\theta \hat{n})\) requires only \({\mathrm{log}\,}_{2}d\) singlequbit rotations and no entangling gates.
An operator for which \({\mathrm{log}\,}_{2}d\) is a noninteger will not lead to this favorable only singlequbit decomposition. For example, the \({\hat{S}}_{z}\) operator for a spins system is DBD, but the advantage appears for the SB mapping only when d = 2s + 1 is a power of 2, namely s ∈ {3/2, 7/2, … }. However, for other operators one may simply increase d without changing the simulation result. For example, if one is required to exponentiate a truncated bosonic operator \(\hat{n}\) with at least d = 11, it is most efficient simply to implement the SB encodings of \(\hat{n}\) with d = 16 instead. A simple example illustrates this point. The standard operator for the bosonic number operator with truncation d = 3 is
while that for d = 4 is
The latter operator (d = 4) is composed only of singlequbit operators but the former (d = 3) is not. Operations counts for CNOT gates are shown in Fig. 5, where it is clear that the SB mapping is superior when d is a power of 2. The right panel gives gate counts for operators such as \({\hat{n}}^{2}\), where it is again advangatgeous for d to be a power of 2, although entangling gates are still required. As is also clear from the right panel, the square of a DES or DBD operator is in general not DBD.
Local operators
Although local dlevel operators can in principle contain arbitrary terms and even be entirely dense (i.e., a molecule’s electronic energy levels with nonzero transitions between each), in practice there is a small set of sparse bosonic and spins operators that are used most often. Here we summarize the set of dlevel operators used in this study, where it is conceptually useful to explicitly write down some dbyd matrix representations.
Bosonic operators can be constructed from the wellknown ladder operators \(\hat{a}\) and \({\hat{a}}^{\dagger }\), where (importantly for encoding considerations) all nonzero terms \(\leftl\right\rangle \left\langle l^{\prime} \right\) obey \(\leftll^{\prime} \right=1\). The position operator \(\hat{q}=\frac{1}{\sqrt{2}}({\hat{a}}_{j}^{\dagger }+{\hat{a}}_{j})\) is tridiagonal with zeros on the diagonal:
This means that the square of \(\hat{q}\), often used in vibrational and bosonic Hamiltonians, is pentadiagonal but with zeros for terms where \( ll^{\prime}  =1\):
Notably, \( ll^{\prime} \) for nonzero entries is either 0 or 2, making the Gray code less useful for this operator. The momentum operator \(\hat{p}=\frac{i}{\sqrt{2}}({\hat{a}}_{j}^{\dagger }{\hat{a}}_{j})\) and its square \({\hat{p}}^{2}\) have the same sparsity patterns as \(\hat{q}\) and \({\hat{q}}^{2}\), respectively. The number operator \(\hat{n}={\hat{a}}^{\dagger }\hat{a}\) of Eq. (23) is diagonal and DBD, which leads to efficient SB mappings as discussed in Section Diagonal binarydecomposable operators. Finally, we study the twosite bosonic interaction operator
In order to consider spin Hamiltonians such as Heisenberg models^{11,40}, we encode spins operators of arbitrary s, where the number of levels is d = 2s + 1. Matrix elements for transitions \(\leftl\right\rangle \left\langle l^{\prime} \right\) are defined as follows^{41}
where δ_{α,β} is the Kronecker delta. The \(\hat S_z\) are DBD operators, while \(\hat S_x\) and \(\hat S_y\) are tridiagonal with zeros on the diagonal, the same sparsity pattern as bosonic \(\hat{p}\) and \(\hat{q}\) operators.
The local operators considered thus far are effectively second quantization operators—each ket tends to correspond to an eigenstate in an isolated dlevel system. Also of note is a recently proposed approach^{19,20} which maps bosons to qubits using the first quantized representation of the quantum harmonic oscillator. The original proposal maps Hermite–Gauss functions, the eigenfunctions of the quantum harmonic oscillator, into a discretized position space. The approximate position operator is defined as
and N_{x} is the number of discrete position points such that
where Δ is chosen such that the desired highestorder Hermite–Gauss function is contained within \(({x}_{0},{x}_{{N}_{x}1})\). Advantages and disadvanteges are discussed in the Supplementary Section 5. We raise the possibility of using this approach partly to point out that a N_{x}byN_{x} matrix operator may be mapped to qubits using the exact same procedure as the other operators, with N_{x} replacing d. Note that \({\tilde{X}}_{{\rm{FQ}}}\) is a DBD operator.
Quantum circuits for approximating the exponential of each operator and for each d were compiled and then optimized using the procedure given in the Supplementary Section 2. The optimization consists of searching for and performing gate cancellations where possible. For instance, two adjacent CNOT gates or two adjacent Hadamard gates will cancel. Entangling gate counts for the optimized circuits of bosonic operators \(\hat{q}\), \({\hat{q}}^{2}\), and \({\hat{a}}_{i}^{\dagger }{\hat{a}}_{j}+{\hat{a}}_{i}{\hat{a}}_{j}^{\dagger }.\) are plotted in Fig. 6. We place significant focus on smaller d values because they tend to be more common in physics simulation, but we note that applications requiring larger d values do exist, for example in vibronic simulations where occupation numbers can approach d = 70^{18}.
Comparing the tridiagonal operator \(\hat{q}\) with the upper bounds given in Fig. 4 demonstrates that the circuit optimization greatly reduces gate count for the compact codes and block unary, often by a factor of 2–3. On the other hand, the unary encoding effectively sees no improvement from optimization, although it remains the code with fewest entangling gates for a large subset of d values.
As was the case in the upper bound calculations, operators built from tridiagonal matrices (\(\hat{q}\) and \({\hat{a}}_{i}^{\dagger }{\hat{a}}_{j}+{\hat{a}}_{i}{\hat{a}}_{j}^{\dagger }.\)) show the Gray encoding outperforming SB, although after optimization the advantage is less pronounced. In contrast, for the pentadiagonal \({\hat{q}}^{2}\), the Gray code outperforms SB asymptotically, while SB is better for lower d values (and lower d values are likely to be more common in relevant bosonic Hamiltonian simulations). The changed trend can be explained by noting that the unity Hamming distance of the Gray code is not as advantageous for the sparsity structure of \({\hat{q}}^{2}\), given in Eq. (28). Also notable is the apparent dip in operation count at d = 8, due to the fact that the diagonal of \({\hat{q}}^{2}\) is DBD.
Importantly, when mapping bosonic problems using compact encodings, it is sometimes the case that increasing the truncation value d is beneficial. For instance, suppose one knows one can safely truncate at d = 5 for a bosonic problem. When implementing \({\hat{q}}^{2}\), one would instead simply implement the operator for d = 8, as the number of gates decreases while the number of qubits remains the same. Note that this is not possible in spins particles, as it would cause leakage to unphysical states.
One of the more intriguing results is that the unary code is often inferior to the Gray or SB encodings. Pronounced examples of this inversion include d = 4, 7, 8 for \(\hat{q}\) and d = 4 and 8 for \({\hat{q}}^{2}\), among others. This is notable because, for these values of d, Trotterizing the operator requires both fewer qubit and fewer operations if Gray or SB is used. These results are in contrast to the naively expected trend that there would be a more consistent tradeoff between qubit count and operation count. Results for singleparticle spins operators \({\hat{S}}_{x}\) and \({\hat{S}}_{z}\), as well as interaction operator \(\hat S_z^{(i)} \hat S_z^{(j)}\) are plotted in Fig. 7. Unlike bosonic Hamiltonians, the d values are not simulation parameters but are determined by s in the system we wish to simulate. The trends in spin operators tend to be more unruly than those in the bosonic operators.
Analogous to the bosonic case, \({\hat{S}}_{z}\) is DBD and therefore SB requires only singlequbit gates when d = 4, 8 (s = \(\frac{3}{2}\),\(\frac{7}{2}\)) and no entangling gates. For these two values, SB uses both the fewest operations and the fewest qubits (fewer than unary). However, the Gray code is superior to SB for other values of s, the same behavior seen in the general DES matrix of Fig. 5. Because \({\hat{S}}_{z}\) is diagonal, the unary always requires just d singlequbit rotations and no entangling gates. The twoparticle operator \(\hat S_z^{(i)} \hat S_z^{(j)}\) displays similar trends to \({\hat{S}}_{z}\).
As expected, the Gray code is usually superior to SB for the tridiagonal \({\hat{S}}_{x}\), because of the unity Hamming distance between nearest levels. Unary is inferior in both gate count and qubit count for most values, a result highlighted earlier in lowd bosonic operators. For both bosonic and spins operators, we have until now omitted discussion of the Graybased block unary encoding with parameter g = 3. There is never a case where this BU mapping is the sole encoding with the lowest entangling gate count. However, at least in principle, there may be limited cases where a particular hardware budget (Fig. 1) dictates the need for a block unary encoding. A necessary condition for even considering the use of BU\({}_{g = 3}^{{\mathrm{Gray}}}\) is that its operation count is less than both compact codes, but more than unary. In such cases (\(\hat{q}\) and \({\hat{a}_i^\dagger} \hat{a}_{i+1}+{\rm{h}}.{\rm{c}}.\) for d = 9; \({\hat{n}}^{2}\)\(\sim {\hat{O}}^{2}\) in Fig. 5 for several values; \(\hat S_z^{(i)} \hat S_z^{(j)}\) and \({\hat{S}}_{z}\) for s = 2), there may be a particular hardware budget would require this encoding for its particular memory/operation tradeoff. Such highly specific hardware budgets seem unlikely to often appear.
Note that the results herein should generally be considered constantfactor savings, because in most relevant systems d does not increase with system size, i.e., with the number of particles. For the simulation of scientifically relevant quantum systems, Hamiltonians are composed of more than one simple operator. For such situations, one may calculate the overall cost within a given encoding, as we do in Section Composite systems. As will be discussed in Section Conversions between encodings, it is often beneficial to Trotterize different parts of the Hamiltonian in different encodings, if the cost difference outweighs the overhead of conversion.
Conversions between encodings
It is often the case that different terms in a Hamiltonian are more efficiently simulated in different encodings. For example, in the Bose–Hubbard model, the number operator \(\hat{n}\) is usually more efficient in SB, while the hopping term \({\hat{b}}_{i}^{\dagger }{\hat{b}}_{i+1}+{\rm{h}}.{\rm{c}}.\) is usually more efficient in the Gray encoding (see Fig. 6). Here we show that the cost of converting from one encoding to another is often substantially less than the difference in resource efficiency between two encodings, which means that it can be advantageous to continually be compacting and uncompacting the data. For example, if unary is the most efficient for implementing an operator, one may wish to compact the data between operations to save memory resources, as shown in Fig. 8. In this section we give general quantum circuits and resource counts for converting between all encodings considered in this work.
One can convert between the Gray and SB encodings by applying \((\lceil {\mathrm{log}\,}_{2}d\rceil 1)\) CNOTs in sequential order^{42} as shown in Fig. 9.
The conversion between unary and SB is more complex. The conversion may be especially relevant in a future faulttolerant quantum computing era, when extra quantum resources are available, because the unary encoding becomes more beneficial as d increases and because the conversion cost is significant. Inspired by previous work^{43}, in Fig. 10 we show an example case for converting from SB to unary when d = 16. A state is initially encoded in SB using qubits on the left, and the memory space is enlarged to include the number of qubits needed for unary. No ancilla qubits are required. As quantum circuits are reversible, unarytoSB conversion follows by inversion of the circuit. In Table 4, we provide the converter circuit resource count for a general dlevel truncated quantum system, following Fig. 10. Resource counts assume a decomposition of CSWAP into Clifford+T gates^{44}. A general algorithm to build the converter circuit can be seen in the Algorithm 1. ⌈ ⋅ ⌉ and ⌊ ⋅ ⌋ are, respectively, the ceiling and floor functions. The validity of the conversion procedure is most easily shown by tracing a single unary state through the reverse algorithm. When d is not a power of 2, modifications are needed. These modifications are already accounted for in Algorithm 1 and example circuits for d = 5 and 7 are given in the Supplementary Section 3.
For completeness, we constructed a circuit for converting between SB and block unary, for BU\({}_{g = 3}^{{\rm{SB}}}\), shown in the Supplementary Section 4. We do not further analyze BU conversions, as block unary is expected to have limited utility, and even then it will usually be the case that decoherence times are too low to allow for conversions (see Section Local operators).
Composite systems
Here we consider resource counts for simulating five physically and chemically relevant Hamiltonian systems. The Hamiltonians correspond to the shifted onedimensional QHO, the Bose–Hubbard model^{9,45,46}, multidimensional molecular Franck–Condon factors^{17,18,47}, a spins transversefield Heisenberg model^{11,40}, and simulating Boson sampling^{48} on a digital quantum computer. The former four systems consist of an arbitrary number of dlevel particles. For the Franck–Condon factors, the Duschinsky matrix is assumed to have a constant k = 4 nonzero entries per row. With the exception of the simple QHO, all of these problem classes would benefit from digital quantum simulation, because there are limits to the theoretical and practical questions that can be answered by classical computers. Supplementary Section 6 gives a more thorough overview of these problems. Assuming that d remains constant as the particle number increases, differences in resource counts between mappings are constantfactor savings that are independent of system size.
Using resource counts from the optimized circuits for Trotterizing individual operators and from the circuits for interencoding conversion, we calculated and compared the required twoqubit entangling gate counts for the selected composite Hamiltonians. We considered five encoding schemes: (i) SBonly, (ii) Graycodeonly, (iii) unaryonly, (iv) allowing for conversion between SB and Gray, and (v) using all three while compacting to save memory. For (iv) and (v), the reported results include the cost of conversion. To the best of our knowledge, schemes (ii), (iv), and (v) are novel to digital quantum simulation. In Fig. 8, an example of encoding scheme (v) is shown. These encoding schemes do not directly correspond to the ‘scenarios’ discussed below; the scenarios denote the optimal encoding scheme under different hardware budgets.
The result for (iv), the encoding scheme that combines both the SB and Gray codes, is reported only when it represents an improvement over both SBonly and Grayonly. We give results for (v), which compacts and uncompacts the qubits for unary computations, only when the unary code was the most efficient of the first four encoding schemes. We give all results in terms of resource counts relative to the SB mapping, noting again that the relative resource requirements between encoding schemes are independent of system size (i.e., number of particles or modes).
For some local bosonic operators, the number of entangling gates is not a monotonically increasing function of d. Such operators include \(\hat{n}\), \({\hat{n}}^{2}\), and \({\hat{q}}^{2}\) (Figs. 5 and 6). Our numerics for the composite systems take this into account, increasing the cutoff d if it is beneficial. For instance, if d = 5 is a sufficient truncation and we implement \({\hat{q}}^{2}\), we use resource counts for d = 8, because this uses the same number of qubits but fewer operations (Fig. 6). This trick is not possible for the spins systems, where d is determined not by a sufficient truncation value but by the nature of the particle itself (its spin s).
A selection of resource comparisons is shown in Fig. 2. We show results from d = 4 and 10 because they highlight the variety of rankings that occur, and demonstrate that the best encoding scheme can be highly sensitive to d even within the same Hamiltonian class. Numerical results up to d = 16 are given in the Supplementary Section 7.
In terms of which encoding class should be used, the results can be categorized into four scenarios. Scenario A applies when using just one of the compact encodings (SB or Gray) is the best choice. Of the results shown in Fig. 2, the Bose–Hubbard and 1D QHO models for d = 4 fit this description. The optimal choice is to stay in one of the compact encodings for the entire calculation, while never using more than \({\mathrm{log}\,}_{2}d\) qubits per particle for the calculation.
Scenario B refers to Hamiltonians for which the optimal strategy is to use a compact amount of memory but to allow for conversion between Gray and SB. This includes the Heisenberg model for \(s=\frac{7}{2}\) and the Franck–Condon Hamiltonian for d = 4. Because the cost of conversion is very small, this scenario usually implies that at least one of the local operators in the Hamiltonian are optimal in Gray, at least one is optimal in SB, and none are optimal in unary. To take the Heisenberg model with \(s=\frac{7}{2}\) as an example, one can see this is the case by comparing \(\hat S_x\) and \(\hat S_z^{(i)} \hat S_z^{(j)}\) in Fig. 7.
Scenario C applies when unary is the superior encoding and it is still considered the best encoding even if one repeatedly unravels and compacts to preserve memory (as in Fig. 8). This latter trait is important because it means that, even including the substantial cost of SBtounary conversion, with a cost of ~9d entangling gates (Table 4), it is still better to convert back and forth between unary and SB/Gray. This is true even when memory constraints require that one stores the information compactly for most of the time. This occurs with d = 10 for the Bose–Hubbard, boson sampling, and Franck–Condon Hamiltonians, all of which are bosonic problems.
Scenario D refers to cases where unary is the superior encoding, assuming that the information is not compacted back to SB in order to save memory. This scenario implies that, if one has the qubit space to stay in unary form for the entire calculation, unary is optimal. If one does not have the memory resources for this, it is best to simply perform all operations in Gray and/or SB. The reason for this discrepancy is that the cost of converting binary to unary is substantial, as mentioned above. This scenario applies to the 1D QHO for d = 10 as well as the Heisenberg model for s = 2.
Results for d values up to 16 are given in the Supplementary Section 7. Note that the novel memoryefficient schemes (ii), (iv), and (v) did not lead to improvements in every case; in a minority of the problem instances we considered, the optimal encoding scheme was to use only SB or only unary. By memoryefficient we mean that the scheme stores the encoded subsystems in \(\lceil {\mathrm{log}\,}_{2}d\rceil\) qubits, with the possible exception of when they are being operated on. Comparing to the memoryinefficient unaryonly scheme, our novel approaches reduced twoqubit entangling gate counts by up to 33%. Compared to the memoryefficient SBonly scheme, we observed gate count reductions of up to 49%. The latter case is more relevant when qubit count is a substantial constraint. These savings are especially important for running algorithms on nearterm hardware, since by simply modifying the encoding procedure one can substantially decrease the effective circuit depth.
Discussion
After introducing a general framework for encoding dlevel systems to multiqubit operators, we have analyzed the utility and tradeoffs of several integertobit encodings for qubitbased Hamiltonian simulation. The mappings may be used for Hamiltonians built from subsystems of bosons, spins particles, molecular electronic energy levels, molecular vibrational modes, or other dlevel subsystems.
We analyzed the mappings primarily in terms of qubit counts and the number of entangling operations required to estimate the exponential of an operator.
Of the Gray and SB codes, we demonstrated that the Gray code tends to be more efficient for tridiagonal matrix operators, while SB tends to be superior for a common class of diagonal matrix operator. Importantly, we show that converting between encodings within a Suzuki–Trotter step often leads to savings. Notably, although the unary code tends to require more qubits but fewer operations, it is often the case that the SB or Gray code is more efficient both in terms of qubit counts and operation counts. To the best of our knowledge, the Gray code had not been previously used in Hamiltonian simulation.
We compared resource requirements between encodings for the following composite Hamiltonians: the Bose–Hubbard model, onedimensional quantum harmonic oscillator, vibronic molecular Hamiltonian (i.e., Franck–Condon factors), spins Heisenberg model, and boson sampling. The optimal encoding, and whether it was beneficial to interconvert between encodings, was heavily dependent both on the Hamiltonian class and on the truncation level d for the particle. We placed optimal encoding strategies into four different "scenarios,” each of which points to a different optimal encoding and simulation strategy. The simulation scenario depends on which encodings require the fewest operations, on whether interconverting between mappings is worth the additional cost, and on qubit memory constraints. The many anomalies in our results highlight the need to perform an analysis of each new class of Hamiltonian simulation problem, determining numerically which simulation strategy is optimal before performing a simulation on real hardware.
There are several directions open for future research. First, there are ways to analyze resource requirements other than enumerating the entangling operations. For longterm errorcorrected hardware, estimating T gate count may be most relevant^{49}. Additionally, we assumed alltoall connectivity in this work, which tends to be a feature of ion trap quantum computers^{50}. But other quantum hardware types require one to consider the topology of the qubit connections and implementation of SWAP gates^{51}, a consideration that would modify the resource counts and may modify some trends observed here.
We envision that the methodology and results of this work will be helpful for both theorists and experimentalists in designing resource efficient approaches to quantum simulation of a broader set of physically and chemically relevant Hamiltonians.
Data availability
The data that support the findings of this study are available upon reasonable request.
References
Lloyd, S. Universal quantum simulators. Science 273, 1073–1077 (1996).
Childs, A. M., Maslov, D., Nam, Y., Ross, N. J. & Su, Y. Toward the first quantum simulation with quantum speedup. Proc. Natl Acad. Sci. USA 115, 9456–9461 (2018).
Abrams, D. S. & Lloyd, S. Simulation of manybody fermi systems on a universal quantum computer. Phys. Rev. Lett. 79, 2586–2589 (1997).
Bravyi, S. B. & Kitaev, A. Y. Fermionic quantum computation. Ann. Phys. 298, 210–226 (2002).
Cao, Y. et al. Quantum chemistry in the age of quantum computing. Chem. Rev. 119, 10856–10915 (2019).
McArdle, S., Endo, S., AspuruGuzik, A., Benjamin, S. & Yuan, X. Quantum computational chemistry. Rev. Mod. Phys. 92, 015003 (2020).
Dumitrescu, E. F. et al. Cloud quantum computing of an atomic nucleus. Phys. Rev. Lett. 120, 210501 (2018).
Wecker, D. et al. Solving strongly correlated electron models on a quantum computer. Phys. Rev. A 92, 062318 (2015).
P.A., Matthew, P.B., Fisher, G.G., Weichman & D.S., Fisher Boson localization and the superfluidinsulator transition. Phys. Rev. B 40, 546–570 (1989).
Wilson, E. B., Decius, J. C. & Cross, P. C. Molecular Vibrations: The Theory of Infrared and Raman Vibrational Spectra (Dover Publications, Mineola, 1980).
Levitt, M. H. Spin Dynamics: Basics of Nuclear Magnetic Resonance, 2nd edn. (Wiley, 2008).
Turro, N. J. Modern Molecular Photochemistry (University Science Books, 1991).
Hong, Y., Wu, Y., Wu, S., Wang, X. & Zhang, J. Overview of computational simulations in quantum dots. Isr. J. Chem. 59, 661–672 (2019).
Veis, L., Višňák, J., Nishizawa, H., Nakai, H. & Pittner, J. Quantum chemistry beyond bornoppenheimer approximation on a quantum computer: A simulated phase estimation study. Int. J. Quantum Chem. 116, 1328–1336 (2016).
Joshi, S., Shukla, A., Katiyar, H., Hazra, A. & Mahesh, T. S. Estimating FranckCondon factors using an NMR quantum processor. Phys. Rev. A 90, 022303 (2014).
Teplukhin, A., Kendrick, B. K. & Babikov, D. Calculation of molecular vibrational spectra on a quantum annealer. J. Chem. Theory Comput. 15, 4555–4563 (2019).
McArdle, S., Mayorov, A., Shan, X., Benjamin, S. & Yuan, X. Digital quantum simulation of molecular vibrations. Chem. Sci. 10, 5725–5735 (2019).
Sawaya, N. P. D. & Huh, J. Quantum algorithm for calculating molecular vibronic spectra. J. Phys. Chem. Lett. 10, 3586–3591 (2019).
Macridin, A., Spentzouris, P., Amundson, J. & Harnik, R. Electronphonon systems on a universal quantum computer. Phys. Rev. Lett. 121, 110504 (2018a).
Macridin, A., Spentzouris, P., Amundson, J. & Harnik, R. Digital quantum computation of fermionboson interacting systems. Phys. Rev. A 98, 042312 (2018b).
Sabín, C. Digital quantum simulation of linear and nonlinear optical elements. Quantum Rep. 2, 208–220 (2020).
Paolo, A. D., Barkoutsos, P. K., Tavernelli, I. & Blais, A. Variational quantum simulation of ultrastrong lightmatter coupling. arXiv: http://arxiv.org/abs/arXiv:1909.08640 (2019).
Batista, C. D. & Ortiz, G. Algebraic approach to interacting quantum systems. Adv. Phys. 53, 1–82 (2004).
Wu, L.A. & Lidar, D. A. Qubits as parafermions. J. Math. Phys. 43, 4506–4525 (2002).
Somma, R.Ortiz, G.Knill, E. & Gubernatis, J. Quantum simulations of physics problems. arXiv: http://arxiv.org/abs/arXiv:quantph/0304063 (2003).
Steudtner, M. & Wehner, S. Fermiontoqubit mappings with varying resource requirements for quantum simulation. N. J. Phys. 20, 063010 (2018).
Roth, R. Introduction to Coding Theory (Cambridge University Press, 2006).
Chancellor, N. Domain wall encoding of discrete variables for quantum annealing and QAOA. Quantum Sci. Technol. 4, 045004 (2019).
Geller, M. R. et al. Universal quantum simulation with prethreshold superconducting qubits: Singleexcitation subspace method. Phys. Rev. A 91, 062309 (2015).
Somma, R. D. Quantum computation, complexity, and manybody physics. arXiv: http://arxiv.org/abs/arXiv:quantph/0512209 (2005).
Lee, K. S. & Fischer, U. R. Truncated manybody dynamics of interacting bosons: a variational principle with error monitoring. Int. J. Mod. Phys. B 28, 1550021 (2014).
Woods, M. P., Cramer, M. & Plenio, M. B. Simulating bosonic baths with error bars. Phys. Rev. Lett. 115, 130401 (2015).
Suzuki, M. Generalized trotter’s formula and systematic approximants of exponential operators and inner derivations with applications to manybody problems. Commun. Math. Phys. 51, 183–190 (1976).
Berry, D. W., Childs, A. M., Cleve, R., Kothari, R. & Somma, R. D. Simulating Hamiltonian dynamics with a truncated taylor series. Phys. Rev. Lett. 114, 090502 (2015).
Low, G. H. & Chuang, I. L. Optimal hamiltonian simulation by quantum signal processing. Phys. Rev. Lett. 118, 010501 (2017).
Childs, A. M., Ostrander, A. & Su, Y. Faster quantum simulation by randomization. Quantum 3, 182 (2019a).
Campbell, E. Random compiler for fast Hamiltonian simulation. Phys. Rev. Lett. 123, 070503 (2019).
Childs, A. M., Maslov, D., Nam, Y., Ross, N. J. & Su, Y. Toward the first quantum simulation with quantum speedup. Proc. Natl Acad. Sci. USA 115, 9456–9461 (2018b).
Childs, A. M., Su, Y., Tran, M. C., Wiebe, N. & Zhu, S. A theory of trotter error. arXiv: http://arxiv.org/abs/arXiv:1912.08854 (2019).
LoraSerrano, R. et al. Dilution effects in spin 7/2 systems. the case of the antiferromagnet GdRhIn 5. J. Magn. Magn. Mater. 405, 304–310 (2016).
Merzbacher, E. Quantum Mechanics, 3rd ed. (John Wiley and Sons, 2004).
Shukla, V., Singh, O. P., Mishra, G. R. & Tiwari, R. K. Application of CSMT gate for efficient reversible realization of binary to gray code converter circuit. In 2015 IEEE UP Section Conference on Electrical Computer and Electronics (UPCON) (IEEE, 2015).
Gidney, C. Garbagefree reversible binarytounary decoder construction, https://quantumcomputing.stackexchange.com/questions/5526/garbagefreereversiblebinarytounarydecoderconstruction (2019).
Kim, T. & Choi, B.S. Efficient decomposition methods for controlledRn using a single ancillary qubit. Sci. Rep. 8, 5445 (2018).
Sachdeva, R., Johri, S. & Ghosh, S. Cold atoms in a rotating optical lattice with nearestneighbor interactions. Phys. Rev. A 82, 063617 (2010).
Bloch, I., Dalibard, J. & Zwerger, W. Manybody physics with ultracold gases. Rev. Mod. Phys. 80, 885–964 (2008).
Huh, J., Guerreschi, G. G., Peropadre, B., Mcclean, J. R. & AspuruGuzik, A. Boson sampling for molecular vibronic spectra. Nat. Photonics 9, 615–620 (2015).
Aaronson, S. & Arkhipov, A. In Research in Optical Sciences (OSA, 2014).
Gosset, D., Kliuchnikov, V., Mosca, M. & Russo, V. An algorithm for the Tcount. arXiv: http://arxiv.org/abs/arXiv:1308.4134 (2013).
Figgatt, C. et al. Parallel entangling operations on a universal iontrap quantum computer. Nature 572, 368–372 (2019).
Holmes, A., Johri, S., Guerreschi, G. G., Clarke, J. S. & Matsuura, A. Y. Impact of qubit connectivity on quantum algorithm performance. Quantum Sci. Technol. 5, 025009 (2020).
Acknowledgements
A.A.G., T.H.K., and T.M. acknowledge funding from Intel Research and Dr. Anders G. Frøseth. A.A.G. also acknowledges support from the Vannevar Bush Faculty Fellowship and the Canada 150 Research Chairs Program.
Author information
Authors and Affiliations
Contributions
N.P.D.S. conceived of and designed the study, developed the theory, and generated and analyzed the data. T.M. developed encoding conversion schemes, analyzed data, and created conceptual figures. T.H.K. developed encoding conversion schemes. S.J. optimized all quantum circuits. A.A.G. supervised work on encoding conversions. G.G.G. conceived of the encoding conversions section and developed theory. N.P.D.S., G.G.G., T.M., and T.H.K. wrote the manuscript. All authors edited the manuscript.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Sawaya, N.P.D., Menke, T., Kyaw, T.H. et al. Resourceefficient digital quantum simulation of dlevel systems for photonic, vibrational, and spins Hamiltonians. npj Quantum Inf 6, 49 (2020). https://doi.org/10.1038/s4153402002780
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s4153402002780
This article is cited by

Nuclear shellmodel simulation in digital quantum computers
Scientific Reports (2023)

Prospects of quantum computing for molecular sciences
Materials Theory (2022)

Quantum algorithms for quantum dynamics
Nature Computational Science (2022)

Toward simulating superstring/Mtheory on a quantum computer
Journal of High Energy Physics (2021)