Basic Examples (4)
Generate Ω1,com(t) which will be A(t):
Generate Ω1(t):
Generate Ω2,com(t):
Generate Ω2,com(t) while holding the commutation form:
Check whether it is the same as
:
Do the commutation operation:
Do the commutation operation for Dot as the operation:
Do the commutation operation for Composition as the operation:
Generate Ω2(t):
Applications (27)
H(t)=f(t)(eⅈ ta+e-ⅈ ta†)
Define a time-dependent Hamiltonian as H(t)=f(t)(eⅈ ta+e-ⅈ ta†) with[a,a†]=1 where a (a†) is the annihilation (creation) operator:
The Hamiltonian above is expressed in the interaction picture; see Sec. 4.1.1 of the preprint (arXiv:0810.5488) for details. To avoid any conflict, we shall use formal symbol of t for the time.
Define the variables within the non-commutative algebra together with their corresponding commutation relations:
Since in the Magnus series, there are many time-dependent terms that are only scalar variables, define corresponding non-commutative algebra and Gröbner basis for given n (where we needs to specify what are scalar variables for a given n):
For scalar variables in above definitions, we use the same format as in the Magnus series defined in the previous section.
A function that simplifies and reduces the non-commutative polynomial of the annihilation and creation operators:
We use Nest with ReleaseHold since the Magnus terms defined in the previous section are expressed in the hold commutator form.
As noted earlier, we chose a Hamiltonian that does not commute at different times. Show the Hamiltonian at different times do not commute:
Show[H(t1),[H(t2),H(t3)]]=0:
Find commutation term [H(t1),H(t2)] in the second term of Magnus expansion
:
Find commutation term, [H(t1),[H(t2),H(t3)]], in the third term of Magnus expansion
:
It is interesting that the third them and so on are all zero. Therefore, only first and 2nd terms contribute to the exponential:
which can be rewritten as
U(t)=Exp[-ⅈ (α a+α*a†)-ⅈ β]
with
and
:
H(t)=f1(t) σ1+f2(t) σ2+f3(t) σ3
Define a time-dependent Hamiltonian as H(t)=f1(t) σ1+f2(t) σ2+f3(t) σ3 with σ1 the Pauli-X, σ2 the Pauli-Y, and σ3 the Pauli-Z:
Define the variables within the non-commutative algebra together with their corresponding commutation relations:
Since in the Magnus series, there are many time-dependent terms that are only scalar variables, define corresponding non-commutative algebra and Gröbner basis for given n (where we needs to specify what are scalar variables for a given n):
A function that simplifies and reduces the non-commutative polynomial of Pauli matrices:
As noted earlier, we chose a Hamiltonian that does not commute at different times. Show the Hamiltonian at different times do not commute:
In above code, we have applied NonCommutativePolynomialReduce two times to take care of all reductions (note the difference in the order of variables):

Define the Hamiltonian as
:
Define corresponding algebra and Groebner Basis:
Define a function to simplify corresponding polynomials:
Calculate {Ω1(t),Ω2(t),Ω3(t),Ω4(t)} and then collect them by Pauli matrix terms:
For each term, find the coefficient for Pauli matrices (keep in mind that we will have only linear terms):
Now let's repeat the same process, but this time assigning explicit values to Pauli matrics and doing the commutation/dot calculations:
Ω1To4Manual=a1σ1+a2σ2+a3σ3
Note ai=Tr[σi.Ω1To4Manual]/2. One can calculate it and compare with the previous result:
As expected, the coefficients in front of Pauli matrices are the same the ones we obtained from non - commutative algebraic calculations.
Some numerical exploration. To find approximation to unitary operator determined by H(t), calculate {-ⅈ Ω1(t),(-ⅈ)2Ω2(t),(-ⅈ)3Ω3(t),(-ⅈ)4Ω4(t)}:
Calculate the unitary operator:
Calculate {Ω1(t),∑n=12Ωn(t),∑n=13Ωn(t),∑n=14Ωn(t)}:
Calculate ⅇ∑nΩn(t) and compare it with the solution
: