0% found this document useful (0 votes)
10 views13 pages

BKSF

The Bravyi-Kitaev Superfast (BKSF) algorithm offers a method for mapping fermionic states to qubit states, facilitating the simulation of electronic structures on quantum computers. This paper presents the BKSF algorithm's implementation in OpenFermion, comparing its performance with other transformations like Jordan-Wigner and standard Bravyi-Kitaev for the hydrogen molecule. Results indicate that while BKSF requires fewer gates than Jordan-Wigner, it still has higher gate counts than Bravyi-Kitaev, but achieves lower Trotter errors, paving the way for further exploration of the BKSF method in quantum simulations.

Uploaded by

Aditya Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views13 pages

BKSF

The Bravyi-Kitaev Superfast (BKSF) algorithm offers a method for mapping fermionic states to qubit states, facilitating the simulation of electronic structures on quantum computers. This paper presents the BKSF algorithm's implementation in OpenFermion, comparing its performance with other transformations like Jordan-Wigner and standard Bravyi-Kitaev for the hydrogen molecule. Results indicate that while BKSF requires fewer gates than Jordan-Wigner, it still has higher gate counts than Bravyi-Kitaev, but achieves lower Trotter errors, paving the way for further exploration of the BKSF method in quantum simulations.

Uploaded by

Aditya Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Bravyi-Kitaev Superfast simulation of electronic structure on a quantum computer

Kanav Setia1 and James D. Whitfield1


1
Department of Physics and Astronomy, Dartmouth College, Hanover, NH 03755
(Dated: October 11, 2018)
Present quantum computers often work with distinguishable qubits as their computational units. In order
to simulate indistinguishable fermionic particles, it is first required to map the fermionic state to the state of
the qubits. The Bravyi-Kitaev Superfast (BKSF) algorithm can be used to accomplish this mapping. The
BKSF mapping has connections to quantum error correction and opens the door to new ways of understanding
fermionic simulation in a topological context. Here, we present the first detailed exposition of BKSF algorithm
for molecular simulation. We provide the BKSF transformed qubit operators and report on our implementation
of the BKSF fermion-to-qubits transform in OpenFermion. In this initial study of the hydrogen molecule, we
have compared BKSF, Jordan-Wigner and Bravyi-Kitaev transforms under the Trotter approximation. The gate
count to implement BKSF is lower than Jordan-Wigner but higher than Bravyi-Kitaev. We considered different
arXiv:1712.00446v3 [quant-ph] 10 Oct 2018

orderings of the exponentiated terms and found lower Trotter errors than previously reported for Jordan-Wigner
and Bravyi-Kitaev algorithms. These results open the door to further study of the BKSF algorithm for quantum
simulation.

I. INTRODUCTION of this paper is to present the methodology of the BKSF algo-


rithm and describe its implementation in OpenFermion [14].
The development of the technology to build quantum com- Further, the formalism used for BKSF is similar to the stabi-
puters has picked up pace over the last decade and is nearing a lizer formalism used for error correction.
stage where the quantum computers can be used for commer- The organization of the paper is as follows: in the next
cial purposes [1]. Groups around the world have been pursu- section, we review the background for quantum simulation.
ing the construction of quantum computing devices in a wide This includes the algebra of fermionic operators, the elec-
variety of architectures such as superconducting quantum cir- tronic Hamiltonian in second quantization, and the phase es-
cuits [2–4], photons [5], ion traps [6] and NMR [7]. One timation algorithm (PEA). Spin-to-fermion transforms are de-
major application area for these devices is simulating quan- scribed in Section III with an emphasis on BKSF. The BKSF-
tum mechanics. This has spurred research into quantum algo- transformed qubit operators corresponding to fermionic oper-
rithms for quantum simulation including quantum field theo- ators in the Hamiltonian are given in Section III. In Section
ries [8], lattice gauge theories [9], and Markovian dynamics V, we will illustrate the BKSF algorithm using a hydrogen
[10]. The present paper focuses on the quantum simulation molecule. The results and comparison of BKSF to other al-
of fermions which has received widespread attention in recent gorithms for the case of hydrogen molecule are presented in
years [11–16]. Section VI.
In general, qubits are distinguishable and individually ad-
dressable while fermions are not. This conflict leads to a va-
riety of strategies for the quantum simulation of fermions,
including the Jordan-Wigner transformation [17, 18], the
Bravyi-Kitaev transformation [19–21], auxiliary fermion II. BACKGROUND FOR QUANTUM SIMULATION
methods [19, 22, 23] and LDPC codes [16]. Other techniques
were also proposed with explicit anti-symmetrization [24–28].
In this paper we will focus on the Bravyi-Kitaev Superfast To explain quantum simulation, we first need to introduce
(BKSF) method [21]. fermionic systems and their Hamiltonians. Throughout the
Unlike other fermion-to-spin mappings, the fermionic op- paper we will be using second quantization where the algebra
erators in the BKSF algorithm do not explicitly depend on of the operators ensures antisymmetry of the electronic wave
the number of modes. Instead, the number of qubits required function. Our work focuses on non-relativistic quantum simu-
and the tensor locality of the fermionic operators depends lation; however, note that relativistic quantum simulation has
on the specific interaction graph determined by the Hamilto- been addressed in [29].
nian. Figure 1 shows a pictorial representation of the BKSF Section II A will describe electronic Hamiltonian in sec-
transform in comparison to the Jordan-Wigner transform. For ond quantization and how to transform fermionic operators to
the Jordan-Wigner transform, each qubit corresponds to an qubit operators. The Trotter-Suzuki formulas for approximat-
orbital, while the BKSF transform uses qubits to represent ing unitary evolution are presented in Section II B. The phase
the interaction terms between two orbitals. In our previous estimation algorithm, described in Section II C, can be used to
work concerning the Hubbard model [19], it was shown that extract the energy. There are a number of related methods and
the BKSF algorithm has a clear advantages over the Jordan- approaches [30–32] that are known to have better asymptotic
Wigner and standard Bravyi-Kitaev algorithms. behavior. However, given that this paper focuses on the BKSF
In this article, we turn toward applications in molecular algorithm, we will not delve into more sophisticated methods
simulation starting with the hydrogen molecule. The purpose for time evolution and quantum measurement.
2

with
  
N N
X ∇2xi 1 X 1
H(~x) = −  + Vext (xi ) + 
i
2 2 j
|x i − x j |
(2)
Here ~x = (x1 , x2 , ...xN ) represents the spatial coordinates
of all N electrons and ω ~ = (ω1 , ...ωN ) represents their spin
coordinates with ωj = ± 12 . Note that we assumed that the
external electronic potential is constant in time which is con-
sistent with the approximation of static nuclei.
Our primary focus in this article is on electronic structure.
Consequently, we will require that the N -body wave function
Ψ be completely antisymmetric. To enforce antisymmetry, we
will impose the fermionic algebra on the creation and annihi-
lation operators, {a†j }M M
j=1 and {aj }j=1 respectively. In the
second quantization formalism, the operators create and anni-
hilate into single particle modes {χj (x, ω)}M j=1 . These single
particle wave functions are called modes or orbitals through-
out this paper.
The antisymmetric property of the wave function, is built
into the algebra by having the creation and annihilation oper-
ators satisfy following relations:
aj ak + ak aj = 0, aj a†k + a†k aj = δjk 1 (3)
The action of creation and annihilation operators on
occupation number N -body basis states |f1 ...fM i =
(a†i )f1 ...(a†M )fM |Ωi is given by:
a†j |f1 ...fj−1 0fj+1 ...fM i = (−1)Γj |f1 ...fj−1 1fj+1 ...fM i
a†j |f1 ...fj−1 1fj+1 ...fM i = 0
aj |f1 ...fj−1 1fj+1 ...fM i = (−1)Γj |f1 ...fj−1 0fj+1 ...fM i
aj |f1 ...fj−1 0fj+1 ...fM i = 0 (4)
Pj−1
Here Γj = s=1 fs , and fi represents the occupation of
fermionic mode χi (x, ω) and |Ωi is the vacuum state with no
fermionic particles present.
With these operators in hand, we can turn to expressing
FIG. 1. Quantum simulation of fermionic systems requires encod- both the Hamiltonian and N -body wave function in terms of
ing the fermionic system onto qubits, studying their evolution over the underlying one-particle basis set. Firstly, we can write the
time and then decoding the qubits to get relevant fermionic system Hamiltonian as
parameters. The Jordan-Wigner transformation, shown on the left,
M M
maps each mode to a qubit. The Bravyi-Kitaev Superfast (BKSF) 1X
hij a†i aj + hijkl a†i a†j ak al
X
transformation, shown on the right, maps each edge to a qubit. The H= (5)
ij
2
schematic representation of the Bravyi-Kitaev transform is the same ijkl
as the Jordan-Wigner.
with hij and hijkl one-electron and two-electron integrals of
the operators projected into the basis set. That is to say,
∇2x
Z  

