updates/Maple2019/Physics2 - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : updates/Maple2019/Physics2

Physics

Maple provides a state-of-the-art environment for algebraic computations in Physics, with emphasis on ensuring that the computational experience is as natural as possible. The theme of the Physics project for Maple 2019 has been the consolidation of the functionality introduced in previous releases, together with significant enhancements to further strengthen the functionality mainly in three areas:

1. 

Quantum Mechanics: coherent states, tensor products of states, taylor series of expressions involving anticommutative variables and functions, and several improvements in the normalization and simplification of Commutator and AntiCommutator algebra rules.

2. 

Tensor computations in general, making Maple 2019 unmatched in the field, covering classical and quantum mechanics, and special and general relativity, using natural tensor input notation and textbook-like display of results. The functionality for tensors is tightly integrated with the full Maple computation system and extensively documented in "A Complete Guide for performing tensor computations using Physics".

3. 

Documentation: besides the new guide for tensor computations, two other new pages, linked in all the help pages of Physics commands, are

a. 

Physics Updates organizes and presents in one place all formerly scattered links to updates and presentations with examples on the use of Physics.

b. 

Mini-Course: Computer Algebra for Physicists, is a course that can be used as a tutorial, with 10 sections to be covered in 5 hands-on guided experiences of 2 hours each. The first part, 5 sections, is about Maple 101, while the remaining 5 sections is all about using the Physics package.

Overall, the enhancements throughout the entire package increase robustness, versatility and functionality, extending furthermore the range of Physics-related algebraic computations that can be done naturally in a worksheet. The presentation below illustrates both the novelties and the kind of mathematical formulations that can now be performed.

As part of its commitment to providing the best possible environment for algebraic computations in Physics, Maplesoft launched a Maple Physics: Research and Development website with Maple 18, which enabled users to download research versions, ask questions, and provide feedback. The results from this accelerated exchange with people around the world have been incorporated into the Physics package in Maple 2019.

 

Tensor product of Quantum States using Dirac's Bra-Ket Notation

Coherent States in Quantum Mechanics

The Zassenhaus formula and the algebra of the Pauli matrices

Multivariable Taylor series of expressions involving anticommutative (Grassmannian) variables

New SortProducts command

Documentation: "Physics updates", "A complete guide for performing tensor computations" and the "Mini-Course: Computer Algebra for Physicists"

Simplification of tensors, Pauli and Dirac matrices and KroneckerDelta

See Also

 

The Zassenhaus formula and the algebra of the Pauli matrices

Multivariable Taylor series of expressions involving anticommutative (Grassmannian) variables

New SortProducts command

Documentation: "Physics updates", "A complete guide for performing tensor computations" and the "Mini-Course: Computer Algebra for Physicists"

Simplification of tensors, Pauli and Dirac matrices and KroneckerDelta

See Also

The Zassenhaus formula and the algebra of the Pauli matrices

 

The implementation of the Pauli matrices and their algebra were reviewed for Maple 2019, including the algebraic manipulation of nested commutators, resulting in faster computations using simpler and more flexible input. As it frequently happens, improvements of this type suddenly transform research problems presented in the literature as untractable in practice, into tractable.

As an illustration, we tackle below the derivation of the coefficients entering the Zassenhaus formula shown in section 4 of [1] for the Pauli matrices up to order 10 (results in the literature go up to order 5). The computation presented can be reused to compute these coefficients up to any desired higher-order (hardware limitations may apply). A number of examples which exploit this formula and its dual, the Baker-Campbell-Hausdorff formula, occur in connection with the Weyl prescription for converting a classical function to a quantum operator (see sec. 5 of [1]), as well as when solving the eigenvalue problem for classes of mathematical-physics partial differential equations [2].

References

  

