Sie sind auf Seite 1von 16

Quantum simulation of negative hydrogen ion using varia-

tional quantum eigensolver on IBM quantum computer


Shubham Kumar1 , Rahul Pratap Singh2 , Bikash K. Behera2 , and Prasanta K. Panigrahi2
1
Department of Physics, Central University of Jharkhand, Brambe, Ranchi, India
2
Department of Physical Sciences, Indian Institute of Science Education and Research Kolkata, Mohanpur 741246, West
Bengal, India

The negative hydrogen ion is the in a classical computer for energy conver-
first three body quantum problem whose gence. An optimization routine is per-
arXiv:1903.03454v2 [quant-ph] 12 Mar 2019

ground state energy is calculated using formed on classical computer by running


the “Chandrasekhar Wavefunction” that quantum chemistry program and codes in
accounts for the electron-electron corre- QISKit to converge the energy to the min-
lation [1]. Solving multi-body systems imum. We also present a comparison of
is a daunting task in quantum mechanics different optimization routines and encod-
as it includes choosing a trial wavefunc- ing methods used to converge the energy
tion and the calculation of integrals for value to the minimum. The technique can
the system that becomes almost impossi- be used to solve various many body prob-
ble for systems with three or more parti- lems [4] with great efficiency.
cles. This difficulty can be addressed by
quantum computers. They have emerged
as a tool to address different electronic 1 Introduction
structure problems with remarkable effi-
ciency. They have been realized in vari- Quantum simulation [5] is a fast-growing field
ous fields and proved their efficiency over which promises to have profound applications in
classical computers. Here, we show the the field of condensed-matter physics, nuclear
quantum simulation of H − ion to calcu- physics, quantum cosmology, quantum chemistry,
late it’s ground state energy in IBM quan- and quantum biology. According to Feynman
tum computer. The energy is found to [6], a quantum computer can deal with expo-
be -0.5339355468 Hartree with an error nential amount of information without using ex-
of 0.8376% as compared to the theoret- ponential amount of resources. He pointed out
ical value. We observe that the quan- that physical systems can be studied on quan-
tum computer is efficient in preparing the tum computers. A decade later, Lloyd proved
correlated wavefunction of H − and calcu- that a quantum computer can actually be used as
lating it’s ground state energy. We use a universal quantum simulator [7]. Simulations
a recently developed algorithm known as of quantum systems have always been a tough
“Variational Quantum Eigensolver” [2, 3] job even for present generation supercomputers,
and implement it in IBM’s 5-qubit quan- due to the exponential explosion when the sys-
tum chip “ibmqx2”. The method consists tem size increases. Hence, the use of quantum
of a quantum part i.e., state preparation computer for quantum simulation is essential for
and measurement of expectation values us- near term future applications. A wide range of
ing the quantum computer, and the classi- problems in condensed-matter physics e.g., quan-
cal part i.e., the optimization routine run tum phase transitions [8], quantum magnetism
[9], in quantum chemistry e.g., calculating molec-
Shubham Kumar: shubhamkumar.kumar@gmail.com
ular energy values [10], in nuclear physics e.g.,
Rahul Pratap Singh: singhprataprahul97@gmail.com
studying atomic nucleus dynamics [11], in quan-
Bikash K. Behera: bkb18rs025@iiserkol.ac.in
tum biology e.g., analyzing the structure of pro-
Prasanta K. Panigrahi: pprasanta@iiserkol.ac.in
tein and DNA [12], in quantum cosmology e.g.,

1
structuring space-time curves [13, 14] can be ad-
dressed using quantum computers. A detailed
review and future applications and implications
of quantum simulation can be found from these
Refs. [5, 15, 16, 17]. Different architectures such
as optical lattice- [18, 19], trapped ions- [20],
nuclear spins- [21], superconducting qubit- [22]
based quantum computers have been extensively
used in the past for simulation of quantum sys-
tems.
Since 2016, IBM provides the composer on its
Figure 1: Schematic diagram of Hydride Ion. Elec-
website which is a cloud-based quantum comput- tron 2 is closer to the nucleus than electron 1.
ing platform [23]. Any user can give a quantum
circuit on the five-, and sixteen-qubit devices for
a real run or simulation which is available with search. It attracted attention as an application of
the help of QISKit Terra and use it by changing quantum mechanics to a two electron system dur-
backend to perform a run or simulation. IBM Q ing the early development of quantum mechanics.
Experience has now been used to perform a num- It has an astrophysical importance as it is found
ber of real experiments on the quantum chips. in stars because of the presence of hydrogen and
The real experiments include quantum simulation low energy electrons that can form a bound struc-
[3, 24, 25, 26, 27, 28, 29, 30, 31, 32], developing ture when an electron comes in the vicinity of the
quantum algorithms [33, 34, 35, 36, 37, 38, 39], hydrogen atom [53]. The main source of opacity
testing of quantum information theoretical tasks in the atmosphere of the Sun at red and infrared
[27, 33, 40, 41, 42], quantum cryptography [43, wavelengths was predicted due to the absorption
44, 45], quantum error correction [46, 47, 48, 49], by H − ion [54]. At that time it was surprising
quantum applications [28, 30, 43, 49, 50, 51] to that a system such as H − , earlier believed to be
name a few. unstable before the discovery of it’s bound state
Quantum chemistry has witnessed an upthrust could be a part of the solar spectrum, essential to
in the application of quantum computers. Solv- sustain life on earth. It’s spectrum corresponds to
ing molecular problems using quantum mechani- infrared and visible wavelengths. Attempts were
cal laws makes it difficult because the interactions made to calculate the ground state energy of H −
between large number of particles such as elec- using perturbation and variational methods but
trons cannot be handled by even powerful com- these methods failed as it gave the energy value of
puters [52]. Recent demonstrations of molecular -0.375 Hartree which is greater than the ground
simulations [3] have paved the way for the study state energy of hydrogen atom (-0.5 Hartree). To
of complex molecules. Simulations are limited to prove that it is a bound state the energy must be
small molecules due to hardware limitations. Var- less than that of hydrogen atom. The dynamics of
ious algorithms have been developed to calculate the system is such that it breaks up into proton +
ground and excited states and mitigation of er- electron + electron at infinity when it reaches 2-3
rors. In this paper, we demonstrate the use of eV above the threshold energy [53]. Thus, it be-
one such algorithm known as Variational Quan- comes important to consider the electron-electron
tum Eigensolver (VQE) for the simulation of H − correlations. The wavefunction should describe
ion. Initially developed by Peruzzo and McClean the correlations efficiently in order to get a good
[2], VQE is a hybrid quantum-classical algorithm measure of ground state energy.
that uses both quantum and classical resources H − was proved as a bound entity by Bethe
to solve the eigenvalue problem. in 1929 using Hylleraas wavefunction [55]. The
ground state energy was further improved by
The negative hydrogen ion is the first 3-body
Chandrasekhar [1] by introducing a wavefunction
problem in quantum mechanics consisting of a
of the following form,
proton and two electrons. One of the electrons is
nearer to the nucleus than the other as shown in
Fig. 1. It has an early history of theoretical re- ψ(r1, r2) = e−ar1 −br2 + e−br1 −ar2 (1)

2
where a and b are variational parameters, rep- and
resenting the effective nuclear charges of the Z
dr~1 dr~2 χ∗i (r~1 )χ∗j (r~2 ) χk (r~2 )χl (r~1 )
electrons. This wavefunction considers electron- hijkl = (6)
electron correlation implicitly. The energy was |(r1 − r2 )| 2
found to be -0.51330 Hartree. A much better
where χi (r~1 ) is the ith spin orbital, Z is the nu-
value was calculated by Chandrasekhar when he
clear charge, r~i is the position of the ith electron,
introduced electron-electron correlation explicitly
r12 is the distance between the two points r1 and
in the improved wavefunction,
r2 . Rσ is the position of the nucleus. a†i and aj
are fermionic creation and annihillation operators
ψ = ψ(r1 , r2 )(1 + cr12 ) (2) that follow the anti-commutation relations,
where c is the new variational parameter. The
energy was found to be -0.52592 Hartree. How- {a†i , aj } = δij (7)
ever, solving the Schrodinger equation using this {ai , aj } = 0 (8)
wavefunction is tedious. It becomes even more
complicated for other multi-body systems be- The fermionic creation operator increases the
cause of the difficulty to guess the wavefunction occupational number of an orbital by one and the
that describes the system exactly. This difficulty annihilation operator decreases it by one. Us-
can be addressed by quantum computers, which ing Jordan-Wigner or Bravyi-Kitaev transform,
have been used for the simulation of various phys- the fermionic Hamiltonian can be mapped to spin
ical systems. The largest molecule to be simu- type Hamiltonian.
lated is H2 O [56]. This was done by using vari-
ational quantum eigensolver that is used to find
eigenvalues of a matrix [2, 57, 58]. VQE is bet-
3 The Jordan-Wigner transform
ter than other quantum algorithms such as phase Jordan-Wigner transform is a second-quantized
estimation due to it’s high fidelity, robustness to encoding method to encode fermions into qubits.
errors and less resource requirement. It is based The mapping [59] is given by,
on the variational principle,
ai = Qi ⊗Z i−1 ⊗Z i−2 ....⊗Z 0 (9)
|hψ|H|ψi|
≥E (3)
|hψ|ψi| a†i = Q† ⊗Z i−1 ⊗Z i−2 ....⊗Z 0 (10)
where E is the minimum energy eigenvalue. where,
The variational principle ensures that this expec- X + iY
tation value is always greater than the smallest Q= (11)
2
eigenvalue of H. Here, we report the calculation
X − iY
of the ground state energy of H − ion using VQE. Q† = (12)
2
Each qubit stores the occupation number of the
2 The Second-Quantized Hamiltonian orbital.

The second quantized Hamiltonian for fermions


is given by, 4 The Parity Transformation
In the parity basis the qubit stores the parity of
1 X all occupied orbitals [59]. The mapping is given
hij a†i aj hijkl a†i a†j ak al
X
H= + (4)
2 i,j,k,l
P
i,j by, pi = j [πn ]ij fj . This changes the occupation
number basis state to it’s corresponding parity
where hij and hijkl are one and two electron in- basis state. The matrix form of [πn ]ij is given by,
tegrals given by  
1 0 0 0
−∇21 X Z
Z  1 1 0 0 
hij = dr~1 χ∗i (r~1 )( − )χj (r~1 )  
2 |r~ − Rσ | 1 1 1 0
 
σ 1  
(5) 1 1 1 1

3
5 The Bravyi Kitaev Transform a†1 a1 = (Q†1 ⊗Z0 )(Q†1 ⊗Z0 ),

The Bravyi Kitaev Transform is a midway be- a†0 a†1 a0 a1 = (Q†0 )(Q†1 ⊗Z0 )(Q0 )(Q1 ⊗Z0 ),
tween the Jordan Wigner and parity encoding.
a†1 a†0 a0 a1 = (Q†1 ⊗Z0 )(Z0 )(Z0 )(Q1 ⊗Z0 ) (17)
The orbitals store partial sums of occupation
numbers [58]. The qubit stores the parity of the Making use of the tensor product relation
set of occupation numbers corresponding to that (A⊗B)(C⊗D) = (AC)⊗(BD), The Hamiltonian
set of orbitals. The qubits store occupation num- simplifies to,
bers when indices are even and parity when in-
dices are odd. The transformation [59] is given
H = 21 h00 (1 − Z0 ) + 12 h11 (1 − Z1 )
P
by, bi = j [βn ]ij fj , the matrix [βn ]ij for a 4 qubit
system is, + 81 h0110 (1 − Z0 − Z1 + Z0 ·Z1 ) (18)

  Similarly using Bravyi-Kitaev transform the


1 0 0 0
Hamiltonian for H − is

 1 1 0 0 

0 0 1 0
 
 
1 1 1 1
H = 21 h00 (1 − Z0 ) + 12 h11 (1 − Z1 Z0 )
The relation of creation and annihilation opera- + 81 h0110 (1 − Z0 + Z1 − Z0 ·Z1 ) (19)
tors [59] is given by,

a†i = XU (i) Q†i ⊗Zp(i) (13)

7 Method of Simulation
ai = XU (i) Q†i ⊗Zp(i) (14)
The method of simulation consists of 2 parts,
Quantum
6 Hamiltonian of the H − ion
• Prepare the state ψ, also known as the
The H − ion consists of two electrons, one of ansatz.
which is closer to the nucleus (Fig. 1). Thus, it
has two states with one electron each. Thus the • Measure the expectation value |hψ|H|ψi| us-
Hamiltonian given in Eq. (4) can be expanded ing algorithms such as phase estimation or
using the Jordan-Wigner transform as [58], variational quantum eigensolver.

Classical
H = h00 (a†0 a0 ) + h11 (a†1 a1 ) + 21 h0101 (a†0 a†1 a0 a1 ) • Use a classical optimizer such as Nelder-
1 † † 1 † †
+ 2 h0110 (a0 a1 a1 a0 ) + 2 h1001 (a1 a0 a0 a1 )
Mead, Powell, Coybala and gradient descent
methods for optimization.
+ 12 h1010 (a†1 a†0 a1 a0 ) (15)
• Iterate until the energy converges.
Using the anti-commutation relations (7) and
(8), the Hamiltonian becomes,
7.1 Variational Quantum Eigensolver
The quantum part of simulation is performed us-
H = h00 (a†0 a0 ) + h11 (a†1 a1 ) + h0101 (a†0 a†1 a0 a1 ) ing variational quantum eigensolver as the algo-
+ h0110 (a†1 a†0 a0 a1 ) (16) rithm to run the quantum subroutine. VQE was
first demonstrated in 2014 [2]. It has also been
where we have used the fact that, h0101 = h1010 demonstrated in the Refs. [62, 63, 64]. The state
and h0110 = h1010 . Using J-W transform (10), we preparation is done by entangling the qubits us-
have, ing various single qubit rotation gates to produce
a complex state. VQE is capable of finding the
a†0 a0 = Q†0 Q0 , ground state energies of small molecules using low

4
depth circuits. It is based on the Rayleigh-Ritz
|q0 i U0 • U2 I/Z
variational principle,
|q1 i U1 • U3 I/Z
|hψ(θi )|H|ψ(θi )i| ≥ E0 . (20)
where E0 is the ground state energy. The wave Figure 2: Quantum circuit illustrating the variational
function is taken to be normalized. The circuit quantum eigensolver for two-qubit system. The uni-
diagram of VQE [56] for gate depth 1 is shown in tary operations U0 , U1 and two CN OT gates are used
Fig. 2. The circuit consists of 2 parts, to create entanglement in the system for initial state
preparation. U2 and U3 are then applied on the qubits
Initial state preparation (ansatz) -
q0 and q1 respectively for final rotations. Finally the
terms of the Hamiltonian (Pauli matrices) are applied to
• The two qubit system is given initial rota- calculate their expectation values.
tions using the gates U0 and U1 followed by
CN OT s. The unitary gates Ui are of the
form Rz (θi )Rx (θi )Rz (θi ). The parameters or gradient-based procedures. Cobyla constructs
θi have to be adjusted. This completes one successive linear approximations of the objective
layer of entanglement. The layers can be in- function and constraints via a simplex of n+1
creased to produce more complex state as points (in n dimensions), and optimizes these ap-
required. For an n-qubit system, the num- proximations in a trust region at each step.
ber of parameters for initial rotations would Gradient-based Method Gradient-based
be 3n(n-1) and the number of unitary gates methods use the gradient of the objective func-
required is given n(n-1) [56]. For a two-qubit tion. Examples are simultaneous perturbation
system, we thus need six parameters and two stochastic approximation (SPSA) algorithm, and
unitary gates. It is then followed by final ro- L-BFGS-B. SPSA calculates the gradient by,
tations U2 and U3 .

