iTranslated by AI
Exploring the Trotter Product Formula
Purpose
I want to verify the points discussed in a somewhat scattered manner in the article Trotter's Product Formula.
Review
For matrices
holds, and the error can be estimated as
Let's try some calculations
As simple non-commutative matrices, let's use Pauli matrices, which are frequently encountered in quantum mechanics and quantum computing.
In fact, since
To calculate the matrix exponential, we will use SciPy's expm.
import numpy as np
from scipy.linalg import expm
And then
X = np.array([
[0, 1],
[1, 0]
])
Y = np.array([
[1, 0],
[0, -1]
])
Define the matrices. To calculate the error, we use the matrix norm; for
[1].
In the following code, the matrix exponential is calculated, and the difference is output in the form of
for n in [3, 5, 10, 50, 100, 500]:
A = expm((X+Y)/n)
B = expm(X/n)@expm(Y/n)
print(A)
print(B)
print('diff * n^2:', np.sqrt(np.sum((A-B)**2)) * n**2)
print('-'*30)
Running it results in the following:
[[1.45900094 0.34581691]
[0.34581691 0.76736711]]
[[1.47386702 0.24329144]
[0.47386702 0.75670856]]
diff * n^2: 1.4854883068493039
------------------------------
[[1.24294473 0.20267735]
[0.20267735 0.83759003]]
[[1.24591235 0.16483998]
[0.24591235 0.83516002]]
diff * n^2: 1.4395406249247398
------------------------------
[[1.11035034 0.10033367]
[0.10033367 0.90968301]]
[[1.11070138 0.09063462]
[0.11070138 0.90936538]]
diff * n^2: 1.4205105293677018
------------------------------
[[1.02040269 0.02000267]
[0.02000267 0.98039736]]
[[1.02040539 0.01960528]
[0.02040539 0.98039472]]
diff * n^2: 1.414464996624932
------------------------------
[[1.01010034 0.01000033]
[0.01000033 0.99009967]]
[[1.01010067 0.00990066]
[0.01010067 0.99009934]]
diff * n^2: 1.4142764174658962
------------------------------
[[1.002004 0.002 ]
[0.002 0.998004]]
[[1.00200401 0.00199601]
[0.00200401 0.99800399]]
diff * n^2: 1.4142160765324245
The result is as follows. It seems that approximately
Summary
I simply calculated a specific case using SciPy, but it's interesting to see results that align with the theory. Also, to be honest, I was a bit skeptical deep down, so it was good to get calculation results that strengthened my confidence.
Supplement
If we set
According to the reference [NC2],
I don't intend to delve any deeper this time, but I think it's interesting how restating the same formula in different words or situations can add to its depth.
References
[NC2] M. A. Nielsen, I. L. Chuang, Quantum Computation and Quantum Information II, p.8, Ohmsha, 2005
-
Norms on finite-dimensional vector spaces are equivalent to each other, so I chose one that is easy to use for observing the order. ↩︎
Discussion