A. Fermionic Systems and Second Quantization hij = χi (x, ω) − + Vext (x) χj (x, ω)dxdω
2
∇2x
Z  

The evolution of a non-relativistic quantum system is gov- = δσi σj φi (x) − + Vext (x) φj (x)dx (6)
2
erned by Schrödinger’s equation, which in atomic units (me =
e = ~ = 1), is given by and
φ∗i (x1 )φ∗j (x2 )φk (x2 )φl (x1 )
Z
hijkl = δσi σl δσj σk dx1 dx2
|x1 − x2 |
∂Ψ
i (~x, ω
~ , t) = H(~x)Ψ(~x, ω
~ , t) (1) (7)
∂t
3

Here, the modes within the basis set were decomposed as where
χi (x, ω) = φi (x)σi (ω) with φi (x) as the spatial orbital and
1
σi (ω) as the spin function. Since the Hamiltonian does not p1 = p2 = p4 = p5 = 1 , p3 = 1 − 4p1
interact with the spin component of the wave function, σi is 4 − 43
either α(ω) or β(ω) corresponding to spin up or spin down. for the fourth order. In our study we focused on comparing
The two orthogonal spin functions are defined via α( 21 ) = the results of different algorithms using the first order Trotter-
β(− 12 ) = 1 and α(− 12 ) = β( 12 ) = 0. Suzuki formula. We present the results in the Section VI.
The fermionic operators used in the second quantized rep- An alternative is the Taylor approximation method where
resentation of electronic Hamiltonian obey the fermionic al-
gebra which is different from the algebra obeyed by qubits. x
X
Therefore, a transformation from fermionic operators to qubit Ũapprox = (−it)n H n (13)
operators is required to represent the Hamiltonian in terms of n=0
qubit operators.
is projected onto a unitary operator using amplitude amplifi-
cation [30].
B. Implementing qubit Hamiltonians on quantum computers
C. Phase Estimation Algorithm
Qubit representation of the Hamiltonian can be used to time
evolve a given state on a quantum computer. To implement
Given an unitary operator, U , and its eigenvector, v, the
the evolution, we need to implement the unitary, exp(−iHt).
phase estimation algorithm [35] allows us to calculate the
If all the qubit operators in the Hamiltonian commute then
eigenvalue, exp(2πiφ) corresponding to the given eigenvec-
the time evolution of a given state under a given electronic
tor. To carry out the algorithm we need two registers, one con-
Hamiltonian is relatively simple to achieve. The exponential
taining the eigenvector, and another to store the eigenvalue.
can be implemented as follows:
! The schematic of the algorithm is as follows:
X Y
exp(−iHt) = exp −i Hi t = exp(−iHi t) (8) |0i / QF T • QF T −1
i i
where H is the Hamiltonian, and Hi represents individual |vi / U
terms of H with qubit operators. So, each of the qubit op-
erator terms can be exponentiated in succession to implement The eigenstate, |vi, is initialized and then U is applied for a
the Hamiltonian. given amount of time. The eigenstate picks up a phase pro-
But, in general, the terms do not commute. Even in the portional to the time for which the unitary was applied and
case of hydrogen molecule in a minimal basis set, there are this phase is read from the first register. For the case of the
many non-commuting terms in the Hamiltonian. So, an ap- electronic Hamiltonian, the unitary is exp(−iHt), and the
proximation to the time evolution operator is required. The eigenvector is the ground state. As discussed earlier, apply-
Trotter-Suzuki formula [33, 34] is used to approximate the ing exp(−iHt) is not trivial for the Hamiltonian that contains
time evolution of the Hamiltonian. For two non-commuting non-commuting terms. Hence, the Trotter-Suzuki approxima-
operators A and S, the first order Trotter-Suzuki formula is tion presented in the last subsection, is used. The number of
given as: Trotter steps can be increased until chemical precision of 10−4
 At St n Hartrees is achieved.
e(A+S)t ≈ e n e n + O(t(δt)) (9)
where, t is the time for which time evolution takes place, δt = D. State preparation
t/n is the time step, and n is the number of Trotter steps used
for the approximation. Increasing the number of Trotter steps
Although the phase estimation algorithm can be used to in-
decreases the error and hence, better approximates the original
terrogate the state efficiently on quantum computers, it is not
time evolution operator.
always obvious how to prepare the initial state of the simula-
Another way to reduce the error is to use higher order
tion. In fact, such state preparation problems can be formu-
Trotter-Suzuki formulas [33, 34]. The second, third and fourth
lated as representatives of the quantum NP class [36]. Despite
order Trotter-Suzuki formulas are given as:
 At St At n the difficulty of the worst case problem instances, many prac-
e(A+S)t ≈ e 2n e n e 2n + O(t(δt)2 ) (10) tical instances can be approached using classical and quantum
 7At 2St 3At −2St −1At St n heuristics for state preparation.
e(A+S)t ≈ e 24n e 3n e 4n e 3n e 24n e n + O(t(δt)3 ) Classical approximations for the wave function with poly-
nomial length fixed-basis expansions can be input to quan-
(11) tum computers [17, 37]. Thus, Hartree-Fock wave functions
5
!n
Y pi At pi St pi At [38, 39] as well as post-Hartree-Fock wave functions [40, 41]
e(A+S)t ≈ e 2n e n e 2n + O(t(δt)4 ) (12) can be used as approximate ground states. If the approximate
i=1 state has polynomial overlap with the ground state, the phase
4

estimation algorithm can then be used a polynomial number A. Jordan-Wigner and Bravyi-Kitaev Transformation
of times to project the approximate state into the ground state.
In the cases that the classical approximation is insufficient, Just as classical computers use two-level bits as their ba-
quantum heuristics have also been developed to assist with sic units, quantum computers use qubits as their basic units
state preparation. Adiabatic state preparation [25, 38] starts which are also two-level systems. There exists an useful cor-
with a Hamiltonian with an easy to prepare ground state and respondence between orbitals and qubits, since the occupation
slowly changes it to the electronic Hamiltonian of interest. number of a particular orbital can be associated with the two
The rate of change should be slow to satisfy the adiabatic the- states of the qubits. Direct identification between occupation
orem, however it is usually not known beforehand what the of orbitals and the two levels of qubits, was first defined in
optimal schedule is. the context of 1D lattice models [18] and then proposed as a
Another quantum state preparation and measurement tech- scheme for simulating fermions [17].
nique is the variational quantum eigensolvers (VQE) [5, 13, The raising and lowering operators for qubits, given as:
31]. The VQE allows a feedback loop between the classical
and quantum computer to be established [31] and has been 1 x
Q± = (σ ∓ iσ y ) (14)
used in experimental investigations [2]. 2
do not satisfy the anti-commutation relations described by Eq.
(4). This motivates the following definition for creation and
E. OpenFermion annihilation operators:

a†j ≡ 1⊗n−j−1 ⊗ Q+ z ⊗j
j ⊗ [σ ] (15)
To facilitate the wide-spread adoption of quantum simula-
tion, researchers have been developing a Python-based toolset aj ≡ 1 ⊗n−j−1
⊗ Q−
j
z ⊗j
⊗ [σ ] (16)
called OpenFermion. OpenFermion (previously known as
Fermilib) [14] is an open source project providing the classical With these operators, the fermionic Hamiltonian represented
routines necessary for simulating fermionic models and quan- in second quantization can be transformed to the qubit Hamil-
tum chemistry problems on quantum computers. It is written tonian.
mostly in Python and supports ProjectQ [42], Psi4 [43] and Analyzing the expressions above, it is seen that the locality
few other open source projects for quantum chemistry prob- of a single fermionic operation scales as O(M ) where M is
lems. ProjectQ provides an interface for hardware and Psi4 the number of modes. This is because for an operation with
provides an interface for standard electronic structure routines the creation or annihilation operator, the qubits preceding it
such as Gaussian integral evaluations. are also involved to get the correct parity (sign). This O(M )
cost can turn out to be quite expensive as M gets large. The
The quantum simulation of a molecule begins with Hamil-
circuit for the transformed Hamiltonian can be processed be-
tonian integrals computed using Psi4. These Hamiltonian pa-
fore actually implementing it on a quantum computer. This
rameters are transformed to the qubit operators, e.g. via the
has been explored by [45] and the cost can be brought down.
BKSF algorithm, using OpenFermion. The qubit Hamiltonian
Another way to improve the simulation is by using a map-
can be further compiled to quantum hardware such as e.g. for
ping that lowers the cost of creation and annihilation opera-
the IBM Quantum Experience [44]. The hardware interfacing
tors. If instead of occupation numbers, the parity is stored in
can be done directly through OpenFermion or via ProjectQ.
the qubits then the cost for the parity operator would come
To validate the algebraic expressions of different opera-
down from O(M ) to O(1). But, with this parity scheme, ev-
tors in BKSF, Matlab code was developed for both BKSF
ery time a fermionic operator is applied it will be required to
and Jordan-Wigner. After validation, the code was ported to
update all the qubits following it to store the right parity. So,
Python and contributed to the OpenFermion project. Most of
there is no improvement and the cost for the fermionic op-
the work presented in this paper including full implementa-
erators remain O(M ). The alternative to this was provided
tion of BKSF and extensive test routines can be found at the
by Bravyi and Kitaev [21] and had already been explored
OpenFermion repository [14].
from computer science perspective [46]. The idea is to strike
a balance between storing parity and occupation number in
the qubits. It is similar to idea of Fenwick trees [19, 46] in
III. TRANSFORMATIONS FROM FERMIONIC classical computation. With Fenwick trees, occupation num-
OPERATORS TO QUBIT OPERATORS ber basis are mapped to different basis such that the cost of
parity operators and update operators is log(n). In essence,
One of the main steps of quantum simulation and the cen- Bravyi-Kitaev is a compromise between the Jordan-Wigner
tral idea for this paper is the mapping from fermionic opera- and parity-scheme.
tors to qubits operators. Given the coherence times of current
quantum computers, it is crucial to have an efficient mapping.
The mapping affects efficiency with which time evolution un- B. Bravyi-Kitaev Superfast (BKSF) Algorithm
der a given Hamiltonian can be implemented. This section
will describe Jordan-Wigner and Bravyi-Kitaev transforma- BKSF defines another spin-fermion mapping where the
tion briefly. BKSF will be explained in detail. number of gates required to implement fermion operators are
5

O(d), where d is a constant. This model draws some inspi- to the modes. If there is no interaction term in the Hamilto-
ration from Kitaev’s honeycomb model [47, 48] where Majo- nian for the two modes, then the corresponding edge in not re-
rana modes are used to make the diagonalization of the Hamil- quired in the graph. After constructing the graph correspond-
tonian tractable. First proposed by Ettore Majorana [49], the ing to the Hamiltonian, qubits are put on the edges and new
Majorana modes were real solutions to the Dirac equation. edge operators are defined which can generate the algebra of
Each modes can, at least mathematically, be split into two Ma- modes on the vertices. These operators are defined in terms of
jorana modes. Majorana modes can be defined as follows: Majorana modes.
For a case with M modes, the graph will have M vertices
c2j = aj + a†j (17) and let us assume that we have E, edges. Now, corresponding
to the creation and annihilation operators, a†j and aj , for the
c2j+1 = −i(aj − a†j ) (18)
vertices, edge operators are defined as follows [21]:
These operators are Hermitian and satisfy: Bi = −ic2i c2i+1 for each vertex, (20)
cj ck + ck cj = 2δjk (19) Aij = −ic2i c2j for each edge (i, j) ∈ E, (21)
where c2j and c2j+1 are the Majorana modes (19). The edge
With the above definition, Majorana fermions should exist in
operators satisfy the following relations [21]:
all fermionic systems.
An interesting approach, first presented by Kitaev in the Bi† = Bi , A†ij = Aij ,
context of quantum memory, was to pair Majorana fermions
by interaction [50]. This would lead to few unpaired Majo- Bi2 = 1, A2ij = 1,
rana modes which cannot interact with environment on their Bi Bj = Bj Bi , Aij = −Aji
own because the operator, cj is not physical. And hence infor- δik +δjk
Aij Bk = (−1) Bk Aij ,
mation encoded in such a system would stay protected from
δik +δil +δjk +δjl
the environment. Aij Akl = (−1) Akl Aij
The BKSF model uses Majorana modes as intermediate op- p
i Aj0 j1 Aj1 j2 ....Ajp−2 jp−1 Ajp−1 j0 = 1 (22)
erators corresponding to the interaction of fermionic modes,
for any closed loop path on the graph
which are then transformed to qubit operators. Unlike the
Jordan-Wigner and Bravyi-Kitaev algorithms, the BKSF algo- As will be shown in Section IV, all the physical fermionic
rithm requires the mapping of problem to a new model where operators can be represented in terms of these edge opera-
more qubits are required. tors. In essence, the edge operators can be used to generate
A brief summary of the BKSF algorithms is: fermionic algebra.
Furthermore, in this model, only the sector of the Hamilto-
1) Map the orbitals/modes to vertices of a graph. Number nian that has an even number of particles is examined. This
of modes required are equal to the number of one parti- is because, with the two edge operators available to us, Aij
cle basis set functions used to expand Hamiltonian. and Bi , there is no combination of Aij and Bi that produces
2) Given the Hamiltonian, get the number of edges re- single/odd number of Majorana mode operators. Similarly, an
quired for the model. individual or an odd number of creation and annihilation op-
erator represented using Majorana modes involve odd number
3) Put the qubits on the edges and find the edge operator of Majorana modes. So, we can establish that we cannot rep-
expressions for terms in the Hamiltonian using expres- resent single/odd number of creation and annihilation opera-
sions presented in Section IV. tors in the BKSF model. But this is not a problem for physical
operators because all the physical operators contain even mul-
4) Find the qubit operator representation of edge operators tiples of creation and annihilation operators which lead to an
using Eq. (24) and (25). In the Hamiltonian, replace the even number of Majorana mode operators. So, the edge op-
edge operators, Aij and Bi with Ãij and B̃i . erators are sufficient to represent the electronic Hamiltonian
and the model can be used to look at the even sector. For
5) Find the independent loops in the graph. Define stabi- the even sector of the Hamiltonian the model satisfies another
lizers for those loops. constraint:
6) Use the stabilizers to find the relevant subspace for
Y
Bi = 1 (23)
quantum simulation and the vacuum state. i

After these steps the Hamiltonian expressed in qubit operators We can sketch a way to simulate odd number of particles,
can be used along with the phase estimation algorithm (PEA) but we have not included the details in our discussion. The
to find the energy of the molecule. We will now present details Hilbert space of the abstract model defined for the Hamilto-
about the BKSF algorithm. nian can be expanded by adding an extra mode. We can make
BKSF algorithm defines an abstract model by mapping sure that the added mode does not interact with the rest of the
fermionic modes to the vertices of a graph. If two modes in- modes by not having any terms in the Hamiltonian that in-
teract then an edge is put between the vertices corresponding clude the energy for this mode. The even sector of this new
6