[1] R.M. Wilcox. "Exponential Operators and Parameter Differentiation in Quantum Physics", Journal of Mathematical Physics, V.8, 4, (1967.

  

[2] S. Steinberg. "Applications of the lie algebraic formulas of Baker, Campbell, Hausdorff, and Zassenhaus to the calculation of explicit solutions of partial differential equations". Journal of Differential Equations, V.26, 3, 1977.

  

[3] K. Huang. "Statistical Mechanics". John Wiley & Sons, Inc. 1963, p217, Eq.(10.60).

 

Formulation of the problem

The Zassenhaus formula expresses ⅇλA+B as an infinite product of exponential operators involving nested commutators of increasing complexity

ⅇλA+B  =   ⅇλA ⅇλB ⅇλ2C2 ⅇλ3C3  ...                                                                                                            =   ⅇλA ⅇλB ⅇ12λ2A,B ⅇ16λ3A,A,B+2B,A,B  ...

Given A, B and their commutator E=A,B, if A and B commute with E, Cn=0 for n3 and the Zassenhaus formula reduces to the product of the first three exponentials above. The interest here is in the general case, when A,E0 and B,E0, and the goal is to compute the Zassenhaus coefficients Cn in terms of A, B for arbitrary n. Following [1], in that general case, differentiating the Zassenhaus formula with respect to λ and multiplying from the right by ⅇλ A+B one obtains

A+B=A+ⅇλABⅇλA+ⅇλA+ⅇλB2λC2ⅇλBⅇλA+ ...

This is an intricate formula, which however (see eq.(4.20) of [1]) can be represented in abstract form as

 

0=n=1λnn!An,B+2λm=0n=0λn+mn!m!Am,Bn,C2+3λ2k=0m=0n=0λn+m+kn!m!k!Ak,Bm,C2n,C3+ ...

from where an equation to be solved for each Cn is obtained by equating to 0 the coefficient of λn1. In this formula, the repeated commutator bracket is defined inductively in terms of the standard commutator A,B by

A0,B=B,     An+1,B=A,An,B

A0,Bn,Cj=Bn,Cj,    Am,Bn,Cj=A,Am1,Bn,Cj

and higher-order repeated-commutator brackets are similarly defined. For example, taking the coefficient of λ and λ2 and respectively solving each of them for C2 and C3 one obtains

C2=12A,B

C3=16A,A,B+13B,A,B

This method is used in [3] to treat quantum deviations from the classical limit of the partition function for both a Bose-Einstein and Fermi-Dirac gas. The complexity of the computation of Cn grows rapidly and in the literature only the coefficients up to C5 have been published. Taking advantage of developments in the Physics package for Maple 2019, below we show the computation up to C10 and provide a compact approach to compute them up to arbitrary order.

 

Computing up to C10

Set the signature of spacetime such that its space part is equal to +++ and use lowercaselatin letters to represent space indices. Set also A, B and Cn to represent quantum operators

restart; withPhysics:

Setupop=A,B,C,signature = `+++-`,spaceindices=lowercaselatin

* Partial match of 'op' against keyword 'quantumoperators'

_______________________________________________________

quantumoperators=A,B,C,signature=+ + + -,spaceindices=lowercaselatin

(1)

To illustrate the computation up to C10, a convenient example, where the commutator algebra is closed, consists of taking A and B as Pauli Matrices which, multiplied by the imaginary unit, form a basis for the 𝔰𝔲2group, which in turn exponentiate to the relevant Special Unitary Group SU2. The algebra for the Pauli matrices involves a commutator and an anticommutator

Library:-DefaultAlgebraRulesPsigma

σi,σj=2Iεi,j,kσk,σi,σj+=2gi,j

(2)

Assign now A and B to two Pauli matrices, for instance

APsigma1

Aσ1

(3)

BPsigma3

Bσ3

(4)

Next, to extract the coefficient of λn from

0=n=1λnn!An,B+2λm=0n=0λn+mn!m!Am,Bn,C2+3λ2k=0m=0n=0λn+m+kn!m!k!Ak,Bm,C2n,C3+...

to solve it for Cn+1 we note that each term has a factor λm multiplying a sum, so we only need to take into account the first n+1 terms (sums) and in each sum replace ∞ by the corresponding nm. For example, given C2=12A,B, to compute C3 we only need to compute these first three terms:

0=n=12λnn!An,B+2λm=01n=01λn+mn!m!Am,Bn,C2+3λ2k=00m=00n=00λn+m+kn!m!k!Ak,Bm,C2n,C3

then solving for C3 one gets C3=13B,A,B+16A,A,B.

Also, since to compute Cn we only need the coefficient of λn1, it is not necessary to compute all the terms of each multiple-sum. One way of restricting the multiple-sums to only one power of λ consists of using multi-index summation, available in the Physics package (see Physics:-Library:-Add). For that purpose, redefine sum to extend its functionality with multi-index summation

Setupredefinesum = true

redefinesum=true

(5)

Now we can represent the same computation of C3 without multiple sums and without computing unnecessary terms as

0=n=1λnn!An,B+2λn+m=1λn+mn!m!Am,Bn,C2+3λ2n+m+k=0λn+m+kn!m!k!Ak,Bm,C2n,C3

Finally, we need a computational representation for the repeated commutator bracket 

A0,B=B,    An+1,B=A,An,B

One way of representing this commutator bracket operation is defining a procedure, say F, with a cache to avoid recomputing lower order nested commutators, as follows

F procA,B,n option cache; if nnegint then 0 elif n =0  then B elif nposint then %CommutatorA, FA,B,n1 else 'FA,B,n' fi; end;

FprocA,B,noptioncache;ifn::negintthen0elifn=0thenBelifn::posintthen%CommutatorA,FA,B,n1else'FA,B,n'fiend

(6)

For example,

FA,B,1

σ1,σ3

(7)

FA,B,2

σ1,σ1,σ3

(8)

FA,B,3

σ1,σ1,σ1,σ3

(9)

We can set now the value of C2

C212CommutatorA,B

C2Iσ2

(10)

and enter the formula that involves only multi-index summation

Hn=2λnn!FA,B,n+2λn+m=1λn+mn!m!FA,FB,C2,n,m+3λ2n+m+k=0λn+m+kn!m!k!FA,FB,FC2,C3,n,m,k

Hλ2σ1,σ1,σ32+2λλσ1,Iσ2+λσ3,Iσ2+3λ2C3

(11)

from where we compute C3 by solving for it the coefficient of λ2, and since due to the multi-index summation this expression already contains λ2 as a factor,

C3= solvevalueH,C3

C3=4σ13+2σ33

(12)

In order to generalize the formula for H for higher powers of λ, the right-hand side of the multi-index summation limit can be expressed in terms of an abstract N, and H transformed into a mapping:

 

Hunapplyn=Nλnn!FA,B,n+2λn+m=N1λn+mn!m!FA,FB,C2,n,m+3λ2n+m+k=N2λn+m+kn!m!k!FA,FB,FC2,C3,n,m,k,N

HNλNFσ1,σ3,NN!+2λn+m=N1λn+m1n!m!Fσ1,Fσ3,Iσ2,n,m+3λ2n+m+k=N2λn+m+k1n!m!k!Fσ1,Fσ3,FIσ2,C3,n,m,k

(13)

Now we have

H0

σ3

(14)

H1

λσ1,σ3+2Iλσ2

(15)

The following is already equal to (11)

H2

λ2σ1,σ1,σ32+2λλσ1,Iσ2+λσ3,Iσ2+3λ2C3

(16)

In this way, we can reproduce the results published in the literature for the coefficients of Zassenhaus formula up to C5 by adding two more multi-index sums to (13). Unassign C first

unassignC

Hunapplyn=Nλnn!FA,B,n+2λn+m=N1λn+mn!m!FA,FB,C2,n,m+3λ2n+m+k=N2λn+m+kn!m!k!FA,FB,FC2,C3,n,m,k+4λ3n+m+k+l=N3λn+m+k+ln!m!k!l!FA,FB,FC2,FC3,C4,n,m,k,l+5λ4n+m+k+l+p=N4λn+m+k+l+pn!m!k!l!p!FA,FB,FC2,FC3,FC4,C5,n,m,k,l,p,N:

We compute now up to C5 in one go

for j to 4 do     Cj+1  solvevalueHj,Cj+1 od;

C2Iσ2

C34σ13+2σ33

C44Iσ23+σ1+2σ3

C516Iσ238σ19158σ345

(17)

The nested-commutator expression solved in the last step for C5 is

H4

λ4σ1,σ1,σ1,σ1,σ324+2λλ3σ1,σ1,σ1,Iσ26+λ3σ1,σ1,σ3,Iσ22+λ3σ1,σ3,σ3,Iσ22+λ3σ3,σ3,σ3,Iσ26+3λ2λ2σ1,σ1,4σ13+2σ332+λ2σ1,σ3,4σ13+2σ33+λ2σ3,σ3,4σ13+2σ332+λ2σ1,Iσ2,4σ13+2σ33+λ2σ3,Iσ2,4σ13+2σ33+λ2Iσ2,Iσ2,4σ13+2σ332+4λ3λσ1,4Iσ23+σ1+2σ3+λσ3,4Iσ23+σ1+2σ3+λIσ2,4Iσ23+σ1+2σ3+λ4σ13+2σ33,4Iσ23+σ1+2σ3+5λ416Iσ238σ19158σ345

(18)

With everything understood, we want now to extend these results generalizing them into an approach to compute an arbitrarily large coefficient Cn, then use that generalization to compute all the Zassenhaus coefficients up to C10. To type the formula for H for higher powers of λ is however prone to typographical mistakes. The following is a program, using the Maple programming language, that produces these formulas for an arbitrary integer power of λ:

 

This Formula program uses a sequence of summation indices with as much indices as the order of the coefficient Cn we want to compute, in this case we need 10 of them

summation_indices  n, m, k, l, p, q, r, s, t, u

summation_indicesn,m,k,l,p,q,r,s,t,u

(19)

To avoid interference of the results computed in the loop (17), unassign C again

unassignC

 

Now the formulas typed by hand, used lines above to compute each of C2, C3 and C5, are respectively constructed by the computer

FormulaA,B,C,2

n=NλnFσ1,σ3,nn!+2λn+m=N1λn+mFσ1,Fσ3,C2,n,mn!m!

(20)

FormulaA,B,C,3

n=NλnFσ1,σ3,nn!+2λn+m=N1λn+mFσ1,Fσ3,C2,n,mn!m!+3λ2n+m+k=N2λn+m+kFσ1,Fσ3,FC2,C3,n,m,kn!m!k!

(21)

FormulaA,B,C,5

n=NλnFσ1,σ3,nn!+2λn+m=N1λn+mFσ1,Fσ3,C2,n,mn!m!+3λ2n+m+k=N2λn+m+kFσ1,Fσ3,FC2,C3,n,m,kn!m!k!+4λ3n+m+k+l=N3λn+m+k+lFσ1,Fσ3,FC2,FC3,C4,n,m,k,ln!m!k!l!+5λ4n+m+k+l+p=N4λn+m+k+l+pFσ1,Fσ3,FC2,FC3,FC4,C5,n,m,k,l,pn!m!k!l!p!

(22)

 

Construct then the formula for C10 and make it be a mapping with respect to N, as done for C5 after (16)

H  unapplyFormulaA,B,C,10,N

HNn=NλnFσ1,σ3,nn!+2λn+m=N1λn+mFσ1,Fσ3,C2,n,mn!m!+3λ2n+m+k=N2λn+m+kFσ1,Fσ3,FC2,C3,n,m,kn!m!k!+4λ3n+m+k+l=N3λn+m+k+lFσ1,Fσ3,FC2,FC3,C4,n,m,k,ln!m!k!l!+5λ4n+m+k+l+p=N4λn+m+k+l+pFσ1,Fσ3,FC2,FC3,FC4,C5,n,m,k,l,pn!m!k!l!p!+6λ5n+m+k+l+p+q=N5λn+m+k+l+p+qFσ1,Fσ3,FC2,FC3,FC4,FC5,C6,n,m,k,l,p,qn!m!k!l!p!q!+7λ6n+m+k+l+p+q+r=N6λn+m+k+l+p+q+rFσ1,Fσ3,FC2,FC3,FC4,FC5,FC6,C7,n,m,k,l,p,q,rn!m!p!k!q!l!r!+8λ7n+m+k+l+p+q+r+s=N7λn+m+k+l+p+q+r+sFσ1,Fσ3,FC2,FC3,FC4,FC5,FC6,FC7,C8,n,m,k,l,p,q,r,sn!m!p!k!q!r!l!s!+9λ8n+m+k+l+p+q+r+s+t=N8λn+m+k+l+p+q+r+s+tFσ1,Fσ3,FC2,FC3,FC4,FC5,FC6,FC7,FC8,C9,n,m,k,l,p,q,r,s,tn!m!p!k!q!s!r!l!t!+10λ9n+m+k+l+p+q+r+s+t+u=N9λn+m+k+l+p+q+r+s+t+uFσ1,Fσ3,FC2,FC3,FC4,FC5,FC6,FC7,FC8,FC9,C10,n,m,k,l,p,q,r,s,t,un!m!t!p!k!q!s!r!l!u!

(23)

Compute now the coefficients of the Zassenhaus formula up to C10 all in one go

for j to 9 do     Cj+1  solvevalueHj, Cj+1 od;

C2Iσ2

C34σ13+2σ33

C44Iσ23+σ1+2σ3

C516Iσ238σ19158σ345

C61078Iσ2405+1030σ1818σ381

C711792Iσ2243+358576σ142525+12952σ3135

C835837299048Iσ217222625+87277417σ1492075+833718196σ3820125

C9449018539801088Iσ2104627446875263697596812424σ1996451875+84178036928794306σ32197176384375

C102185211616689851230363020476Iσ24204571658549609375+3226624781090887605597040906σ121022858292748046875+200495118165066770268119656σ3200217698026171875

(24)

Notes: with the material above you can compute higher order values of Cn. For that you need:

1. 

Unassign C, as done above in two cases, to avoid interference of the results just computed.

2. 

Indicate more summation indices in the sequence summation_indices in (19), as many as the maximum value of n in Cn.

3. 

Have in mind that the growth in size and complexity is significant, with each Cn taking significantly more time than the computation of all the previous ones.

4. 

Re-execute the input line (23) and the loop (24).

Multivariable Taylor series of expressions involving anticommutative (Grassmannian) variables

 

The Physics:-Gtaylor command, for computing Taylor series of expressions involving anticommutative variables, got rewritten, now as a multivariable Taylor series command (same difference as in between the taylor and mtaylor commands) and combining two different approaches to handle, when possible, the presence of noncommutative and anticommutative variables. One is the standard approach for multi-variable expansions, it requires that the derivative of each function entering the expression being expanded commutes with the function itself. The second approach, for expansions with respect to anticommutative variables, separates the function into a "Body" and a "Soul", as is standard in supermathematics.

 

Consider a set of anticommutative Grassmann variables θ__i with i=1.. n, forming a basis enlarged by their products, that satisfies θ__iθ__j = θ__jθ__i, so that θ__i2=0. The elements of the algebra involving these variables are linear combinations of the form

 

a=a0+ia__i1&theta;__i+i<ja__ij2&theta;__i&theta;__j+ ..&period; 

 

where the coefficients a__ij ...m are complex numbers, a0 is called the body and everything else, aa0=nila, is called the soul (nilpotent part).

 

Consider now a mapping (function) fa which is assumed to be differentiable. Then fa can be defined by its Taylor expansion,

 

fa=fa0+f  &apos;a0nila+12f  &apos; &apos;a0nila2+ ..&period;

 

That is the expansion computed by Gtaylor in Maple 2019.

 

Examples

 

restart&semi;withPhysics&colon;Setupanticommutativeprefix=Θ&comma;θ&comma;quantumoperators=Θ&comma;a

anticommutativeprefix=Θ&comma;θ&comma;quantumoperators=Θ&comma;a

(25)

Consider

11&plus;&theta;__1&theta;__2&plus;&theta;__1

11+&theta;__1&theta;__2+&theta;__1

(26)

Step by step, (26) is the application of the mapping

f  u  1u

fu1u

(27)

to the element of the algebra

a  1&plus;&theta;__1&theta;__2&plus;&theta;__1

a1+&theta;__1&theta;__2+&theta;__1

(28)

The body of a is

body  evala&comma;&theta;__1&equals;0&comma;&theta;__2&equals;0

body1

(29)

The soul of a is

soul  a  body

soul&theta;__1&theta;__2+&theta;__1

(30)

and in view of

soul2&colon; % &equals; Expand%

&theta;__1&theta;__2+&theta;__12=0

(31)

for the expression (26), the Taylor expansion, mentioned in the introductory paragraph is

 fbody &plus; Dfbody  soul

1&theta;__1&theta;__2&theta;__1

(32)

The same computation, all in one go:

Gtaylor

1&theta;__1&theta;__2&theta;__1

(33)
• 

Gauss integrals in this domain, that is, integrals over the exponential of a quadratic form of Grassmann variables, yield the determinant of the coefficient matrix of the quadratic form. These integrals play an important role in applications of anticommutative variables.

 

Problem. Taking into account that, with regards to Grassmann variables, differentiation and integration are the same operation, recover the determinant of the coefficient matrix with dimension N&equals;3

 

Define the coefficient matrix and construct the exponential

N  3&colon;

MMatrixN&comma;symbol&equals;m

Mm1,1m1,2m1,3m2,1m2,2m2,3m3,1m3,2m3,3

(34)

&Theta;__1Vectorrow N&comma;n&theta;n&plus;3

&Theta;__1θ4θ5θ6

(35)

&Theta;__2Vectorcolumn N&comma;nθn

&Theta;__2θ1θ2θ3

(36)

exp&Theta;__1·M · &Theta;__2

&ExponentialE;θ1m1,1θ4+m2,1θ5+m3,1θ6θ2m1,2θ4+m2,2θ5+m3,2θ6θ3m1,3θ4+m2,3θ5+m3,3θ6

(37)

The integral of this exponential can thus be obtained performing a multivariable Taylor series expansion, then differentiating (equivalent to integrating) with respect to the six θi variables.

Θθ1&comma;θ2&comma;θ3&comma;θ4&comma;θ5&comma;θ6&colon;

 

To avoid the default behavior of discarding terms of order 6 or higher in Θ, as in the other series commands of the Maple system, indicate the order term to be Oθi7.

Gtaylor&comma;&Theta;&comma;order&equals;7

1m2,2θ2θ5m1,2θ2θ4m3,1θ1θ6m2,1θ1θ5m1,1θ1θ4m3,3θ3θ6m2,3θ3θ5m1,3θ3θ4m3,2θ2θ6+m1,1m2,2m2,1m1,2m3,3+m3,1m1,2m2,3+m1,3m2,1m3,2m3,1m2,2m1,1m3,2m2,3θ1θ2θ3θ4θ5θ6+m2,2m3,3+m3,2m2,3θ2θ3θ5θ6+m1,2m3,3+m3,2m1,3θ2θ3θ4θ6+m1,2m2,3+m2,2m1,3θ2θ3θ4θ5+m2,1m3,3+m3,1m2,3θ1θ3θ5θ6+m1,1m3,3+m3,1m1,3θ1θ3θ4θ6+m1,1m2,3+m2,1m1,3θ1θ3θ4θ5+m2,1m3,2+m3,1m2,2θ1θ2θ5θ6+m1,1m3,2+m3,1m1,2θ1θ2θ4θ6+m1,1m2,2+m2,1m1,2θ1θ2θ4θ5

(38)

Perform now the integration of the expanded exponential

diff&comma; &Theta;

m1,1m2,2m2,1m1,2m3,3+m3,1m1,2m2,3+m1,3m2,1m3,2m3,1m2,2m1,1m3,2m2,3

(39)

Compare with the determinant of the coefficient matrix M

ΔLinearAlgebra:-DeterminantM

Δm1,1m2,2m3,3m1,1m3,2m2,3m2,1m1,2m3,3+m3,1m1,2m2,3+m2,1m3,2m1,3m3,1m2,2m1,3

(40)

normalDelta

0

(41)
• 

An example with fermionic annihilation and creation operators, typical from quantum field theory.

 

Setupadditionally&comma; anticommutativeprefix &equals; lambda&comma; Lambda&comma; op &equals; Lambda

* Partial match of 'op' against keyword 'quantumoperators'

_______________________________________________________

anticommutativeprefix=Λ&comma;Θ&comma;λ&comma;θ&comma;quantumoperators=Λ&comma;Θ&comma;a

(42)

 

Define corresponding annihilation and creation operators

am  Annihilation&Lambda;

ama

(43)

ap  Creation&Lambda;

apa+

(44)

Note that the anticommutator of these two operators is equal to 1 (so they don't anticommute)

%AntiCommutator &equals; AntiCommutatoram&comma; ap

a,a++=1

(45)

while they do anticommute with all Grassmann variables

%AntiCommutator &equals; AntiCommutatoram&comma; theta

a,θ+=0

(46)

%AntiCommutator &equals; AntiCommutatorap&comma; lambda

a+,λ+=0

(47)

and, because of Pauli's exclusion principle for fermions, the square of a+ and aare equal to 0.

 

Consider now the product of exponentials

exptheta am explambda ap

&ExponentialE;θa&ExponentialE;λa+

(48)

Because the corresponding exponents θa and λa+ commute with their commutator, this product of exponentials can be combined using Hausdorff's formula

 &equals; combine

&ExponentialE;θa&ExponentialE;λa+=&ExponentialE;θaλa+λθ2

(49)

Both sides can be expanded in multivariable Taylor series, this time including the annihilation and creation operators as series variables since their commutation rules are all known ((45), (46), (47)) and their square is equal to 0:

Gtaylor

1λa++θaλθ+λθa+a=1λa++θaλθ+λθa+a

(50)

On the left-hand side is the product of the expansion of each exponential while on the right-hand side it is the expansion of the single exponential (no-trivially) combined taking into account the commutator of the exponents on the left-hand side. Verify that both expansions are one and the same:

evalb

true

(51)
• 

Both Gtaylor and diff now handle θ as a differentiation or series variable in equal footing as θ itself

expθaθa+

&ExponentialE;θaθa+

(52)

&equals;Gtaylor

&ExponentialE;θaθa+=1+θaθa++θθ2θθa+a

(53)

diff&comma;&theta;,θ

12+a+a=12+a+a

(54)
• 

Depending on the case, multivariable Taylor expansions in the presence of not commutative variables can also be computed for functions of more than one variable and for unknown functions

GtaylorFx&comma;θ&comma;λ&comma;order &equals; 3

F0&comma;0&comma;0+xD1F0&comma;0&comma;0+x2D1,1F0&comma;0&comma;02+xD1,3F0&comma;0&comma;0+D3F0&comma;0&comma;0λ+xD1,2F0&comma;0&comma;0+D2F0&comma;0&comma;0θ+D2,3F0&comma;0&comma;0λθ

(55)

Setupnoncommutativeprefix &equals; A&comma; B

noncommutativeprefix=A&comma;B

(56)

Gtaylor&ExponentialE;A+Bδ&comma;δ=0&comma;order=3

1+δA+B+δ2A+B22

(57)

New SortProducts command

 

A new command, SortProducts, receives an expression involving products and sorts the operands of these products according to the ordering indicated as the second argument, a list containing some or all of the operands of the product(s) found in the expression. The sorting of operands performed automatically takes into account any algebra rules set using Setup.

 

Examples

restart&semi;

withPhysics&colon;

Consider the product of the commutative a,b,c,d

Pabcd

Pabcd

(58)

Reorder the operands c and b "in place".

SortProductsP&comma;c&comma;b

acbd

(59)

Sort the operands b and c and put them to the left, then to the right

SortProductsP&comma;c&comma;b&comma;totheleft

cbad

(60)

SortProductsP&comma;c&comma;b&comma;totheright

adcb

(61)

Set a prefix identifying noncommutative variables and related algebra rules for some of them, such that Z1,Z2,Z3 and Z4 commute between themselves, but none of them commute with Z5.

Setupnoncommutativeprefix=Z&comma;%CommutatorZ1&comma;Z2=0&comma;%CommutatorZ1&comma;Z3=0&comma;%CommutatorZ2&comma;Z3=0&comma;%CommutatorZ3&comma;Z4=0&comma;%CommutatorZ2&comma;Z4=0&comma;%CommutatorZ1&comma;Z4=0

algebrarules=Z1,Z2=0&comma;Z1,Z3=0&comma;Z1,Z4=0&comma;Z2,Z3=0&comma;Z2,Z4=0&comma;Z3,Z4=0&comma;noncommutativeprefix=Z

(62)

PZ1Z2Z3Z4

PZ1Z2Z3Z4

(63)

Sort Z2 and Z3 "in place".

SortProductsP&comma;Z3&comma;Z2

Z1Z3Z2Z4

(64)

SortProductsP&comma;Z3&comma;Z2&comma;totheright

Z1Z4Z3Z2

(65)

The value of the commutator between Z1 and Z5 is not known to the system, so by default they are not sorted:

SortProductsZ1Z5&comma;Z5&comma;Z1

Z1Z5

(66)

Force their sorting using their commutator or anticommutator

SortProductsZ1Z5&comma;Z5&comma;Z1&comma;usecommutator

Z5Z1+Z1,Z5

(67)

expand

Z1Z5

(68)

SortProductsZ1Z5&comma;Z5&comma;Z1&comma;useanticommutator

Z5Z1+Z1,Z5+

(69)

expand

Z1Z5

(70)

Enter the product of P with Z5 at the end (so, to the right of P) and sort it with Z5 to the left. This is a case where Z5 does not commute with any of the other operands. Compare the results with and without the option usecommutator,

PPZ5

PZ1Z2Z3Z4Z5

(71)

SortProductsP&comma;Z5&comma;Z1

Z1Z2Z3Z4Z5

(72)

SortProductsP&comma;Z5&comma;Z1&comma;usecommutator

Z5Z1Z2Z3Z4Z5,Z1Z2Z3Z4

(73)

SortProductsP&comma;Z5&comma;Z3&comma;usecommutator

Z1Z2Z5Z3Z4Z5,Z3Z4

(74)

Documentation: "Physics updates", "A complete guide for performing tensor computations" and the "Mini-Course: Computer Algebra for Physicists"

 

• 

Prior to Maple 2019, the Physics package documentation contained

a.  <