Measurement G(θ) = 21 (hψ(θi + π/2)|H|ψ(θi + π/2i)


− |hψ(θi − π/2)|H|ψ(θi − π/2i) (21)
• The expectation values of each term in the
Hamiltonian is measured one by one by in- where G(θ is the gradient. The parameters
troducing each Pauli term in the circuit after are then updated according to whether the gra-
the state preparation as shown in Fig. 2. dient decreases or increases. L-BFGS-B mini-
mizes a differentiable scalar function f(x) over
7.2 Optimization for Energy Convergence unconstrained values of the real-vector “x” [60].
Gradient-based optimization converges the func-
Optimization (classical part) is the last step tion to a local minima, thus giving poor results.
for finding the minimum (ground state) energy. They are not used for functions with large number
There are various optimization methods classified of parameters. Direct methods are much efficient
into two categories [58], and provide good values. But they are dependent
Direct Search Method on the system. Results vary with the number
Direct search algorithms do not make use of of qubits and gate depth. Here, we use Nelder-
the gradient of the objective function e.g., parti- Mead, Cobyla and Powell methods and compare
cle swarm optimization, Nelder-Mead, Powell and the results to depict which method is best suited
Cobyla. These methods have been proven to be for the calculation of ground state energy of H − .
much better than gradient-based method. Nelder
Mead is a good method for optimization. It is
7.3 Implementation
used in the fields of chemistry, medicine, science
and technology. The method is derivative free In order to determine the ground state energy, we
and is used in systems where the functions are need the “h” values h00 , h11 and h0101 given in Eq.
noisy and discontinuous such as parameter esti- (6). The “h” values are calculated by solving the
mation and statistical problems. Powell method one electron integrals (Eqs. (5) and (6)). They
requires repeated line search minimization, which have been calculated in lecture 18 of the lecture
may be carried out using univariate gradient free, series titled “Quantum Principles” [61]. They are

5
given as, h00 = h11 = 0.5, h0101 = 0.625, h00 and hψ|Z0 Z1 |ψi = P00 − P01 − P10 + P11 (23)
h11 are equal as electrons are fermions (identical
and indistinguishable particles). The expectation
value of Hamiltonian is therefore,

hψ|H|ψi = 14 hψ(1 − Z0 )ψi + 14 hψ(1 − Z1 )ψi


5
+ 64 hψ(1 − Z0 − Z1 − Z0 ·Z1 )ψi(22)

The expectation of Z0 I, IZ1 and Z0 Z1 can be


found by placing Z gates on qubits q0 and q1 af-
ter final rotation gates and measuring both the
qubits.
In matrix form, Z0 I =
 
1 0 0 0 The initial parameters may be chosen at ran-

 0 1 0 0 
 dom. It can be adjusted according to the mea-
0 0 −1 0
 
sured expectation value. We depict a compari-
 
0 0 0 −1 son between various optimization methods. The
the eigenvalues are optimization was performed by running codes in
QISKit and running program in QISKit aqua.
• +1 for |00i and |01i

• -1 for |10i and |11i

Expectation value is, hψ|Z0 I|ψi = P00 + P01 -


P10 - P11 , where the eigenvalues have been multi-
plied as coefficients with respective eigenvectors.
Similarly,
IZ1 =
 
1 0 0 0

 0 −1 0 0 

0 0 1 0
 
 
0 0 0 −1

the eigenvalues are

• +1 for |00i and |10i

• -1 for |01i and |11i

hψ|IZ1 |ψi = P00 - P01 + P10 - P11 and 8 Experimental Results and Discus-
Z0 Z1 = sions
 
1 0 0 0

 0 −1 0 0 

0 0 −1 0
 
 
0 0 0 1

the eigenvalues are

• +1 for |00i and |11i Below are the graphical representations of the
results using various optimization methods ob-
• -1 for |01i and |10i tained using QISKit.

6
Energy convergence using cobyla Energy convergence using powell
(simulator) (simulator)
Experimental Theoretical Experimental Theoretical

0 0
Energy (hartree)

Energy (hartree)
-0.2 -0.2

-0.4 -0.4

-0.6 -0.6
10 20 30 40 50 60 70 20 40 60 80 100 120

Iterations Iterations

(a) (c)

Optimization using cobyla in real Energy convergence using nelder


processor mead (simulator)
Experimental Theoretical
Experimental Theoretical
0
0

-0.2
Energy (hartree)

-0.2
Energy

-0.4
-0.4

-0.6
20 40 60 80 100
-0.6
Iterations 20 40 60 80 100 120

Iterations
(b)
Figure 3: Energy optimization using Cobyla in (d)
QISKit aqua. Gate depth is 3. The red line is the the-
Figure 4: Simulation results of energy optimization
oretical value of energy calculated from Chandrasekhar
using Powell (c) and Nelder Mead (d) in QISKit
wavefunction which is -0.52952. Figures (a) and (b)
aqua. Gate depth is 3. The red line is the theoretical
show the results obtained from simulator and real device
value of energy calculated from Chandrasekhar wave-
respectively.
function which is 0.52952.

The results are better than that calculated


from the Hartree fock method (-0.375 Hartree).
They converge to -0.468070601028 for Cobyla
(simulator), -0.407087502741 for Cobyla (real
processor, ibmqx2), -0.46513997401 using Pow-
ell (simulator) and -0.467324316239 for Nelder-
Mead (simulator). The results do not confirm
the stability of H − as they are still greater than

7
the ground state energy of hydrogen atom (-0.5 converged at -0.407087502741 Hartree as there
Hartree). We run the VQE circuit in QISKit and are errors in the real run due to time overheads
calculate the expectation value of Z0 I term. We [3]. Jordan-Wigner encoding gave a better re-
use the same parameters of state preparation at sult than the Bravyi-Kitaev encoding when the
which Z0 I converged to calculate the expectation VQE circuit was coded in QISKit. The results
value of IZ1 and Z0 Z1 . Using Bravyi-Kitaev en- show that the quantum computer ‘ibmqx2’ is ef-
coding, we find the ground state energy to be - ficient in state preparation. The prepared state
0.4997111864 Hartree and the Jordan-Wigner en- describes the electron-electron correlation in H −
coding giving the value of -0.5339355468 Hartree ion. It can be concluded that the quantum com-
much closer to the theoretical value with an er- puter shows a remarkable efficiency in realizing
ror of 0.8376%. The energy converged to a lower low qubit systems.
value than the theoretical value but it is within
the error bound. The details of the QISKit codes
with results and experimental data are provided Data availability
in the Supplementary information.
Data are available to any reader upon reasonable
request (pprasanta@iiserkol.ac.in).
8.1 Variance
The variance of the expectation value of - References
0.5339355468 Hartree is calculated as follows [3],
we make use of the equation, [1] S. Chandrasekhar, Some Remarks on the
Negative Hydrogen Ion and Its Absorption
V ar(H) = |hψ|H 2 |ψi| − |hψ|H|ψi|2 (24)
Coefficient, Astrophys. J. 100, 176 (1944).
• We measure the variance of individual Pauli [2] A. Peruzzo, J. McClean, P. Shadbolt, M.-H.
operators. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-
Guzik, and J. L. O’Brien, A variational
• The variance of the individual Pauli opera- eigenvalue solver on a quantum processor,
tors are then plucked in the above equation Nat. Commun. 5, 4213 (2014).
to obtain the variance.
[3] A. Kandala, A. Mezzacapo, K. Temme, M.
The variance is Takita, M. Brink, J. M. Chow, and J. M.
Gambetta, Hardware-efficient Variational
(|hψ|Pi2 |ψi|−|hψ|Pi |ψi|2 ) = −0.13348831 Quantum Eigensolver for Small Molecules
X
V ar(H) =
i and Quantum Magnets, Nature 549, 242
(25) (2017).
where Pi ’s are individual Pauli operators.
[4] Stephen Wiesner, Simulations of Many-
Body Quantum Systems by a Quantum
9 Conclusion and Interpretation of Re- Computer, arXiv:quant-ph/9603028
sults [5] I. M. Georgescu, S. Ashhab, and F. Nori,
Rev. Mod. Phys. 86, 153 (2014).
The ground state energy -0.5339355468 Hartree
proves the bound structure of the negative hydro- [6] R. P. Feynman, Simulating Physics with
gen ion. This result was obtained when the expec- Computers, Int. J. Theor. Phys. 21, 467
tation value of IZ1 and Z0 Z1 were calculated us- (1982).
ing the same parameters at which Z0 I converged. [7] S. Lloyd, Universal Quantum Simulators,
This can be explained as follows. According to Science 273, 1073 (1996).
the structure of H − the probability of finding the
electron in the first state is maximum. Thus, the [8] S. Sachdev, Quantum Phase Transitions,
lowest eigenvalue should be found using the set Cambridge University Press, Cambridge,
of parameters for which Z0 I converges. All the U.K. (1999).
optimization routines performed well giving ap- [9] S. Sachdev, Quantum magnetism and criti-
proximately equal values. Real run of Cobyla cality, Nat. Phys. 4, 173 (2008).

8
[10] B. P. Lanyon, J. D. Whitfield, G. G. Gillett, [24] Kuntal Halder, Narendra N. Hegade, Bikash
M. E. Goggin, M. P. Almeida, I. Kassal, J. D. K. Behera, Prasanta K. Panigrahi, Digital
Biamonte, M. Mohseni, B. J. Powell, M. Bar- Quantum Simulation of Laser-Pulse Induced
bieri, A. Aspuru-Guzik, and A. G. White, Tunneling Mechanism in Chemical Isomer-
Towards quantum chemistry on a quantum ization Reaction, arXiv:1808.00021
computer, Nat. Chem. 2, 106 (2010). [25] G. R. Malik, R. P.Singh, B. K.Behera, and
[11] E. F. Dumitrescu, A. J. McCaskey, G. Ha- P. K.Panigrahi, First Experimental Demon-
gen, G. R. Jansen, T. D. Morris, T. Pa- stration of Multi-particle Quantum Tun-
penbrock, R. C. Pooser, D. J. Dean, and neling in IBM Quantum Computer, DOI:
P. Lougovski, Phys. Rev. Lett. 120, 210501 10.13140/RG.2.2.27260.18569
(2018).
[26] D. Aggarwal, S. Raj, B. K. Behera, and P. K.
[12] N. Lambert, Y.-N. Chen, Y.-C. Cheng, C.- Panigrahi, Application of quantum scram-
M. Li, G.-Y. Chen, and F. Nori, Quantum bling in Rydberg atom on IBM quantum
biology, Nat. Phys. 9, 10 (2013). computer, arXiv:1806.00781.
[13] S. Lloyd, A theory of quantum gravity based [27] P. K. Vishnu, D. Joy, B. K. Behera, P. K.
on quantum computation, arXiv:quant- Panigrahi, Experimental demonstration of
ph/0501135. non-local controlled-unitary quantum gates
[14] P. A. Zizzi, Quantum Computation Toward using a five-qubit quantum computer, Quan-
Quantum Gravity, Gen. Relat. Gravit. 33, tum Inf. Process 17, 274 (2018).
1305 (2001). [28] M. Schuld, M. Fingerhuth, and F. Petruc-
[15] A. Trabesinger, Quantum simulation, Nat. cione, Implementing a distance-based classi-
Phys. 8, 263 (2012). fier with a quantum interference circuit, Eu-
[16] J. I. Cirac and P. Zoller, Goals and opportu- rophys. Lett. 119, 60002 (2017).
nities in quantum simulation, Nat. Phys. 8, [29] S. S. Tannu, and M. K. Qureshi, A Case
264 (2012). for Variability-Aware Policies for NISQ-Era
[17] T. Schaetz, C. R. Monroe and T. Esslinger, Quantum Computers, arXiv:1805.10224.
Focus on Quantum Simulation, New J. Phys. [30] J. R. Wootton, Benchmarking of quan-
15, 085009 (2013). tum processors with random circuits,
[18] C. Gross and I. Bloch, Quantum simulations arXiv:1806.02736.
with ultracold atoms in optical lattices, Sci- [31] Manabputra, B. K. Behera, and P. K. Pan-
ence 357, 995 (2017). igrahi, A Simulational Model for Witness-
[19] L. Tarruell, L. Sanchez-Palencia, Quantum ing Quantum Effects of Gravity Using IBM
simulation of the Hubbard model with ul- Quantum Computer, arXiv:1806.10229
tracold fermions in optical lattices, Comptes [32] O. Viyuela et al., Observation of topolog-
Rendus Phys. 19, 365 (2018). ical Uhlmann phases with superconducting
[20] S. Debnath, N. M. Linke, C. Figgatt, K. A. qubits, npj Quantum Inf. 4, 10 (2018).
Landsman, K. Wright, and C. Monroe, Let- [33] D. García-Martín, and G. Sierra, Five Ex-
ter Demonstration of a small programmable perimental Tests on the 5-Qubit IBM Quan-
quantum computer with atomic qubits, Na- tum Computer, J. App. Math. Phys. 6, 1460
ture 536, 63 (2016). (2018).
[21] B. E. Kane, A silicon-based nuclear spin [34] R. Jha, D. Das, A. Dash, S. Jayaraman,
quantum computer, Nature 393, 133 (1998). B. K. Behera, and P. K. Panigrahi, A Novel
[22] M. H. Devoret, and R. J. Schoelkopf, Super- Quantum N-Queens Solver Algorithm and
conducting Circuits for Quantum Informa- its Simulation and Application to Satellite
tion: An Outlook, Science339, 1169 (2013). Communication Using IBM Quantum Expe-
[23] IBM Quantum Experience, rience, arXiv:1806.10221.
url:https://www.research.ibm.com/ibm- [35] M. Sisodia, A. Shukla, K. Thapliyal, A.
q/. Pathak, Design and experimental realization

9
of an optimal scheme for teleportaion of an [46] D. Ghosh, P. Agarwal, P. Pandey, B. K. Be-
n-qubit quantum state, Quantum Inf. Pro- hera, and P. K. Panigrahi, Automated Error
cess 16, 292 (2017). Correction in IBM Quantum Computer and
[36] S. Gangopadhyay, Manabputra, B. K. Be- Explicit Generalization, Quantum Inf. Pro-
hera and P. K. Panigrahi, Generalization and cess. 17, 153 (2018).
Demonstration of an Entanglement Based [47] J. Roffe, D. Headley, N. Chancellor, D. Hors-
Deutsch-Jozsa Like Algorithm Using a 5- man, and V. Kendon, Protecting quantum
Qubit Quantum Computer, Quantum Inf. memories using coherent parity check codes,
Process. 17, 160 (2018). Quantum Sci. Technol. 3 035010 (2018).
[37] S. Deffner, Demonstration of entanglement
[48] S. Satyajit, K. Srinivasan, B. K. Behera, and
assisted invariance on IBM’s quantum expe-
P. K. Panigrahi, Nondestructive discrimina-
rience, Heliyon 3, e00444 (2017).
tion of a new family of highly entangled
[38] İ. Yalçinkaya, and Z.Gedik, Optimization states in IBM quantum computer, Quantum
and experimental realization of quantum Inf. Process. 17, 212 (2018).
permutation algorithm, Phys. Rev. A 96,
062339 (2017). [49] R. Harper and S. Flammia, Fault tolerance
in the IBM Q Experience, arXiv:1806.02359.
[39] K. Srinivasan, S. Satyajit, B. K. Behera,
and P. K. Panigrahi, Efficient quantum [50] A. Dash, S. Rout, B. K. Behera, P. K. Pani-
algorithm for solving travelling salesman grahi, A Verification Algorithm and Its Ap-
problem: An IBM quantum experience, plication to Quantum Locker in IBM Quan-
arXiv:1805.10928. tum Computer, arXiv:1710.05196.
[40] E. Huffman, and A. Mizel, Violation of non- [51] U. Alvarez-Rodriguez, M. Sanz, L. Lamata,
invasive macrorealism by a superconducting E. Solano, Quantum Artificial Life in an IBM
qubit: Implementation of a Leggett-Garg Quantum Computer, arXiv:1711.09442.
test that addresses the clumsiness loophole,
[52] P. A. M. Dirac and R. H. Fowler, Quantum
Phys. Rev. A 95, 032131 (2017).
mechanics of many-electron systems, Pro-
[41] D. Alsina, and J. I. Latorre, Experimental ceedings of the Royal Society of London. Se-
test of Mermin inequalities on a five-qubit ries A, Containing Papers of a Mathematical
quantum computer, Phys. Rev. A 94, 012314 and Physical Character 123, (1929).
(2016).
[53] A. R. P. Rau, The Negative Ion of Hydrogen,
[42] A. R. Kalra, N. Gupta, B. K. Be-
J. Astrophys. Astron. 17, 113 (1996).
hera, S. Prakash, and P. K. Panigrahi,
Demonstration of the No-Hiding Theorem [54] R. Wildt, Negative ion of hydrogen and the
on the 5 Qubit IBM Quantum Com- opacity of stellar atmospheres, Astrophys. J.
puter in a Category Theoretic Framework, 90, 611 (1939).
arXiv:1707.09462. [55] H. Bethe, Berechnung der Elektronenaffini-
[43] B. K.Behera, A. Banerjee, and tat des Wasserstoffs, Z phys. 57, 815 (1929).
P. K.Panigrahi, Experimental realiza-
[56] T. Bian, D. Murphy, R. Xia, A. Daskin,
tion of quantum cheque using a five-qubit
and S. Kais, Quantum computing methods
quantum computer, Quantum Inf. Process
for electronic states of the water molecule,
16, 312 (2016).
arXiv:1804.05453.
[44] M.-I. Plesa and T. Mihai, A New Quantum
Encryption Scheme, Adv. J. Grad. Res. 4, 1 [57] J. R. McClean, J. Romero, R. Babbush, and
(2018). A. Aspuru-Guzik, The theory of variational
hybrid quantum-classical algorithms, New J.
[45] A. Majumder, S. Mohapatra, and A. Kumar,
Phys. 18, 023023 (2016).
Experimental Realization of Secure Mul-
tiparty Quantum Summation Using Five- [58] S. McArdle, S. Endo, A. Aspuru-Guzik, S.
Qubit IBM Quantum Computer on Cloud, Benjamin, and X. Yuan, Quantum compu-
arXiv:1707.07460. tational chemistry, arXiv:1808.10402.

10
[59] J. T. Seeley, M. J. Richard, and P. J. Love, Competing interests
The Bravyi-Kitaev transformation for quan-
tum computation of electronic structure, J. The authors declare no competing financial as
Chem. Phys. 137, 224109 (2012). well as non-financial interests.
[60] R. Malouf, A comparison of algorithms
for maximum entropy parameter estimation, 10 Supplementary Information:
Proceeding COLING-02 proceedings of the
6th conference on Natural language learning For Energy estimation Z0 I, IZ1 and Z0 Z1 terms
- Volume 20 Pages 1-7 20, (2002). of Hamiltonian respectively are coded then op-
timized through scipy.optimize which contain
[61] A. J. Shaka, Lecture 18. The Hydride Ion
’powell’, ’nelder-mead’ or ’cobyla’ . The QASM
(Continued): Two-Electron Systems, Uni-
code for the same is as follows:
versity of California Irvine (UCI) (2014).
Code for Z1(Z0 I):
[62] J.-G. Liu, Y.-H. Zhang, Y. Wan, and
1 # −∗− c o d i n g : u t f −8 −∗−
L. Wang, Variational Quantum Eigensolver 2 """
with Fewer Qubits, arXiv:1902.02663. 3 Created on Wed Feb 13 2 0 : 0 4 : 1 6 2019
4
[63] R. M. Parrish, E. G. Hohenstein, P. L. 5 @author : Rahul
McMahon, and T. J. Martinez, Quantum 6 """
Computation of Electronic Transitions us- 7

ing a Variational Quantum Eigensolver, 8 from s c i p y . o p t i m i z e import minimize


9 from q i s k i t import QuantumCircuit ,
arXiv:1901.01234. C l a s s i c a l R e g i s t e r , QuantumRegister
[64] J. I. Colless, V. V.Ramasesh, D. Dahlen, 10 import numpy a s np
11 from q i s k i t import e x e c u t e
M. S. Blok, M. E. Kimchi-Schwartz, J. R. 12 from q i s k i t import B a s i c A e r
McClean, J. Carter, W. A. de Jong, and 13 backend = B a s i c A e r . get_backend ( ’
I. Siddiqi, Computation of Molecular Spec- qasm_simulator ’ )
tra on a Quantum Processor with an Error- 14 T=8192
15 d e f Z1 ( t h e t a ) :
Resilient Algorithm, Phys. Rev. X 8, 011021
16 # C r e a t e a Quantum R e g i s t e r c a l l e d "q
(2018). " with 3 q u b i t s
17 q = QuantumRegister ( 2 )
[65] M. Sisodia, A. Shukla, and A. Pathak, Ex-
18
perimental realization of nondestructive dis- 19 # Create a C l a s s i c a l R e g i s t e r c a l l e d
crimination of Bell states using a five-qubit " c " with 3 b i t s
quantum computer, Phys. Lett. A 381, 3860 20 c = ClassicalRegister (2)
(2017). 21 qc = QuantumCircuit ( q , c )
22
23 qc . u1 ( t h e t a [ 0 ] , q [ 0 ] )
24 qc . u3 ( t h e t a [ 1 ] , − np . p i / 2 , np . p i / 2 , q [ 0 ] )
Acknowledgments 25 qc . u1 ( t h e t a [ 2 ] , q [ 0 ] )
26 qc . cx ( q [ 0 ] , q [ 1 ] )
S.K acknowledges the financial support of Indian 27 qc . u1 ( t h e t a [ 3 ] , q [ 1 ] )
Academy of Sciences (IAS). S.K would also like to 28 qc . u3 ( t h e t a [ 4 ] , − np . p i / 2 , np . p i / 2 , q [ 1 ] )
thank Indian Institute of Science Education and 29 qc . u1 ( t h e t a [ 5 ] , q [ 1 ] )
30 qc . cx ( q [ 1 ] , q [ 0 ] )
Research Kolkata for providing hospitality dur- 31 qc . u1 ( t h e t a [ 6 ] , q [ 0 ] )
ing the course of the project. B.K.B. acknowl- 32 qc . u1 ( t h e t a [ 7 ] , q [ 1 ] )
edges the support of Inspire Fellowship awarded 33 qc . u3 ( t h e t a [ 8 ] , − np . p i / 2 , np . p i / 2 , q [ 0 ] )
by DST, Government of India. The authors ac- 34 qc . u3 ( t h e t a [ 9 ] , − np . p i / 2 , np . p i / 2 , q [ 1 ] )
35 qc . u1 ( t h e t a [ 1 0 ] , q [ 0 ] )
knowledge the support of IBM Quantum Expe- 36 qc . u1 ( t h e t a [ 1 1 ] , q [ 1 ] )
rience for producing experimental results. The 37 qc . z ( q [ 0 ] )
views expressed are those of the authors and do 38

not reflect the official policy or position of IBM 39 qc . measure ( q [ 0 ] , c [ 0 ] )


40 qc . measure ( q [ 1 ] , c [ 1 ] )
or the IBM Quantum Experience team. The 41
authors thank Dheerendra Singh (student,IISER 42 #p r i n t ( qc )
KOLKATA) for useful discussions. 43 #p r i n t ( i )

11
44 shots = T # Number o f s h o t s t o 18
run t h e program ( e x p e r i m e n t ) ; maximum 19 # Create a C l a s s i c a l R e g i s t e r c a l l e d
i s 8192 s h o t s . " c " with 3 b i t s
45 max_credits = 3 # Maximum 20 c = ClassicalRegister (2)
number o f c r e d i t s t o spend on 21 qc = QuantumCircuit ( q , c )
executions . 22
46 23 qc . u1 ( t h e t a [ 0 ] , q [ 0 ] )
47 job_hpc = e x e c u t e ( qc , backend=backend 24 qc . u3 ( t h e t a [ 1 ] , − np . p i / 2 , np . p i / 2 , q [ 0 ] )
, s h o t s=s h o t s , max_credits=max_credits 25 qc . u1 ( t h e t a [ 2 ] , q [ 0 ] )
) 26 qc . cx ( q [ 0 ] , q [ 1 ] )
48 r e s u l t _ h p c = job_hpc . r e s u l t ( ) 27 qc . u1 ( t h e t a [ 3 ] , q [ 1 ] )
49 c o u n t s 1 1 = r e s u l t _ h p c . get_counts ( qc ) 28 qc . u3 ( t h e t a [ 4 ] , − np . p i / 2 , np . p i / 2 , q [ 1 ] )
50 #p r i n t ( c o u n t s 1 1 ) 29 qc . u1 ( t h e t a [ 5 ] , q [ 1 ] )
51 Z=0 30 qc . cx ( q [ 1 ] , q [ 0 ] )
52 i f ’ 00 ’ i n l i s t ( c o u n t s 1 1 ) : 31 qc . u1 ( t h e t a [ 6 ] , q [ 0 ] )
53 Z=Z+c o u n t s 1 1 [ ’ 00 ’ ] /T 32 qc . u1 ( t h e t a [ 7 ] , q [ 1 ] )
54 #p r i n t ( Z ) 33 qc . u3 ( t h e t a [ 8 ] , − np . p i / 2 , np . p i / 2 , q [ 0 ] )
55 i f ’ 01 ’ i n l i s t ( c o u n t s 1 1 ) : 34 qc . u3 ( t h e t a [ 9 ] , − np . p i / 2 , np . p i / 2 , q [ 1 ] )
56 Z=Z+c o u n t s 1 1 [ ’ 01 ’ ] /T 35 qc . u1 ( t h e t a [ 1 0 ] , q [ 0 ] )
57 #p r i n t ( Z ) 36 qc . u1 ( t h e t a [ 1 1 ] , q [ 1 ] )
58 i f ’ 10 ’ i n l i s t ( c o u n t s 1 1 ) : 37 qc . z ( q [ 1 ] )
59 Z=Z−c o u n t s 1 1 [ ’ 10 ’ ] /T 38
60 #p r i n t ( Z ) 39 qc . measure ( q [ 0 ] , c [ 0 ] )
61 i f ’ 11 ’ i n l i s t ( c o u n t s 1 1 ) : 40 qc . measure ( q [ 1 ] , c [ 1 ] )
62 Z=Z−c o u n t s 1 1 [ ’ 11 ’ ] /T 41
63 #p r i n t ( Z ) 42 #p r i n t ( qc )
64 43 #p r i n t ( i )
65 return Z 44 shots = T # Number o f s h o t s
66 t h e t a 0 =[0 , np . p i / 2 , 0 , 0 , np . p i / 2 , 0 , 0 , 0 , np . p i t o run t h e program ( e x p e r i m e n t ) ;
/ 2 , np . p i / 2 , 0 , 0 ] maximum i s 8192 s h o t s .
67 r e s = minimize ( Z1 , t h e t a 0 , method= ’ p o w e l l 45 max_credits = 3 # Maximum
’ , o p t i o n s ={ ’ x t o l ’ : 1 e−8 , ’ d i s p ’ : True number o f c r e d i t s t o spend on
}) executions .
68 p r i n t ( r e s , ’ Z1 ’ ) 46
69 #x=Z1 ( [ 1 . 5 3 6 3 7 7 7 0 e −03 , 1 . 5 5 0 2 7 2 8 3 e +00 , 47 job_hpc = e x e c u t e ( qc , backend=backend
8 . 0 9 4 7 3 1 2 0 e −04 , 1 . 6 6 3 4 0 5 3 4 e , s h o t s=s h o t s , max_credits=max_credits
−04 , −8.32420733 e −03 , −2.28166637 e −05 , )
−8.94140209 e −04 , 5 . 6 1 0 2 3 3 4 4 e 48 r e s u l t _ h p c = job_hpc . r e s u l t ( )
− 0 4 , 1 . 7 7 6 7 59 2 0 e +00 , 1 . 5 8 4 2 5 5 1 0 e +00 , 49 c o u n t s 2 2 = r e s u l t _ h p c . get_counts ( qc )
1 . 0 9 4 5 5 0 2 6 e −03 , 8 . 5 1 9 5 6 3 7 4 e −04]) 50
70 #p r i n t ( x ) 51 Z=0
52 i f ’ 00 ’ i n l i s t ( c o u n t s 2 2 ) :
Code for Z2(IZ1 ): 53 Z=Z+c o u n t s 2 2 [ ’ 00 ’ ] /T
54 p r i n t (Z)
1 # −∗− c o d i n g : u t f −8 −∗− 55 i f ’ 01 ’ i n l i s t ( c o u n t s 2 2 ) :
2 """ 56 Z=Z−c o u n t s 2 2 [ ’ 01 ’ ] /T
3 Created on Wed Feb 13 2 0 : 0 4 : 1 7 2019 57 p r i n t (Z)
4 58 i f ’ 10 ’ i n l i s t ( c o u n t s 2 2 ) :
5 @author : Rahul 59 Z=Z+c o u n t s 2 2 [ ’ 10 ’ ] /T
6 """ 60 p r i n t (Z)
7 61 i f ’ 11 ’ i n l i s t ( c o u n t s 2 2 ) :
8 from s c i p y . o p t i m i z e import minimize 62 Z=Z−c o u n t s 2 2 [ ’ 11 ’ ] /T
9 from q i s k i t import QuantumCircuit , 63 p r i n t (Z)
C l a s s i c a l R e g i s t e r , QuantumRegister 64
10 import numpy a s np 65 return Z
11 from q i s k i t import e x e c u t e 66 t h e t a 0 =[0 , np . p i / 2 , 0 , 0 , np . p i / 2 , 0 , 0 , 0 , np . p i
12 from q i s k i t import B a s i c A e r / 2 , np . p i / 2 , 0 , 0 ]
13 backend = B a s i c A e r . get_backend ( ’ 67 r e s = minimize ( Z2 , t h e t a 0 , method= ’ n e l d e r
qasm_simulator ’ ) −mead ’ , o p t i o n s ={ ’ x t o l ’ : 1 e−8 , ’ d i s p ’ :
14 T=8192 True } )
15 d e f Z2 ( t h e t a ) : 68 p r i n t ( r e s , ’ Z2 ’ )
16 # C r e a t e a Quantum R e g i s t e r c a l l e d "q 69 #z=Z2 ( [ − 5 . 6 4 2 0 0 3 5 1 e −01 , 1 . 6 1 5 5 4 9 8 6 e +00 ,
" with 3 q u b i t s 1 . 5 6 8 2 1 8 2 3 e +00 , 1 . 6 1 2 1 9 6 3 4 e −03 ,
17 q = QuantumRegister ( 2 )