model can be used to simulate the odd sector of the original


model.
All the relations presented for the edge operators are in
terms of Majorana modes. These Majorana modes can be
mapped to qubits on the edges of the graph defined for the
Hamiltonian. Then, the expressions of these edge operators
in terms of the qubit operators can be calculated. The num-
ber of edge operators required for the complete description of
the system would depend on the interaction which also deter- FIG. 2. General graph showing a loop made up of two smaller loops.
mines the number of edge qubits required. In the smallest con- As we prove in the text, it is enough to stabilize the smaller indepen-
nected graph, which would be a closed chain, the number of dent loops and the bigger loop is automatically stabilized.
edges are one less than the number of vertices. So, the Hilbert
space of the qubits would actually be smaller than the Hilbert
space of the qubits used in Jordan-Wigner or Bravyi-Kitaev restrict states to the code-space [51]. Here, we use stabilizers
transformation. But, as we are just considering the even par- to remain in the Fock space of the fermions being simulated.
ticle sector, the Hilbert space associated with edge qubits is Whether we can use the same construct to also achieve error
equal to the Fock space of even number of fermions. correction while simulating fermions is something we would
In an open chain, the number of edges will be the same as like to explore in future.
the vertices. In general case, graphs will have more number of
edges than vertices. So, the size of the Hilbert space spanned
C. Stabilizers and Vacuum State
by the qubits on the edges will in general be bigger than the
size of the Fock space of modes and the Hilbert space of qubits
on the vertices. As mentioned in the previous section, the edge operators
To simulate the correct dynamics, one can define a code- Ãij and B̃i defined, satisfy all the relations satisfied by Aij
space, a subspace of the Hilbert space of edge qubits, where and Bi except for Eq. (22). So, we define stabilizer as an
the algebra of the edge operators holds. The construction of operator CL such that:
the subspace will be presented in the next section. But first,
it is necessary to construct the expressions for edge operators CL = in Aj1 j2 Aj2 j3 ....Ajn−1 jn Ajn j1 , (26)
in terms of qubit operators that satisfy the algebra. So, we L ∈ {Loops in(M, E)}
associate the edge operators defined above with Ãij and B̃i
[21]. where L represents any closed loop in the graph. And then we
To define the new operators, we need to define the orienta- define the codespace, ε as:
tion of the graph. So we define an edge matrix G where the
entries are ij = ±1 if the edge is present and 0 if the edge is ε ≡ {|Ψi | Ci |Ψi = |Ψi} (27)
not present. Further, ij = −ji and we choose to  = +1 for
If we look at the set of all the stabilizers then it can be check
i < j and assume the edges for a particular vertex are ordered
that stabilizer operators commute, which means it is possible
too. With this convention the edge operators are defined as:
to simultaneously diagonalize the set of stabilizer operators.
So, the important question becomes, do we need to stabilize
Y
z
B̃i = σij (24)
for all the operators, which in turn is equal to the total number
j:(ij)∈E
of loops? And the answer turns out to be no. We just need to
and stabilize for all the linearly independent loops because as we
n(i) n(j)
prove next all the bigger loops are automatically stabilized if
x
Y
z
Y
z all the sub loops are stabilized.
Ãij = ij σij σli σsj (25)
We consider a case where we have two small loops, e.g. L1
l<j s<i
and L2 in the Figure 2, and they share a common edge, which
where, n(i) and n(j) are the number of edges connected to means there exists a bigger loop, L3 . What we are interested
vertices i and j, respectively. in is does stabilizing L1 and L2 , stabilizes L3 ? Let us look at
It can be checked that these operators satisfy all the rela- the expression for the stabilizer for loop L1 and L2 .
tions satisfied by the original edge operators except for the
product of Aij giving 1 on a closed loops. But, as we men- CL1 = i8 Akj1 Aj1 j2 ...Aj6 j Ajk
tioned earlier the Hilbert space spanned by edge qubits is CL2 = i8 Akj Ajk1 Ak1 k2 ...Ak6 k
much bigger than the Hilbert space of the fermionic modes
we started with. Therefore, if we can restrict ourselves to the One important choice that we make here is to end the stabi-
subspace where the original relations hold then the mapping lizer for L1 on the edge jk as shown in the figure. Similarly
will be complete. we choose to start at edge kj for L2 . Here, in the expressions
The way to restrict to the subspace is through the use of given above k1 , k2 , j1 , j2 are indices for the vertices (see fig-
stabilizers. The name stabilizer comes from the error correc- ure 2). A few important points to emphasize before moving
tion where the stabilizer operators are used in similar sense to forward:
7

1) In the loops shown in the figure the smaller independent


TABLE I. Second quantization form for different fermionic operators
loops are both clockwise but we could just as well have
chosen both anti-clockwise direction. We just need Operator Second quantized form
to make sure that the independent loops are all either Number operator hii a†i ai
clockwise or all anti-clockwise. It can be checked that, Coulomb/exchange operators hijji a†i a†j aj ai
given the edge operator algebra the two directions are Excitation operator hij (a†i aj + a†j ai )
equivalent. Number-excitation operator hijjk (a†i a†j aj ak + a†k a†j aj ai )
Double excitation operator hijkl (a†i a†j ak al + a†l a†k aj ai )
2) The starting point of the loop also does not matter. We
can choose to start at any edge. So, starting with edge
kj in loop L1 does not result in the loss of generality. IV. BKSF REPRESENTATION OF ELECTRONIC
HAMILTONIAN
Now, we flip the direction of L2 , and still make sure that in the
expression for stabilizer for L2 we end with Akj So, if look at
the expression for CL1 CL2 then we get This section presents the necessary algebraic expressions
for various operators in the electronic Hamiltonian required to
CL1 CL2 = i8 Akj1 Aj1 j2 ...Ajk i8 Akj Ajk1 ...Ak6 k (28)
 
perform the BKSF transformation. The algebraic expressions
will be represented in terms of the edge operators. The Pauli-
CL1 CL2 = i16 Akj1 Aj1 j2 ...Aj6 j Ajk Akj Ajk1 ...Ak6 k
| {z } representation of the edge operators are used to get the Pauli-
A2jk Akj =−1 representation of the Hamiltonian in BKSF basis.
(29) The fermionic Hamiltonian has terms/operator that can be
14 categorized into five types. The five types of operators and
= i Akj1 ...Aj6 j Ajk1 Ak6 k = CL3 (30) their algebraic expressions in terms of creation and annihila-
which means, given tion operators are shown in Table I. These operators need to be
expressed in terms of the edge operators, following which the
CL1 |Ψi = |Ψi , CL2 |Ψi = |Ψi =⇒ CL3 |Ψi = |Ψi corresponding qubit edge operators Ãij and B̃i , can be used
(31) to get the Pauli representation of Hamiltonian. The properties
of Majorana fermions are:
The above proof can be generalized and applied to two or
more loops with one or more common edges. The algebra of c2i = ai + a†i , c2i+1 = −i(ai − a†i ), c22i = 1,
the edge operator ensures that we can construct the stabilizers ci cj + cj ci = 2δij
for bigger loops from smaller sub loops. In showing that sta-
Each class of fermionic operators are expressed in terms of
bilizing smaller loops stabilizes the bigger loops we just made
edge operators next.
use of algebra of edge operators which would also hold in case
of associated operators Ãij and B̃i and hence is valid for the
Number operator This operator shows up in the Hamilto-
new edge operators too. The next important question is, for
nian in context of potential energy in the position basis. The
a given graph how many loops do we have to consider? The
occupation number operator provides the information about
number of independent loops turn out to be E − M + 1, and
whether the mode is occupied or not. If the mode is occupied
there have been many efficient classical algorithms to figure
then potential energy of that particular modes is taken into ac-
the independent loops from a given graph [52].
count while calculating the total energy of the system. The
One important property of stabilizers is that they can also
be used as projectors to the code space. So, if we start with fermionic number operator is given by a†i ai , where i repre-
a given state, not necessarily in the code-space, then we can sent the modes number. If we start with the edge operator, Bi ,
construct an operator to project it to the code-space: we get,
Bi = − ic2i c2i+1
E−M
Y+1 (1 + CLi )
|ψi (32) = − i(ai + a†i )(−i(ai − a†i ))
N
i=1
=ai a†i − a†i ai
where the product is over all the independent loops, N is a =1 − 2a†i ai
normalization constant and ψ is any state. If we start with the
1 − Bi
state with all the qubits in the |0i state and then use the sta- =⇒ a†i ai = (33)
bilizers to project it to the code space then we wind up with 2
vacuum state. This can be checked by acting with number op- Coulomb/exchange operator Coulomb operator and ex-
erator on the vacuum state to see that it has zero particles. Vac- change operator have similar algebraic expressions but the in-
uum state is very important from the point of view of quantum tegrals associated with the operators provide very different in-
simulation since we need it to generate the initial number of formation. Coulomb operator checks if the two modes are
fermions for simulation. The expressions for both the number occupied and if they are then associated Coulombic interac-
operator and the operator with which we can initialize a state, tion energy is added to the total energy. It is difficult to asso-
in terms of the edge operators are given in the next section. ciate a physical picture with the exchange operator which is
8

