Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Encoding Scalar Fields and Fermions

    A scalar field has infinitely many possible amplitudes at every spatial site. A qubit register has finitely many states. Which approximation turns the first system into the second, and which parts of the resulting calculation can still be exact?

    We answer this with two coupled scalar oscillators. We truncate their local bases, encode the resulting Hamiltonian as an explicit sum of Pauli operators, and compare its spectrum with the original finite matrix. We also construct a field-coordinate grid and a fermionic occupation encoding. These choices approximate different objects: a bosonic local basis needs a cutoff, whereas one fermion mode already has a two-dimensional occupation space.

    Preparation: Tensor products, harmonic-oscillator matrix elements, and the distinction between an operator and its projection onto a local basis.

    The Hamiltonian before the qubits

    Consider a real scalar in one spatial dimension. On an open spatial chain with spacing aa, introduce canonical variables qj=a ϕjq_j=\sqrt a\,\phi_j and pj=a πjp_j=\sqrt a\,\pi_j. Before local truncation, [qj,pk]=iδjk[q_j,p_k]=i\delta_{jk}. For two sites there is one spatial bond:

    H=∑j=01[pj22+m2qj22+λqj424a]+(q1−q0)22a2.(1)H= \sum_{j=0}^{1} \left[ \frac{p_j^2}{2}+\frac{m^2q_j^2}{2} +\frac{\lambda q_j^4}{24a} \right] +\frac{(q_1-q_0)^2}{2a^2}. \tag{1}

    This is an open chain, not the two-site periodic chain with two directed nearest-neighbor contributions. The quartic coupling uses the λ/4!\lambda/4! convention. We take

    aΩ=1,m2Ω2=14,λΩ2=0.2,(2)a\Omega=1,\qquad \frac{m^2}{\Omega^2}=\frac14,\qquad \frac{\lambda}{\Omega^2}=0.2, \tag{2}

    where Ω\Omega is an oscillator reference frequency. Below, Ω=1\Omega=1 sets the numerical energy unit. There is no spatial continuum extrapolation in this two-site example.

    Write

    q=b+b†2Ω,p=−iΩ2(b−b†),Pd=∑n=0d−1∣n⟩⟨n∣.(3)q=\frac{b+b^\dagger}{\sqrt{2\Omega}}, \qquad p=-i\sqrt{\frac{\Omega}{2}}(b-b^\dagger), \qquad P_d=\sum_{n=0}^{d-1}|n\rangle\langle n|. \tag{3}

    The tensor-product projector is Pd=Pd⊗Pd\mathcal P_d=P_d\otimes P_d and the finite Hamiltonian is Hd=PdHPdH_d=\mathcal P_dH\mathcal P_d, represented in its d2d^2-dimensional range. Its onsite terms use Pdq2PdP_dq^2P_d, Pdq4PdP_dq^4P_d and Pdp2PdP_dp^2P_d. They are not obtained by squaring or taking the fourth power of the retained qq matrix.

    To see the difference, let qd=PdqPdq_d=P_dqP_d. Inserting I=Pd+(I−Pd)I=P_d+(I-P_d) gives

    Pdq2Pd−qd2=Pdq(I−Pd)qPd=d2Ω∣d−1⟩⟨d−1∣.(4)\begin{aligned} P_dq^2P_d-q_d^2 &=P_dq(I-P_d)qP_d\\ &=\frac{d}{2\Omega}|d-1\rangle\langle d-1|. \end{aligned} \tag{4}

    Only the highest retained oscillator state can make the omitted intermediate transition to ∣d⟩|d\rangle. The analogous correction for p2p^2 is dΩ∣d−1⟩⟨d−1∣/2d\Omega|d-1\rangle\langle d-1|/2. Terms on different sites behave differently: Pdq0q1Pd=qd⊗qd\mathcal P_dq_0q_1\mathcal P_d=q_d\otimes q_d, since each factor acts once in its own local Hilbert space.

    Finite matrices cannot obey an exact canonical commutator: the trace of a commutator vanishes, whereas tr⁡(iId)=id\operatorname{tr}(iI_d)=id. Indeed,

    [qd,pd]=i(Id−d∣d−1⟩⟨d−1∣).(5)[q_d,p_d] =i\left(I_d-d|d-1\rangle\langle d-1|\right). \tag{5}

    The boundary term is part of the regulator. Its effect on low-energy states must be investigated by increasing dd.

    Binary registers and unused states

    A local dd-state basis needs nb=⌈log⁡2d⌉n_b=\lceil\log_2d\rceil qubits in a binary encoding. Map ∣n⟩|n\rangle to its nbn_b-bit representation. Our ordering is site 00 first, followed by site 11; within each register, the high bit comes first. For d=3d=3,

    ∣0⟩↦∣00⟩,∣1⟩↦∣01⟩,∣2⟩↦∣10⟩.(6)|0\rangle\mapsto|00\rangle,\qquad |1\rangle\mapsto|01\rangle,\qquad |2\rangle\mapsto|10\rangle. \tag{6}

    The word ∣11⟩|11\rangle is unused. For two sites the encoding is an isometry V:Cd2→C22nbV:\mathbb C^{d^2}\to\mathbb C^{2^{2n_b}}, with V†V=IV^\dagger V=I and code projector Pcode=VV†P_{\rm code}=VV^\dagger. A useful extension of the Hamiltonian is

    Henc=VHdV†+Δu(I−Pcode).(7)H_{\rm enc} =VH_dV^\dagger+\Delta_{\rm u}(I-P_{\rm code}). \tag{7}

    The unused energy Δu\Delta_{\rm u} is an arbitrary choice outside the represented field Hilbert space. Equation (7) satisfies HencV=VHdH_{\rm enc}V=VH_d and therefore

    e−itHencV=Ve−itHd,[Henc,Pcode]=0.(8)e^{-itH_{\rm enc}}V=Ve^{-itH_d}, \qquad [H_{\rm enc},P_{\rm code}]=0. \tag{8}

    Thus every valid encoded state has exactly the finite-model evolution. If one searches the entire register for a ground state, however, the extension matters. Zero padding gives every unused word energy zero. Here the physical ground energy is positive, so that extension creates a false global ground level. Choosing Δu=20\Delta_{\rm u}=20 puts the seven unused two-site words above the physical ground in the d=3d=3 example. Restricting a variational ansatz to the code space is another way to avoid optimizing over these words.

    At d=4d=4 all sixteen words of four qubits are physical. At d=3d=3 four qubits still suffice, but only nine words are physical. A smaller oscillator cutoff therefore need not reduce the register size.

    An actual Pauli Hamiltonian

    Let X,Y,ZX,Y,Z be the usual Pauli matrices and let PwP_w be a tensor product of I,X,Y,ZI,X,Y,Z on nqn_q qubits. Their trace orthogonality gives

    Henc=∑wcwPw,cw=2−nqtr⁡(PwHenc).(9)H_{\rm enc}=\sum_w c_wP_w, \qquad c_w=2^{-n_q}\operatorname{tr}(P_wH_{\rm enc}). \tag{9}

    For a Hermitian Hamiltonian all coefficients are real. This is a complete matrix expansion, not yet a statement about an economical quantum circuit. Generic operators can have exponentially many Pauli terms.

    The local field operator provides a concrete example. At d=4d=4 and Ω=1\Omega=1, the occupation transitions have amplitudes 1/21/\sqrt2, 11, and 3/2\sqrt{3/2}. In the high-bit/low-bit order,

    q4=1+322 I⊗X+1−322 Z⊗X+12(X⊗X+Y⊗Y).(10)q_4= \frac{1+\sqrt3}{2\sqrt2}\,I\otimes X +\frac{1-\sqrt3}{2\sqrt2}\,Z\otimes X +\frac12(X\otimes X+Y\otimes Y). \tag{10}

    The first two terms distinguish the transitions 0↔10\leftrightarrow1 and 2↔32\leftrightarrow3. The last pair exchanges the binary words 01↔1001\leftrightarrow10. Expanding the correctly projected onsite powers and −q0q1/a2-q_0q_1/a^2 then gives the two-site Hamiltonian.

    For (1)–(2), the retained expansion contains 2727 nonzero Pauli words at d=4d=4, including the identity. The d=3d=3 extension with Δu=20\Delta_{\rm u}=20 contains 4848. Reconstructing the matrices from their coefficients differs by less than 8×10−158\times10^{-15} in the largest entry. The physical spectra and complex-state evolution agree with the unencoded matrices to floating-point accuracy. These checks establish the encoding of HdH_d, not the adequacy of the chosen dd.

    There is a useful subtlety in the d=3d=3 result. Some individual Pauli words have [Pw,Pcode]≠0[P_w,P_{\rm code}]\ne0, although their weighted sum commutes with the projector. Consequently a product of individual Pauli rotations need not preserve the code space at a finite step size. Exact invariance of a sum is not invariance of an arbitrary product formula. The digital-evolution article treats such approximation choices explicitly.

    What changes when the local cutoff changes?

    The finite Hamiltonian preserves global field parity (−1)n0+n1(-1)^{n_0+n_1} and exchange of the two sites. We diagonalize it in these sectors and compare with its unrestricted spectrum. For all listed cutoffs, the even, exchange-even ground state and lowest odd, exchange-even state are also the first two levels of the unrestricted matrix.

    The table lists their gap and the ground-state correlator C01=⟨q0q1⟩C_{01}=\langle q_0q_1\rangle. More digits are retained in the companion results than are needed to see the cutoff effect.

    Local dimension ddRegister qubitsGround energyOdd gapC01C_{01}
    341.021763580.585576250.26605576
    441.020372440.560044500.28234055
    661.020177880.556640030.28453052
    861.020171190.556541500.28457968
    1281.020171030.556537940.28458188
    1681.020171030.556537940.28458189

    The four-qubit encoding can be exact while its gap still differs by about 0.63%0.63\% from the larger-cutoff reference. The last two cutoffs provide a useful local convergence check; they do not constitute a rigorous infinite-dd error bound. Ground energies obey a variational ordering for these nested projected spaces, but differences of energies have no general monotonicity theorem.

    As an independent limiting check, set λ=0\lambda=0. The two open-chain normal frequencies are mm and m2+2/a2\sqrt{m^2+2/a^2}, hence (0.5,1.5)(0.5,1.5) for (2). The exact untruncated ground energy and first gap are then 11 and 0.50.5. The oscillator calculations approach both values. Independent Hermite quadrature also reproduces the retained q,q2,q4q,q^2,q^4 matrix elements, so the cutoff study is not solely a comparison of two encodings of the same matrix.

    The two-site scalar gap changes with oscillator dimension despite exact binary encoding; a separate one-oscillator field-grid calculation exhibits a fixed-range error plateau.

    Left: oscillator-cutoff dependence of the two-site odd gap, with d=16d=16 used as a finite reference. Right: a separate single-oscillator calculation illustrates field-range and field-spacing errors. Increasing grid size at fixed small range does not remove the range error. All values come from deterministic matrix calculations.

    Field-coordinate grids regulate a different boundary

    An alternative local basis consists of sampled field values. This is a discretization of a coordinate in Hilbert space, in addition to any spatial lattice. Introduce DD values

    qj=(j−D−12)δq,δq=2RD,0≤j<D,(11)q_j=\left(j-\frac{D-1}{2}\right)\delta q,\qquad \delta q=\frac{2R}{D},\qquad 0\le j<D, \tag{11}

    and a unitary discrete Fourier matrix Fkj=D−1/2e−2πikj/DF_{kj}=D^{-1/2}e^{-2\pi ikj/D}. For even DD, use momentum integers k=0,1,…,D/2−1,−D/2,…,−1k=0,1,\ldots,D/2-1,-D/2,\ldots,-1, with pk=2πk/(Dδq)p_k=2\pi k/(D\delta q). The local Hamiltonian is

    Hgrid=12F†diag⁡(pk2)F+diag⁡ ⁣(m2qj22+λqj424a).(12)H_{\rm grid} =\frac12F^\dagger\operatorname{diag}(p_k^2)F +\operatorname{diag}\!\left(\frac{m^2q_j^2}{2} +\frac{\lambda q_j^4}{24a}\right). \tag{12}

    This kinetic operator is periodic in the field coordinate with period 2R2R. Its spectral momentum cutoff is of order π/δq\pi/\delta q. The potential need not describe the intended physics near the periodic seam; low-energy wavefunctions must have negligible support there. The field range RR and the resolution δq\delta q therefore require separate checks.

    For this single-oscillator control we also fix aΩ=1a\Omega=1, retain the field-theory coefficient λ/a\lambda/a, and omit the spatial bond. With Ω=1\Omega=1, m2=.25m^2=.25 and λ=.2\lambda=.2, a 6464-level oscillator reference gives E0=0.2709936312E_0=0.2709936312 and gap 0.57649065300.5764906530; raising the reference cutoff from 4848 to 6464 changes the first two energies by less than 2×10−142\times10^{-14}. At R=3R=3, the grid gap remains near 0.6360.636 as DD rises from 88 to 3232. At R=6R=6, changing D=8D=8 to 1616 removes the coarse-spacing error, and D=16,32D=16,32 agree with the reference's first two levels within 10−910^{-9}. Agreement between regulators here tests this oscillator problem, not a spatial continuum limit.

    Field-range truncation and conjugate-momentum truncation are central to the qubit analysis of Jordan, Lee and Preskill. Their energy-dependent bounds explain why representation accuracy requires assumptions about the states being simulated; our explicitly specified Fourier matrix fixes the numerical factors in (11)–(12). See Appendix A.4, Eqs. (26)–(47), of their paper.

    Fermionic signs in an occupation register

    For fermions, each specified mode has occupation 00 or 11. Let ∣0⟩|0\rangle be empty, ∣1⟩|1\rangle occupied, and order the modes from left to right in the tensor product. Then

    cj=(∏k<jZk)Xj+iYj2,cj†=(∏k<jZk)Xj−iYj2,nj=I−Zj2.(13)c_j= \left(\prod_{k<j}Z_k\right)\frac{X_j+iY_j}{2}, \qquad c_j^\dagger= \left(\prod_{k<j}Z_k\right)\frac{X_j-iY_j}{2}, \qquad n_j=\frac{I-Z_j}{2}. \tag{13}

    The factor (X+iY)/2=∣0⟩⟨1∣(X+iY)/2=|0\rangle\langle1| annihilates an occupied mode. The ZZ string supplies a minus sign for every occupied earlier mode. For i<ji<j, moving the local raising or lowering operator through the ZiZ_i inside the other string gives the required minus sign. At equal indices the two local products sum to II. Hence

    {ci,cj†}=δijI,{ci,cj}=0.(14)\{c_i,c_j^\dagger\}=\delta_{ij}I, \qquad \{c_i,c_j\}=0. \tag{14}

    This is the Jordan–Wigner map. Somma and collaborators give the algebraic construction in §II.C, Eqs. (13)–(15), PDF p. 9 of their paper (PDF). Their spin occupation convention is related to (13) by conjugating each qubit with XX; the anticommutators are unchanged.

    For neighboring modes, hopping becomes

    cj†cj+1+cj+1†cj=12(XjXj+1+YjYj+1).(15)c_j^\dagger c_{j+1}+c_{j+1}^\dagger c_j =\frac12(X_jX_{j+1}+Y_jY_{j+1}). \tag{15}

    For distant modes, intervening ZZ operators remain. They are necessary even when they make a qubit interaction look nonlocal. Spatial dimension does not alter the map, but a choice of one-dimensional ordering affects the lengths of its strings. A finite set of fermion modes is encoded exactly; selecting that set, discretizing space, and treating gauge constraints are separate physical approximations.

    Summary

    The scalar cutoff defines HdH_d; the binary isometry and Pauli expansion can then represent that matrix exactly. True projected powers, field-coordinate boundaries and unused binary words must be specified before interpreting a spectrum. Fermionic occupation encoding instead preserves the finite-mode anticommutation algebra through explicit parity strings.

    The next scalar step is to prepare a state of this encoded Hamiltonian. The companion calculations separate representation identities from cutoff convergence, preparation error and measurement statistics.

    Exercises

    1. A qutrit with a dangerous fourth word

    Retain oscillator levels n=0,1,2n=0,1,2 and encode them as in (6). Let h=I3+diag⁡(0,1,2)h=I_3+\operatorname{diag}(0,1,2). Derive the code projector and Pauli expansion of its zero-padded encoding, then add an unused-state energy Δu\Delta_{\rm u}. Which choices make the physical ground also a global ground? Finally, compute P3q2P3−(P3qP3)2P_3q^2P_3-(P_3qP_3)^2 at Ω=1\Omega=1.

    Solution

    The unused projector is U=∣11⟩⟨11∣=(I−Z0−Z1+Z0Z1)/4U=|11\rangle\langle11|=(I-Z_0-Z_1+Z_0Z_1)/4, so

    Pcode=I−U=3I+Z0+Z1−Z0Z14.P_{\rm code}=I-U =\frac{3I+Z_0+Z_1-Z_0Z_1}{4}.

    The zero-padded number operator has diagonal entries (0,1,2,0)(0,1,2,0). Adding PcodeP_{\rm code} gives

    hzero=32I+12Z1−Z0Z1,h_{\rm zero} =\frac32I+\frac12Z_1-Z_0Z_1,

    whose diagonal entries are (1,2,3,0)(1,2,3,0). The full extension is henc=hzero+ΔuUh_{\rm enc}=h_{\rm zero}+\Delta_{\rm u}U. Its spectrum is (1,2,3,Δu)(1,2,3,\Delta_{\rm u}). The physical state ∣00⟩|00\rangle is the unique global ground if Δu>1\Delta_{\rm u}>1; at Δu=1\Delta_{\rm u}=1 it is degenerate with the unused state. A constrained optimization inside the code space always has physical ground energy 11.

    For the projected coordinate, the only lost intermediate state is ∣3⟩|3\rangle, reached from ∣2⟩|2\rangle with amplitude 3/2\sqrt{3/2}. Therefore

    P3q2P3−(P3qP3)2=32∣2⟩⟨2∣.P_3q^2P_3-(P_3qP_3)^2=\frac32|2\rangle\langle2|.

    The binary encoding is exact for either matrix, but only the first is the projection of the original q2q^2 operator.

    2. Hopping past an occupied mode

    Using the three-mode occupation convention in (13), derive the Pauli form of c0†c2+c2†c0c_0^\dagger c_2+c_2^\dagger c_0. Evaluate its action on ∣001⟩|001\rangle and ∣011⟩|011\rangle. What fails if the intervening parity string is omitted?

    Solution

    Substitute c0=(X0+iY0)/2c_0=(X_0+iY_0)/2 and c2=Z0Z1(X2+iY2)/2c_2=Z_0Z_1(X_2+iY_2)/2. The local Z0Z_0 combines with the operator at mode 00; adding the Hermitian conjugate cancels the mixed XYXY terms:

    c0†c2+c2†c0=12(X0Z1X2+Y0Z1Y2).c_0^\dagger c_2+c_2^\dagger c_0 =\frac12(X_0Z_1X_2+Y_0Z_1Y_2).

    For ∣001⟩|001\rangle, annihilation at mode 22 passes no occupied earlier mode. Creation at mode 00 then gives ∣100⟩|100\rangle with coefficient +1+1. For ∣011⟩|011\rangle, annihilation at mode 22 passes occupied mode 11 and contributes −1-1, giving −∣110⟩-|110\rangle after creation at mode 00.

    Removing Z1Z_1 assigns coefficient +1+1 to both transitions. It describes the wrong many-fermion operator even though it reproduces hopping in a sector where the middle mode is always empty. Direct assembly from occupation changes and the two CAR identities independently checks these signs.

    References

    • Stephen P. Jordan, Keith S. M. Lee and John Preskill, “Quantum Algorithms for Quantum Field Theories,” Science 336, 1130–1133 (2012), doi:10.1126/science.1217069, arXiv:1111.3633v2. Appendix A.4, Eqs. (26)–(47), develops field and conjugate-momentum cutoffs.
    • Rolando Somma, Gerardo Ortiz, James E. Gubernatis, Emanuel Knill and Raymond Laflamme, “Simulating Physical Phenomena by Quantum Networks,” Physical Review A 65, 042323 (2002), doi:10.1103/PhysRevA.65.042323, arXiv:quant-ph/0108146 (PDF). Section II.C, Eqs. (13)–(15), gives the spin–fermion map.

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.