12
1 . 8 1 9 0 2 3 3 6 e +00 , 5 . 9 6 7 7 7 4 0 6 e +00 , , s h o t s=s h o t s , max_credits=max_credits
−6.66574506 e −03 , 4 . 6 3 7 2 5 4 9 6 e +00 , )
1 . 3 2 1 5 6 7 5 6 e +00 , 3 . 7 8 8 2 7 9 7 7 e −01 , 49 r e s u l t _ h p c = job_hpc . r e s u l t ( )
9 . 5 9 0 4 9 2 2 1 e +00 , 3 . 9 0 4 6 6 4 9 5 e +00]) 50 c o u n t s 1 2 = r e s u l t _ h p c . get_counts ( qc )
70 #p r i n t ( z ) 51
52 Z=0
Code for Z3(Z0 ZI ): 53 i f ’ 00 ’ i n l i s t ( c o u n t s 1 2 ) :
54 Z=c o u n t s 1 2 [ ’ 00 ’ ] /T
1 # −∗− c o d i n g : u t f −8 −∗− 55 p r i n t (Z)
2 """ 56 i f ’ 01 ’ i n l i s t ( c o u n t s 1 2 ) :
3 Created on Wed Feb 13 2 0 : 0 4 : 1 5 2019 57 Z=Z−c o u n t s 1 2 [ ’ 01 ’ ] /T
4 58 p r i n t (Z)
5 @author : Rahul 59 i f ’ 10 ’ i n l i s t ( c o u n t s 1 2 ) :
6 """ 60 Z=Z−c o u n t s 1 2 [ ’ 10 ’ ] /T
7 61 p r i n t (Z)
8 from s c i p y . o p t i m i z e import minimize 62 i f ’ 11 ’ i n l i s t ( c o u n t s 1 2 ) :
9 from q i s k i t import QuantumCircuit , 63 Z=Z+c o u n t s 1 2 [ ’ 11 ’ ] /T
C l a s s i c a l R e g i s t e r , QuantumRegister 64 p r i n t (Z)
10 import numpy a s np 65 return Z
11 from q i s k i t import e x e c u t e 66 t h e t a 0 =[0 , np . p i / 2 , 0 , 0 , np . p i / 2 , 0 , 0 , 0 , np . p i
12 from q i s k i t import B a s i c A e r / 2 , np . p i / 2 , 0 , 0 ]
13 backend = B a s i c A e r . get_backend ( ’ 67 r e s = minimize ( Z3 , t h e t a 0 , method= ’ n e l d e r
qasm_simulator ’ ) −mead ’ , o p t i o n s ={ ’ x t o l ’ : 1 e−8 , ’ d i s p ’ :
14 T=8192 True } )
15 d e f Z3 ( t h e t a ) : 68 p r i n t ( r e s , ’ Z3 ’ )
16 # C r e a t e a Quantum R e g i s t e r c a l l e d "q 69 #y=Z3 ( [ − 7 . 6 3 6 0 9 3 7 4 , −0.31633082 ,
" with 3 q u b i t s 2.15909817 , 4.31092763 , 1.57470161 ,
17 q = QuantumRegister ( 2 ) 1 . 6 1 1 1 5 6 3 , −0.13041641 , 0 . 0 8 8 8 0 9 4 3 ,
18 1.58865914 , 1.50475982 , 0.59323763 ,
19 # Create a C l a s s i c a l R e g i s t e r c a l l e d 2.86816974])
" c " with 3 b i t s 70 #p r i n t ( y )
20 c = ClassicalRegister (2)
21 qc = QuantumCircuit ( q , c )
22
23 qc . u1 ( t h e t a [ 0 ] , q [ 0 ] )
24 qc . u3 ( t h e t a [ 1 ] , − np . p i / 2 , np . p i / 2 , q [ 0 ] )
25 qc . u1 ( t h e t a [ 2 ] , q [ 0 ] )
26 qc . cx ( q [ 0 ] , q [ 1 ] )
27 qc . u1 ( t h e t a [ 3 ] , q [ 1 ] )
28 qc . u3 ( t h e t a [ 4 ] , − np . p i / 2 , np . p i / 2 , q [ 1 ] )
29 qc . u1 ( t h e t a [ 5 ] , q [ 1 ] )
30 qc . cx ( q [ 1 ] , q [ 0 ] )
31 qc . u1 ( t h e t a [ 6 ] , q [ 0 ] )
32 qc . u1 ( t h e t a [ 7 ] , q [ 1 ] )
33 qc . u3 ( t h e t a [ 8 ] , − np . p i / 2 , np . p i / 2 , q [ 0 ] )
34 qc . u3 ( t h e t a [ 9 ] , − np . p i / 2 , np . p i / 2 , q [ 1 ] )
35 qc . u1 ( t h e t a [ 1 0 ] , q [ 0 ] )
36 qc . u1 ( t h e t a [ 1 1 ] , q [ 1 ] )
37 qc . z ( q [ 0 ] )
38 qc . z ( q [ 1 ] )
39
40 qc . measure ( q [ 0 ] , c [ 0 ] )
41 qc . measure ( q [ 1 ] , c [ 1 ] )
42
43 #p r i n t ( qc )
44 #p r i n t ( i )
45 s h o t s= T # Number o f s h o t s
t o run t h e program ( e x p e r i m e n t ) ;
maximum i s 8192 s h o t s .
46 max_credits = 3 # Maximum
number o f c r e d i t s t o spend on The tabulated data of convergence is as shown
executions . below.
47
48 job_hpc = e x e c u t e ( qc , backend=backend Table 1: For Nelder Mead

13
Iterations Theoretical Experimental Iterations Theoretical Experimental
1 -0.52952 -0.3658118514 51 -0.52952 -0.4042369078
2 -0.52952 -0.3687388385 52 -0.52952 -0.4167492066
3 -0.52952 -0.364456499 53 -0.52952 -0.4100107529
4 -0.52952 -0.3640980715 54 -0.52952 -0.4121749407
5 -0.52952 -0.3735459878 55 -0.52952 -0.4123393275
6 -0.52952 -0.3547868431 56 -0.52952 -0.4153778284
7 -0.52952 -0.3642996161 57 -0.52952 -0.4201981629
8 -0.52952 -0.3652836663 58 -0.52952 -0.416993412
9 -0.52952 -0.3730938032 59 -0.52952 -0.4075684502
10 -0.52952 -0.3646086323 60 -0.52952 -0.4216554432
11 -0.52952 -0.3657974241 61 -0.52952 -0.4229979668
12 -0.52952 -0.3712501318 62 -0.52952 -0.4196147123
13 -0.52952 -0.3667064972 63 -0.52952 -0.4253503764
14 -0.52952 -0.3660282661 64 -0.52952 -0.4249917301
15 -0.52952 -0.3702449038 65 -0.52952 -0.4299162527
16 -0.52952 -0.3702913827 66 -0.52952 -0.4330937475
17 -0.52952 -0.3308180563 67 -0.52952 -0.4257880472
18 -0.52952 -0.3653252632 68 -0.52952 -0.4038551852
19 -0.52952 -0.3770401351 69 -0.52952 -0.424561212
20 -0.52952 -0.3867578684 70 -0.52952 -0.4276609296
21 -0.52952 -0.3746037324 71 -0.52952 -0.4244919108
22 -0.52952 -0.3745729229 72 -0.52952 -0.4281787243
23 -0.52952 -0.375111539 73 -0.52952 -0.4255140557
24 -0.52952 -0.3759054584 74 -0.52952 -0.4291707672
25 -0.52952 -0.3819807294 75 -0.52952 -0.4413052833
26 -0.52952 -0.3751555337 76 -0.52952 -0.4357576628
27 -0.52952 -0.3774191599 77 -0.52952 -0.4398903991
28 -0.52952 -0.3790968918 78 -0.52952 -0.4376459041
29 -0.52952 -0.3830969824 79 -0.52952 -0.4434627664
30 -0.52952 -0.3842554535 80 -0.52952 -0.4494898276
31 -0.52952 -0.3821377446 81 -0.52952 -0.445895972
32 -0.52952 -0.3852416368 82 -0.52952 -0.4480489295
33 -0.52952 -0.387955228 83 -0.52952 -0.448329137
34 -0.52952 -0.3997053027 84 -0.52952 -0.4582959119
35 -0.52952 -0.3925481822 85 -0.52952 -0.4535441657
36 -0.52952 -0.3912610618 86 -0.52952 -0.4562919823
37 -0.52952 -0.3925515116 87 -0.52952 -0.458321483
38 -0.52952 -0.39142132 88 -0.52952 -0.4572042524
39 -0.52952 -0.3948359592 89 -0.52952 -0.4542379797
40 -0.52952 -0.3993956196 90 -0.52952 -0.4615284535
41 -0.52952 -0.3929185069 91 -0.52952 -0.4637654447
42 -0.52952 -0.3984600897 92 -0.52952 -0.4654706567
43 -0.52952 -0.3981955975 93 -0.52952 -0.4647630364
44 -0.52952 -0.3995114402 94 -0.52952 -0.4646672379
45 -0.52952 -0.3982939261 95 -0.52952 -0.4587078335
46 -0.52952 -0.4039865324 96 -0.52952 -0.4644073631
47 -0.52952 -0.4040763391 97 -0.52952 -0.458071464
48 -0.52952 -0.4061567579 98 -0.52952 -0.4648104928
49 -0.52952 -0.4068460868 99 -0.52952 -0.455790524
50 -0.52952 -0.4075465596 100 -0.52952 -0.4643548465

14
Iterations Theoretical Experimental Iterations Theoretical Experimental
101 -0.52952 -0.4597123945 1 -0.52952 -0.3242458015
102 -0.52952 -0.4614880122 2 -0.52952 -0.312141158
103 -0.52952 -0.4640232781 3 -0.52952 -0.3000890929
104 -0.52952 -0.4631510063 4 -0.52952 -0.2012450742
105 -0.52952 -0.4633038065 5 -0.52952 -0.3431368385
106 -0.52952 -0.4607956644 6 -0.52952 -0.3354519405
107 -0.52952 -0.4640445423 7 -0.52952 -0.3605707275
108 -0.52952 -0.4648928415 8 -0.52952 -0.3092321975
109 -0.52952 -0.464328522 9 -0.52952 -0.3421126117
109 -0.52952 -0.4654582708 10 -0.52952 -0.382317455
110 -0.52952 -0.4653556353 11 -0.52952 -0.365973851
111 -0.52952 -0.4637653123 12 -0.52952 -0.3070352964
112 -0.52952 -0.4627551564 13 -0.52952 -0.378163368
113 -0.52952 -0.4616840943 14 -0.52952 -0.372308508
114 -0.52952 -0.4639483874 15 -0.52952 -0.3760271897
115 -0.52952 -0.4658633096 16 -0.52952 -0.2783118205
116 -0.52952 -0.4652171301 17 -0.52952 -0.3703690787
117 -0.52952 -0.4662359862 18 -0.52952 -0.3461754311
118 -0.52952 -0.4657969867 19 -0.52952 -0.3659191554
119 -0.52952 -0.4654209807 20 -0.52952 -0.3757416573
120 -0.52952 -0.4644860719 21 -0.52952 -0.3401756666
121 -0.52952 -0.4655182454 22 -0.52952 -0.3805747747
122 -0.52952 -0.4639068364 23 -0.52952 -0.3638238258
123 -0.52952 -0.4650023139 24 -0.52952 -0.3789247876
124 -0.52952 -0.4634304145 25 -0.52952 -0.3807448887
125 -0.52952 -0.4670682595 26 -0.52952 -0.3913352043
27 -0.52952 -0.3779779816
28 -0.52952 -0.3963448298
29 -0.52952 -0.3759803137
30 -0.52952 -0.3827794955
31 -0.52952 -0.3805431712
32 -0.52952 -0.3928037149
33 -0.52952 -0.385364926
34 -0.52952 -0.3918327581
35 -0.52952 -0.3848496156
36 -0.52952 -0.3892537216
37 -0.52952 -0.3883246723
38 -0.52952 -0.3732819491
39 -0.52952 -0.3917883664
40 -0.52952 -0.3926158442
41 -0.52952 -0.3891585442
42 -0.52952 -0.3859512631
43 -0.52952 -0.3947456284
44 -0.52952 -0.3852036904
45 -0.52952 -0.3942924663
46 -0.52952 -0.3859246281
47 -0.52952 -0.3890963958
48 -0.52952 -0.4008480231
Table 2: For Cobyla on real Chip 49 -0.52952 -0.4013480612
50 -0.52952 -0.3944512178

15
Iterations Theoretical Experimental Iterations Theoretical Experimental
51 -0.52952 -0.3884351222 101 -0.52952 -0.4127125846
52 -0.52952 -0.3884351222 102 -0.52952 -0.4028407225
53 -0.52952 -0.3884351222 103 -0.52952 -0.397501173
54 -0.52952 -0.3907311105 104 -0.52952 -0.4120374641
55 -0.52952 -0.3980456027 105 -0.52952 -0.4085077118
56 -0.52952 -0.3906448114 106 -0.52952 -0.4095649677
57 -0.52952 -0.4059641886 107 -0.52952 -0.4097617167
58 -0.52952 -0.388795591 108 -0.52952 -0.4122036682
59 -0.52952 -0.3965149438 109 -0.52952 -0.4182641555
60 -0.52952 -0.4046238846
61 -0.52952 -0.4025665527
62 -0.52952 -0.3938826373
63 -0.52952 -0.3762519993
64 -0.52952 -0.395794006
65 -0.52952 -0.3963359515
66 -0.52952 -0.4041835107
67 -0.52952 -0.4079657663
68 -0.52952 -0.3994302984
69 -0.52952 -0.3969173201
70 -0.52952 -0.4045947654
71 -0.52952 -0.3955795003
72 -0.52952 -0.396464158
73 -0.52952 -0.3954576879
74 -0.52952 -0.3922859202
75 -0.52952 -0.3903440066
76 -0.52952 -0.3997641322
77 -0.52952 -0.3953649947
78 -0.52952 -0.3912133919
79 -0.52952 -0.4025246453
80 -0.52952 -0.4028140875
81 -0.52952 -0.3936148616
82 -0.52952 -0.4070786244
83 -0.52952 -0.3972980299
84 -0.52952 -0.401852009
85 -0.52952 -0.4013366986
86 -0.52952 -0.4078261972
87 -0.52952 -0.3935246526
88 -0.52952 -0.4035197528
89 -0.52952 -0.4009673514
90 -0.52952 -0.4068310896
91 -0.52952 -0.4011399496
92 -0.52952 -0.407983523
93 -0.52952 -0.4008302665
94 -0.52952 -0.4089342389
95 -0.52952 -0.404329474
96 -0.52952 -0.4098480158
97 -0.52952 -0.4068971478
98 -0.52952 -0.3970568892
99 -0.52952 -0.4050681684
100 -0.52952 -0.4176714243

16

Das könnte Ihnen auch gefallen