consequence of antisymmetric nature of the fermionic wave Double excitation operator For double excitation operator
function. The algebraic expression for Coulombic/exchange we take the usual approach where we put in the expressions
operator is a†i a†j aj ai which can also be written as a†i ai a†j aj , for a†i and ai in terms of the Majorana modes and make use of
since ai a†j aj = a†j aj ai . Therefore, we have the properties of Majorana modes to simplify the expression.
The double excitation operator is given by:
a†i ai a†j aj = (a†i ai )(a†j aj )
   a†i a†j ak al + a†l a†k aj ai
1 − Bi 1 − Bj
= . (34)
2 2 Let us start with a†i a†j ak al :
Excitation operator Excitation operator provides informa-
a†i a†j ak al
tion about the kinetic energy associated with fermions while
going from one modes to the other. The expression for the (c2i − ic2i+1 ) (c2j − ic2j+1 ) (c2k + ic2k+1 ) (c2l + ic2l+1 )
=
excitation operator is given as a†i aj + a†j ai . We represent this 2 2 2 2
expression in terms of Majorana modes as:
Similarly,
(c2i − ic2i+1 ) (c2j + ic2j+1 )
a†i aj = a†l a†k aj ai
2 2
1 (c2l − ic2l+1 ) (c2k − ic2k+1 ) (c2j + ic2j+1 ) (c2i + ic2i+1 )
= (c2i c2j + ic2i c2j+1 − ic2i+1 c2j + c2i+1 c2j+1 ) =
4 2 2 2 2
Similarly, Now, if we add the two expressions, we are left with:

(c2j − ic2j+1 ) (c2i + ic2i+1 ) a†i a†j ak al + a†l a†k aj ai


a†j ai =
2 2 1
1 = (−Aij Akl − Aij Akl Bk Bl + Aij Akl Bi Bk
= (c2j c2i + ic2j c2i+1 − ic2j+1 c2i + c2j+1 c2i+1 ) 8
4 + Aij Akl Bi Bl + Aij Akl Bj Bk + Aij Akl Bj Bl
1
= (−c2i c2j + ic2j c2i+1 + ic2i c2j+1 − c2i+1 c2j+1 ) − Aij Akl Bi Bj + Aij Akl Bi Bj Bk Bl )
4
1
Adding the two expressions, = Aij Akl (−1 − Bi Bj + Bi Bk + Bi Bl + Bj Bk
8
1 + Bj Bl − Bk Bl + Bi Bj Bk Bl ) (37)
a†i aj + a†j ai = (ic2i c2j+1 + ic2j c2i+1 )
2 Particle creation operator The way to initialize a state us-
Therefore, we get ing fermionic creation operators is straightforward. Applying
creation operator, corresponding to the occupied mode, to the
vacuum initializes the state. But, as we have discussed the
 
1 Aij Bj Aji Bi
a†i aj + a†j ai = i +i edge operators can not be used to represent single/odd number
2 −i −i −i −i
of creation or annihilation operators. So, initialization must
−i
= (Aij Bj + Bi Aij ) (35) always occur in pairs.
2
We can start with a†i a†j and follow the same procedure
Number excitation operator Number excitation operator is where we substitute the creation and annihilation operators in
a two-body term which arises because of the antisymmetric terms of Majorana operators.And then we can try to simplify
nature of the wave function. It is difficult to come up with the expression to get it in terms of edge operators. Instead of
physical interpretation of number excitation operator and dou- this long procedure we can make a guess based on the expres-
ble excitation operator which is presented next. The number sion for excitation operator:
excitation operator is given by:
−i
a†i a†j + ai aj = (Aij Bj − Bi Aij ) (38)
a†i a†j aj ak + a†k a†j aj ai 2
Adding annihilation operators to the expression is not a prob-
which can be rearranged in terms of the number operator and
lem because acting on the vacuum with annihilation operators
excitation operator, for which we already have the expressions
gives zero. And, it can be checked that the expression works.
in terms of edge operators.
This completes all the analytic expressions we are going to
need to represent any electronic Hamiltonian in BKSF basis.
a†i a†j aj ak + a†k a†j aj ai = (a†i ak + a†k ai )(a†j aj )
The edge operators, Aij , Bi used in all the above expressions
−i (1 − Bj ) can be replaced by the equivalent qubit operators Ãij and B̃i
= (Aik Bk + Bi Aik )
2 2 for quantum simulation. Based on the derived expressions,
(36) only three terms lead to an edge between vertices in the graph:
9

excitation operator, number excitation operator and double ex-


citation operator.
Only when we have an Aij edge operator in an expression,
we need to put an edge between vertices, i and j. In the molec-
ular electronic Hamiltonian the Coulomb interaction is pair-
wise and long distance. However, the degree of the edge graph
does not need to change when the terms are strictly Coulom-
bic.

