# QIntro: Lie Product Formula

## How to perform decomposition of a matrix exponential?

--

In the previous article, we have discussed about the Schrodinger Wave Equation and mathematical framework.

In this article, we discuss about how to decompose a Matrix exponential in the case of commutative and non-commutative. Also we have a look at the simple Quantum Approximation Algorithm.

Setup:

Decompose the Hamiltonian operator in to know gates to transform the required function in to the current quantum systems know format.

We discuss *Lie Product formula* solution in two approaches. The approaches mentioned are one of the available approach to solve the non commutative Hamiltonian. We do have better solutions based on this and also alternative better approaches according the problem statement.

The error in this approximation scales as 1/n². When we combine the n slices, we get an approximation of our target unitary(exp(H)) whose error scales as 1/n. So by simply increasing the number of slices, we can get as close to U as we need. Other methods of creating the sequence are also possible to get even more accurate versions of our target unitary.

we need a function that it’s derivative shall be same, which brings a time derivate always represented in terms of initial form of the function.

By using first principle of Differential equation:

Here e is consider as the special case where the derivative of itself becomes same.

Let’s consider the simple case of power series

first derivative

second derivative

Finally replacing the coefficients

Similarly,

Let X be n x n complex matrix.

The exponential of X, denoted by 𝑒^*X* (or) exp(𝑋), is the n x n matrix given by the power series

Where 𝑋⁰ is denoted to be the Identity matrix ** I** with the same dimensions as X.

From Schrödinger wave equation, let’s consider time dependent part

rewrite the above expression and consider i² = -1

Apply Integral on the above expression, consider integral 1/t dt as ln(t)

solve for the constant at time t=0

Integral expression of the Schrödinger Equation

replacing the constant term

In Dirac notation

Where |𝜓(0)⟩ is time-dependent eigenvector |𝜓(𝑡)⟩ at time t = 0 and here E is an energy operator.

Let’s consider a Hamiltonian operator 𝐻

Also consider,

Where 𝑈(𝑡) is a time dependent Unitary Operator

below shows the *U* as unitary operator.

This calculation was simple because the Hamiltonian 𝐻̂ is diagonal, but for the general case we need to use the series definition of exponentiation.

Given a (potentially infinite dimensional) bounded self-adjoint operator. 𝑋:𝐷(𝑋) →𝐻 , its exponential is defined by (from the above proof)

If we have another self-adjoint operator Y : D(Y) →𝐻 such that [X,Y] = 0 (i.e., XY = YX), then

From Lie-Algebra, [X,Y] = 0 means XY-YX = 0

By using the above figure (exponential of a matrix),

use binomial theorem,

Binomial coefficients

By using the above theorem let’s define the exponential sum of two matrices

Let’s take the limits as 𝑛−𝑘=0 and 𝑛−𝑘→∞

After rewriting the variables,

the above two terms can be written as

Which gives the condition exponential matrices decompose if and only if [X,Y] = 0

what does it means if and only if [X,Y] = 0?

Let’s take an example here with binomial Theorem

(𝑋+𝑌)² = 𝑋²+𝑋𝑌+𝑌𝑋+𝑌² if 𝑋𝑌=𝑌𝑋 (or) [𝑋,𝑌]=0 then (𝑋+𝑌)² = 𝑋²+2𝑋𝑌+𝑌²

when X and Y do not commute,𝑋𝑌≠𝑌𝑋 (or) [𝑋,𝑌]≠0, this argument fails because the simple Binomial Theorem no longer applies.

To solve this case we use a trick called ** Trotter Product** Formula which gives a limit where the formula does hold in a weak sense, even when X and Y are non-commutative.

*Trotter Product:*

Let assume 𝐻̂ is a summation of two operators or more. But for our understanding let’s consider two operator’s only as following

we know that

similarly let’s consider for a fraction of a time t

Here higher orders are represented with Big O notation for the simplicity purpose and also in this article we discuss about first order only.

similarly,

in the case [X, Y] = 0 we have seen

let’s try similarly and see what will happen

expand and multiply the above terms results as shown below

**First approach:**

running the above expression for n times

here by neglecting the higher orders

Using Binomial Theorem

Apply the theorem to the above expression

any power of an identity matrix is equal to the identity matrix itself.

a matrix remains unchanged when it is multiplied by the identity matrix.

bringing out the 1/n

let’s take the n terms part and apply limit as shown below

cancel out the factorial values results as below

split the n in to following terms as shown below

divide with n results as shown below

if we apply n tends to infinity to the above expression we left over with k! only but in reality n will never tends to infinity, let’s consider n as a varying factor as below

this is not an equivalent solution

Let’s combine all the parts so far we have done

bringing the limits to the n variables as shown below

replacing with the above figure(limitation of n)

expanding and multiplying the terms

By considering the value of n as very big neglect the higher orders.

similarly the equivalence equation

if we choose n as a very big number we can rewrite the above expression as

where n shall be very big number.

**Second Approach:**

Continue the statement before first approach as below

when n tends to infinity then the right hand value reaches to Identity.

Which further gives us that left hand side term is in the domain of the logarithm for all n sufficiently large.

We also know that for all m×m matrices with ∥P∥ < 0.5

Hence, for large values of n, we have

apply the log condition on the right hand side from the figure(log condition)

considering Big O for higher orders.

Exponentiating the logarithm, we get

repeat the expression for n times

Apply the limit and By the continuity of the exponential, we conclude that

considering the n as very big number

similarly,

Example: Let consider an example as follows:

Consider the wave equation

Here Hamiltonian is the H = X + Z

consider the basis of h bar then h bar equals to 1.

Here |𝜓(0)⟩ is |0⟩

if we identify the Unitary then we can build the circuit

But X and Z are non commutative

*check:*

Pauli X and Z matrices

Multiply X and Z as follows

expand the above matrices

which results

similarly

expand the above matrices

which results

from both the results [X, Z] **≠ 0**

Applying Lie product formula

Where n is an very number and the result is an approximation.

consider the Rx

similarly Rz

from the above expression the value of theta can be defined as

The draft circuit

**Advantages:**

- First order formula is good for short time intervals.
- Long term evolution can be simulated by repeating short intervals
- Compared to the QPE(Quantum Phase Estimation), No ancilla qubits are required in the case of Quantum Approximation Algorithms.

References: Wikipedia, stack exchange and open sources.

updated 17th sep 2022: change of sub title.