V. ELECTRONIC HAMILTONIAN OF HYDROGEN FIG. 3. Pictorial representation of the fermionic modes and the inter-
MOLECULE action between them for the hydrogen molecule. This graph is based
on the Hamiltonian given in Eq. (41) and (43).
We will use the abstract model presented in the previous
section and apply it to the example of hydrogen molecule. The
electronic Hamiltonian, Eq. 5, in minimal basis will have four the numbering would go something like,
fermionic modes and hence we will need four vertices for the
graph. The Hamiltonian was worked out by [39] and is given
4 3 2 1
as follows: z }| { z }| { z }| { z }| {
(3, 4) ← (2, 3) ← (1, 4) ← (1, 2)
H(1) = h11 a†1 a1 + h22 a†2 a2 + h33 a†3 a3 + h44 a†4 a4
So, we would need four qubits in total to simulate.
H(2) = h1221 a†1 a†2 a2 a1 + h3443 a†3 a†4 a4 a3 + h1441 a†1 a†4 a4 a1 +
The required operators for BKSF model in terms of Pauli
h2332 a†2 a†3 a3 a2 + (h1331 − h1313 )a†1 a†3 a3 a1 operators are given below. We make use of Eq. (24) and (25),
+ (h2442 − h2424 )a†2 a†4 a4 a2 to get the Pauli representation of the edge operators.

+ h1243 (a†1 a†2 a4 a3 + a†3 a†4 a2 a1 )


B1 = σ2z σ1z B2 = σ3z σ1z
+ h1423 (a†1 a†4 a2 a3 + a†3 a†2 a4 a1 ) B3 = σ4z σ3z B4 = σ4z σ2z
H = H(1) + H(2) (39) A12 = σ1x A14 = σ2x σ1z
A23 = σ3x σ1z A34 = σ4x σ3z σ2z (40)
This is the second quantization representation of the Hamil-
tonian in molecular orbital basis. The molecular orbitals are
Next, we represent the hydrogen Hamiltonian in terms of
obtained using Hartree-Fock method [53]. Although, in this
BKSF edge operators. The one body terms in second quan-
case the molecular orbitals can also be obtained based on the
tization formulation are given by:
symmetry. The bonding and anti-bonding orbitals are even
and odd combinations of the atomic orbitals. The one-electron
and two-electron integrals can be computed using open-source H(1) = h11 a†1 a1 + h22 a†2 a2 + h33 a†3 a3 + h44 a†4 a4 (41)
quantum chemistry packages e.g. [43, 54].
Each of the fermionic terms in the Hamiltonian can be Substituting the number operator in terms of edge operators
transformed to qubit operators using a particular transforma- we get:
tion. The Jordan-Wigner and Bravyi-Kitaev transformation
of hydrogen Hamiltonian has been detailed and analyzed in 1
[19, 20]. We will now present the steps required to transform H(1) = (h11 (1 − B1 ) + h22 (1 − B2 ) + h33 (1 − B3 )
2
the hydrogen molecule Hamiltonian from second quantization + h44 (1 − B4 )) (42)
representation to the qubit operators in case of BKSF algo-
rithm. In BKSF, the orbitals are mapped to a connected and
unoriented graph which can be constructed from the Hamilto- Similarly, two-body terms are given by:
nian.
Based on the Hamiltonian, we will need four edges in the H(2) = h1221 a†1 a†2 a2 a1 + h3443 a†3 a†4 a4 a3 + h1441 a†1 a†4 a4 a1
graph (note that the Coulomb terms do not contribute). The + h2332 a†2 a†3 a3 a2 + (h1331 − h1313 )a†1 a†3 a3 a1
final graph is shown in the Figure 3. Based on the graph, we
would have four B̃i operators and four Ãij operators. Before + (h2442 − h2424 )a†2 a†4 a4 a2
we give the Pauli representation of the edge qubits, the con- + h1243 (a†1 a†2 a4 a3 + a†3 a†4 a2 a1 )
vention for the way qubits are labeled, needs to be specified.
For the case of hydrogen where we have 4 × 4 edge matrix + h1423 (a†1 a†4 a2 a3 + a†3 a†2 a4 a1 ) (43)
10

substituting edge operators and simplifying we get: corresponding to the Hamiltonian. From Figure 3, we can see
that there is just one loop:
h1221
H(2) = (1 − B1 − B2 + B1 B2 )
4 L1 → (1234) (45)
h3443
+ (1 − B3 − B4 + B3 B4 )
4 and it agrees with the formula for the number of independent
h1441 loops, L − M + 1 = 1 − 1 + 1 = 1. The expressions for the
+ (1 − B1 − B4 + B1 B4 ) stabilizer for this loop is given by:
4
h2332
+ (1 − B2 − B3 + B2 B3 ) StabL1 = A12 A23 A34 A41 (46)
4
(h1331 − h1313 ) The edge operators Aij can be replaced by the corresponding
+ (1 − B1 − B3 + B1 B3 )
4 Ãij and Pauli representation for the stabilizers could be found.
(h2442 − h2424 ) As we presented in Section III C, stabilizer operators define
+ (1 − B2 − B4 + B2 B4 )
4 the code-space for the system. The stabilizer presented here
h1243 will define the code-space for the hydrogen molecule system.
+ A12 A43 (−1 − B1 B2 + B1 B4 + B1 B3
8 We can find the vacuum state of the system in BKSF basis
+ B2 B4 + B2 B3 − B4 B3 + B1 B2 B4 B3 ) using Eq. (32). Once the state is initialized using the vacuum
h1423 state, the state will remain in the code space.
+ A14 A23 (−1 − B1 B4 + B1 B2 + B1 B3
8
+ B4 B2 + B4 B3 − B2 B3 + B1 B4 B2 B3 )
VI. RESULTS
Now, replacing Aij and Bi with Ãij and B̃i , Eq. (40) in H(1)
and H(2) we get the Pauli representation of the Hamiltonian In this section we start by presenting the Hamiltonian
as: for hydrogen molecule in BKSF, Jordan-Wigner and Bravyi-
Kitaev basis. Next, we present the number of gates required
1 to implement a given term in the Hamiltonian. The number
H = (2h11 + 2h22 + 2h33 + 2h44 + h1221 + h3443
4 of gates required for a single Trotter step are presented in the
+ h1441 + h2332 + h1331 − h1313 + h2442 − h2424 ) Table III. Finally, we present the analysis of Jordan-Wigner,
1 Bravyi-Kitaev, and BKSF algorithm for the case of hydrogen
+ (−2h11 − h1221 − h1441 − h1331 + h1313 )σ2z σ1z molecule.
4
1 To obtain the spin Hamiltonian, we used a combination of
+ (−2h22 − h1221 − h2332 − h2442 + h2424 )σ3z σ1z Psi4 and OpenFermion. The necessary molecular integrals are
4
1 given in Table II. First, the hydrogen molecular Hamiltonian
+ (−2h33 − h3443 − h2332 − h1331 + h1313 )σ4z σ3z via BKSF is given by:
4
1
+ (−2h44 − h3443 − h1441 − h2442 + h2424 )σ4z σ2z HBKSF = − 0.045321σ4z σ3x σ2x σ1z − 0.045321σ4z σ3y σ2y σ1z
4
1 1 + 0.171201σ2z σ1z + 0.045321σ4x σ1x
+ (h1221 + h3443 )σ3z σ2z + (h1441 + h2332 )σ4z σ1z + 0.171201σ3z σ1z + 0.3429725σ3z σ2z
4 4
1
+ (h1331 − h1313 + h2442 − h2424 )σ4z σ3z σ2z σ1z + 0.045321σ4y σ1y − 0.2227965σ4z σ3z
4 + 0.045321σ4y σ3z σ2z σ1y − 0.2227965σ4z σ2z
h1243 x x
+ (σ4 σ1 + σ4y σ1y + σ4y σ3z σ2z σ1y ) − 0.045321σ3y σ2y + 0.2410925σ4z σ3z σ2z σ1z
4
h1423 + 0.331736σ4z σ1z − 0.812610I (47)
+ (−σ4z σ3x σ2x σ1z − σ3y σ2y − σ4z σ3y σ2y σ1z ) (44)
4 The qubit Hamiltonians corresponding to the Jordan-Wigner
This completes the transformation of the Hamiltonian to qubit and Bravyi-Kitaev algorithms are given by:
operators. This Hamiltonian can be exponentiated and be used
along with phase estimation algorithm (PEA) to get the ener- HJW = − 0.81261I − 0.045321σ4x σ3x σ2y σ1y
gies of the molecule. − 0.222796σ3z + 0.045321σ4x σ3y σ2y σ1x
To restrict the dynamics to the Fock space, we need to make − 0.222796σ4z + 0.045321σ4y σ3x σ2x σ1y
use of stabilizers. Stabilizers can be used to get the vacuum
state of the system, which then can be used to initialize a given + 0.17434925σ4z σ3z − 0.045321σ4y σ3y σ2x σ1x
state. Once a state is initialized in the code space, it remains in + 0.171201σ1z + 0.171201σ2z
code space as the edge operators commute with the stabilizer + 0.1686232σ2z σ1z + 0.165868σ3z σ2z
operators.
+ 0.165868σ4z σ1z + 0.120546σ3z σ1z
As we discussed in the last section the stabilizers for a given
Hamiltonian are based on the independent loops in the graph + 0.120546σ4z σ2z (48)
11

TABLE II. One-electron and two-electron molecular integrals for hy- TABLE III. Total gate requirements to implement the unitary
drogen molecule. The integrals were calculated using the Psi4 with exp(−iHt) for Jordan-Wigner, Bravyi-Kitaev, and BKSF algorithm.
STO-3G [55] as the basis set, and bond length 0.7414 Å.
Hamiltonian Gate Count
Integrals Value (in Atomic Units) HJW 82
h11 = h22 -1.25246357 HBK 74
h33 = h44 -0.47594871 HBKSF 79

h1221 = h2112 0.33724438


h3443 = h4334 0.34869688
h1331 = h1441 = h2332 = h2442 0.33173404
= h3113 = h4114 = h3223 = h4224
h1313 = h2424 = h3241 = h3421 0.09064440
= h1423 = h1243

HBK = − 0.81261I + 0.045321σ3x σ2z σ1x


− 0.222796σ3z + 0.045321σ3y σ2z σ1y
− 0.222796σ4z σ3z σ2z + 0.045321σ4z σ3x σ2z σ1x
+ 0.17434925σ4z σ2z + 0.045321σ4z σ3y σ2z σ1y
+ 0.171201σ2z σ1z + 0.171201σ1z
+ 0.1686232σ2z + 0.165868σ3z σ2z σ1z
+ 0.165868σ4z σ3z σ2z σ1z + 0.120546σ3z σ1z
+ 0.120546σ4z σ3z σ1z (49)
FIG. 4. Plots of ground state energies as a function of Trotter steps
To analyze total gate requirement for phase estimation al- used to approximate time evolution using the Jordan-Wigner algo-
gorithm, we need to consider the gate requirement for a rithm. Different lines correspond to 1000 orderings of the exponen-
given term in the Hamiltonian. So, let us consider the term tiated qubit operators of the Jordan-Wigner Hamiltonian.
σ3z ⊗ σ2z ⊗ σ1z . The circuit is given by:
• •
for all of them is difficult task. So, we will just analyze the
• •
minimum number of gates that will be required, no matter the
Rz quantum computer architecture.
The total number of gates required are five: four CN OT Since in general, there are non-commuting terms in the
gates, and one Rz . For exp(iX ⊗ Y ⊗ Z) we first change Hamiltonian, implementation of the unitary exp(−iHt) is not
the basis and then apply CN OT and Rz gates and undo the as straightforward. We need to use Trotter-Suzuki approxima-
change of basis. tion as presented in Section II B. In this initial investigation
into the BKSF, we have used first order Trotter-Suzuki ap-
H • • H proximation for our analysis. Trotter-Suzuki approximation
depends on the order in which the terms of the Hamiltonian
Rx • • Rx† are implemented. If the ordering is not optimized then it can
Rz take up to eleven Trotter steps to the get the ground state en-
ergy with required precision. This would require more than
Knowing the gate requirements for the two circuits presented, 800 gates for each of the algorithms.
we can calculate the total gate requirement for each term in Ref. [20] reported a strategy which works in bringing down
the Hamiltonian. Table III presents the total gates required to the number of Trotter steps required to achieve a given pre-
implement the unitary, exp(−iHt), using a single Trotter step cision in ground state energy. We refer to it as magnitude
for all the three algorithms. ordering. For this strategy, the terms containing σ z are sepa-
Before continuing to describe our results, it should be noted rated from terms containing σ x and σ y . Then, the terms are
that we have ignored the hardware implementation specific arranged in increasing order of the magnitude of their coef-
details. For example, it may not be possible to apply CN OT ficients. The terms containing σ x and σ y are padded in be-
gate between two qubits which are far from each other on an tween the terms containing σ z . Since the number of σ x and
actual computer. In that case, we would have to use SW AP σ y terms are less than σ z terms, the extra σ z terms are ap-
gates adding to both the error and cost of the algorithm. Alter- plied at the end. The number of Trotter steps required with
natively, one could achieve non-local interactions using a me- this strategy are four for Jordan-Wigner and Bravyi-Kitaev. In
diating quantum bus qubit e.g. [56]. Analyzing all the avail- general, it is not possible to come up with the best ordering
able architectures and coming up with optimum gate count because the number of possible orderings grow as a factorial
12

graph. Whereas each term in the Hamiltonian scales as O(M )


and O(log(M )) for Jordan-Wigner and Bravyi-Kiteav algo-
rithm, where M is the number of modes. Now, if we assume
that the interaction is reasonably local in a given molecule,
that is the degree is bounded, then scaling of BKSF algorithm
will be proportional to the number of terms in the Hamilto-
nian times O(d). Whereas, the scaling of Jordan-Wigner will
be proportional to the number of terms in Hamiltonian, times
O(M ). Since the number of terms in the Hamiltonian will be
of the same order for both the cases, BKSF will scale better
compared to Jordan-Wigner algorithm asymptotically.
From the results for the hydrogen molecule, it can be seen
that the gate count of BKSF is more than Bravyi-Kitaev but
less than Jordan-Wigner. The degree of the graph for BKSF
algorithm is two and the number of modes are four. For small
and medium sized molecules, due to the overlap of the atomic
orbitals, the maximum degree of the graph will increase. This
also depends on the extent of the orbitals but as noted above
FIG. 5. Ground state energy as a function of Trotter steps for the
the Coulomb interactions will not contribute edges to the in-
orderings that give the lowest error. For each of the three methods,
we found an ordering that achieved the plotted Trotter error. teraction graph. Thus, for systems with sufficiently localized
orbitals, we expect BKSF to perform better.

of the number of terms in the Hamiltonian. But, it is possible


to generate random permutations to get the behavior of the er- VII. CONCLUSION
ror. For our analysis we used 1000 randomly generated order-
ings and ran the code multiple times for all three algorithms. In this article, we have explored the Bravyi-Kitaev Super-
A graph of ground state energy for given number of Trotter fast simulation and illustrated the method on the hydrogen
steps with 1000 different orderings is plotted in Figure 4 for atom. The implementation of the algorithm can be found on-
Jordan-Wigner. Similar results were found for Bravyi-Kitaev line at OpenFermion [14]. We have compared the Trotter-
and BKSF algorithms. error for BKSF, Jordan-Wigner and Bravyi-Kitaev algorithm.
We point out that for each ordering of the Jordan-Wigner We are currently extending our investigation to larger
terms, we were able to find a corresponding ordering for both molecules and observing the importance of choosing the cor-
Bravyi-Kitaev and BKSF that achieved the same error. One rect one-body basis. In the present study, we only looked
of the orderings for BKSF which was found using random at the hydrogen Hamiltonian in the molecular orbital basis
permutations and which gives minimum error is given in Eq. but as the one-body basis changes, the interaction graph also
(47). Our results for hydrogen indicate that the Bravyi-Kitaev changes. Other algorithms for time evolution and measure-
and Jordan-Wigner spin Hamiltonian terms can be aligned so ment e.g. [30–32] are compatible with the BKSF scheme out-
that the same reordering of the terms yield in the same Trotter lined here although specifics remain to be worked out.
error. This is illustrated in Figure 5, where the Trotter error of Also, we have not considered quantum architecture limi-
all three algorithms collapse onto the same curve. tations. OpenFermion can be used to test BKSF and other
The improved ordering scheme gave single-step Trotter er- methods on actual quantum hardware. It will be particularly
rors in the ground state energy of 5.4803 × 10−4 Hartrees. To interesting to study the noise properties of the BKSF model
obtain errors less than 10−4 Hartrees, three Trotter steps are given its close connection to topological quantum error cor-
required. This translates to a gate requirement of 246, 222, rection. This also requires further exploration.
and 237 for Jordan-Wigner, Bravyi-Kitaev and BKSF respec-
tively. Further, even in a sample of 1000 random orderings
there were more than one ordering that gave minimum error.
To get an idea about when BKSF might perform better com- ACKNOWLEDGEMENTS
pared to Jordan-Wigner and Bravyi-Kitaev, we can consider
how each of these algorithms scale assuming spatially local The authors would like to thank T. Hardikar for helpful
interactions. Analyzing the expressions of edge operators, it comments on the manuscript, and R. Babbush, T. Häner, D.
can be seen that both B̃i and Ãij , Eq. (24) and (25), scale as Steiger, and J. McClean for their help with OpenFermion. The
O(d), where d is the degree of the graph. Each term in the authors acknowledge financial support from the Walter and
Hamiltonian in BKSF, scales linearly with the degree of the Constance Burke Research Initiation Award.

[1] M. Mohseni, P. Read, H. Neven, S. Boixo, V. Denchev, R. Bab- 171 (2017).


bush, A. Fowler, V. Smelyanskiy, and J. Martinis, Nature 543,
13

[2] P. J. J. O’Malley, R. Babbush, I. D. Kivlichan, J. Romero, J. R. Letters 118, 100503 (2017).


McClean, R. Barends, J. Kelly, P. Roushan, A. Tranter, N. Ding, [33] H. Trotter, Proceedings of the American Mathematical Society
et al., Physical Review X 6, 031007 (2016). 10, 545 (1959).
[3] R. Barends, J. Kelly, A. Megrant, A. Veitia, D. Sank, E. Jeffrey, [34] M. Suzuki, Physical Letters A 165, 387 (1992).
T. C. White, J. Mutus, A. G. Fowler, B. Campbell, et al., Nature [35] I. Chuang and M. Nielsen, Quantum Computation and Quan-
508, 500 (2014). tum Information (Cambridge University Press, 2000).
[4] J. Kelly, R. Barends, B. Campbell, Y. Chen, Z. Chen, B. Chiaro, [36] A. Y. Kitaev, A. H. Shen, and M. N. Vyalyi, Classical
A. Dunsworth, A. G. Fowler, I.-C. Hoi, E. Jeffrey, et al., Physi- and Quantum Computation (American Mathematical Society,
cal Review Letters 112, 240504 (2014). 2002).
[5] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, [37] R. Somma, G. Ortiz, J. E. Gubernatis, E. Knill, and
P. J. Love, and J. L. O. Brien, Nature Communications 5, 4213 R. Laflamme, Physical Review A 65, 042323 (2002).
(2014). [38] A. Aspuru-Guzik, A. D. Dutoi, P. J. Love, and M. Head-
[6] K. R. Brown, J. Kim, and C. Monroe, npj Quantum Information Gordon, Science 309, 1704 (2005).
2 16034 (2016). [39] J. D. Whitfield, J. Biamonte, and A. Aspuru-Guzik, Molecular
[7] J. Du, N. Xu, X. Peng, P. Wang, S. Wu, and D. Lu, Physical Physics 109, 735 (2011).
Review Letters 104, 030502 (2010). [40] L. Veis and J. Pittner, The Journal of Chemical Physics 133,
[8] S. P. Jordan, K. S. M. Lee, and J. Preskill, Science 336, 1130 194106 (2010).
(2012). [41] H. Wang, S. Kais, A. Aspuru-Guzik, and M. R. Hoffmann,
[9] E. Zohar, A. Farace, B. Reznik, and J. I. Cirac, Physical Review Physical Chemistry Chemical Physi 10, 5388 (2008).
Letters 118 (2017). [42] D. S. Steiger, T. Haner, and M. Troyer (2016),
[10] A. M. Childs and T. Li (2016), arXiv:1611.05543. arXiv:1612.08091.
[11] B. P. Lanyon, J. D. Whitfield, G. G. Gillett, M. E. Goggin, M. P. [43] R. M. Parrish, L. A. Burns, D. G. A. Smith, A. C. Simmonett,
Almeida, I. Kassal, J. D. Biamonte, M. Mohseni, B. J. Powell, A. E. DePrince, E. G. Hohenstein, U. Bozkaya, A. Y. Sokolov,
M. Barbieri, et al., Nature Chemistry 2, 106 (2010). R. Di Remigio, R. M. Richard, et al., Journal of Chemical The-
[12] M.-H. Yung, J. D. Whitfield, S. Boixo, D. G. Tempel, and ory and Computation 13, 3185 (2017).
A. Aspuru-Guzik, Introduction to Quantum Algorithms for [44] A. W. Cross, L. S. Bishop, J. A. Smolin, and J. M. Gambetta
Physics and Chemistry (John Wiley & Sons, Inc., 2014). (2017), arXiv:1707.03429.
[13] J. Romero, R. Babbush, J. R. McClean, C. Hempel, and P. Love [45] M. B. Hastings, D. Wecker, B. Bauer, and M. Troyer, Quantum
(2017), arXiv: 1701.02691. Information & Computation 15, 1 (2015).
[14] J. R. McClean, I. D. Kivlichan, D. S. Steiger, Y. Cao, E. S. [46] P. M. Fenwick, Software: Practice and Experience 24, 327
Fried, C. Gidney, T. Haner, V. Havlicek, Z. Jiang, M. Neeley, (1995).
et al. (2017), arXiv:1710.07629. [47] A. Kitaev, Annals of Physics 321, 2 (2006).
[15] A. Kandala, A. Mezzacapo, K. Temme, M. Takita, M. Brink, [48] J. K. Pachos, Annals of Physics 322, 1254 (2007).
J. M. Chow, and J. M. Gambetta, Nature 549, 242 (2017). [49] E. Majorana, Nuovo Cimento (1937) 14, 171 (1937).
[16] S. Bravyi, J. M. Gambetta, A. Mezzacapo, and K. Temme [50] A. Y. Kitaev, Physics-Uspekhi 44, 131 (2001).
(2017), arXiv:1701.08213. [51] D. Gottesman (1997), arXiv:quant-ph/9705052.
[17] G. Ortiz, J. E. Gubernatis, E. Knill, and R. Laflamme, Physical [52] K. Paton, Communications of the ACM 12, 514 (1969).
Review A 64, 022319 (2001). [53] A. Szabo and N. S. Ostlund, Modern Quatnum Chemistry
[18] P. Jordan and E. Wigner, Zeitshrift für Physik 47, 631 (1928). (Dover Publications, 1996).
[19] V. Havlı́ček, M. Troyer, and J. D. Whitfield, Physical Review A [54] Q. Sun, T. C. Berkelbach, N. S. Blunt, G. H. Booth, S. Guo,
95, 032332 (2017). Z. Li, J. Liu, J. McClain, E. R. Sayfutyarova, S. Sharma, et al.
[20] J. T. Seeley, M. J. Richard, and P. J. Love, The Journal of Chem- (2017), arXiv:1701.08223.
ical Physics 137, 224109 (2012). [55] J. B. Collins, P. v. R. Schleyer, J. S. Binkley, and J. A. Pople,
[21] S. B. Bravyi and A. Yu Kitaev, Annals of Physics 298, 210 Journal of Chemical Physics 76, 5142 (1976).
(2000). [56] G. Zhu, Y. Subasi, J. D. Whitfield, and M. Hafezi (2017),
[22] R. C. Ball, Physical Review Letters 95, 176407 (2005). arXiv:1707.04760.
[23] F. Verstraete and J. I. Cirac, Journal of Statistical Mechanics:
Theory and Experiment 09, P09012 (2005).
[24] C. Zalka, Proceedings of the Royal Society of London A: Math-
ematical, Physical and Engineering Sciences 454, 313 (1998).
[25] D. A. Lidar and H. Wang, Physical Review E 59, 2429 (1999).
[26] S. Wiesner (1996), arXiv:quant-ph/9603028.
[27] I. Kassal, S. P. Jordan, P. J. Love, M. Mohseni, and A. Aspuru-
Guzik, Proceedings of the National Academy of Sciences 105,
18681 (2008).
[28] S. Lloyd, Science 273, 1073 (1996).
[29] L. Veis, J. Višňák, T. Fleig, S. Knecht, T. Saue, L. Visscher, and
J. c. v. Pittner, Physical Review A 85, 030304 (2012).
[30] D. W. Berry, A. M. Childs, R. Cleve, R. Kothari, and R. D.
Somma, Physical Review Letters 114, 090502 (2015).
[31] J. R. McClean, J. Romero, R. Babbush, and A. Aspuru-Guzik,
New Journal of Physics 18, 023023 (2016).
[32] S. Paesani, A. A. Gentile, R. Santagati, J. Wang, N. Wiebe,
D. P. Tew, J. L. O’Brien, and M. G. Thompson, Physical Review

You might also like