. - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : Physics/.

Physics[`.`] - scalar product between Bras, Kets, and quantum operators, and simplification of contracted indices in spacetime tensors

Calling Sequence

Bra(A, ...) . Ket(B, ...)

Q . Ket(B, ...)

Bra(A, ...) . Q

A[mu, ...] . B[mu,...]

Parameters

Ket(B, ...)

-

a Ket vector; represents the quantum state of a system in Dirac's notation

Bra(A, ...)

-

a Bra vector; represents the quantum state of a system in Dirac's notation

Q

-

a quantum operator, set to be so by the Setup command, assumed to be a linear functional operator regarding Bras and Kets

A, B

-

both A and B a spacetime tensors defined as such with the Define command of the Physics package; to perform a simplification of the contracted (repeated) indices.

Description

• 

The Physics[`.`] command is a computational representation for the scalar product operation between Bras, Kets, and quantum operators set to be so by the Setup command, or returned by the Annihilation, Creation, and Projector commands.

• 

Independent of that, Physics[`.`] is also a handy shortcut for performing simplification of contracted indices in tensor products; for instance if A[mu] is Defined as a tensor, g_[mu, nu] . A[nu] returns A[mu], equivalent to performing Simplify(g_[mu, nu] * A[nu], indices) (see Simplify and the end of the Examples section).

• 

When taking the scalar product between Bras, Kets, or quantum operator, generally speaking, two situations can happen: 1) there is not enough information to perform the operation (for example, A|B for two generic unknown Kets), in which case it is returned unevaluated; or 2) the information available permits performing the operation.

• 

In the following situations, the scalar product is returned unevaluated:

– 

The scalar product between a Bra and a Ket, with or without a quantum operator in between, is returned in terms of the Bracket function.

– 

A product involving only a quantum operator and either a Ket or a Bra is returned as entered, in terms of Physics[`.`].

– 

A product with two or more Kets only (or two or more Bras only) is returned in terms of Physics[*], and represents a state vector of the tensor product of the respective spaces.

• 

In the following situations, the scalar product can be performed:

– 

The Kets belong to the same basis: if the basis, represented by the Ket's first argument, is discrete, then the result involves KroneckerDelta; if the basis is continuous, then it involves the Dirac function. To indicate that a basis is continuous, use the Setup command. Remark: when the discrete or continuous character of the basis has not been set, it is assumed that the basis is discrete.

– 

The label A, entered as the first argument of the Ket, has also been set as a quantum operator by the Setup command; for example, a Ket KetA,n,m is an eigenvector of A1 with eigenvalue n and of A2 with eigenvalue m.

– 

The quantum operator is an annihilation or creation operator, and the Ket (or the Bra) belongs to the basis on which the operator acts.

– 

A bracket rule, for example, for A|B or A|H|B, where H represents a generic quantum operator, has been previously set by Setup, and so determines the result.

Examples

withPhysics:

Setupmathematicalnotation=true

mathematicalnotation=true

(1)

When there is not enough information to perform the scalar product, the result is returned unevaluated, depending on the case, in terms of the Bracket function.

BraA,n·KetB,m

BracketBraA,n,KetB,m

(2)

Setupop=H

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

_______________________________________________________

quantumoperators=H

(3)

BraA,n·H·KetB,m

BracketBraA,n,H,KetB,m

(4)

When the Bra and Ket belong to the same basis, unless this basis is specified as a continuous basis by the Setup command, it is assumed that the basis is discrete, and the scalar product is returned in terms of KroneckerDelta.

BraA,n·KetA,m

δm,n

(5)

Setupcontinuousbasis=C

* Partial match of 'continuousbasis' against keyword 'quantumcontinuousbasis'

_______________________________________________________

quantumcontinuousbasis=C

(6)

BraC,x·KetC,y

δy+x

(7)

In the output above, you see a Dirac delta function. If, in Q·KetC,y, the symbol Q does not represent a quantum operator, the operation is transformed into a commutative or noncommutative product, according to whether or not Q is commutative. If Q has been set to represent a quantum operator, or was returned as such by the Annihilation or Creation commands, then Q is applied to the Ket as follows:

Q·KetC,y

QKetC,y

(8)

Setupquantumop=Q

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

_______________________________________________________

quantumoperators=H,Q

(9)

Q·KetC,y

Q·KetC,y

(10)

Kets using Q as a label (first argument) are eigenvectors of the operator Q; to identify the quantum number entered as an eigenvalue, indicate its position as an index to the operator Q.

Q1·KetQ,m,n

mKetQ,m,n

(11)

Q2·KetQ,m,n

nKetQ,m,n

(12)

Note that there is an inert form for the scalar product operation, represented, as in the case of the other Physics commands, by the operator preceded by %. The inert form is activated by using the value command.

`%.`Q1,KetQ,m,n

%.Q1,KetQ,m,n

(13)

value

mKetQ,m,n

(14)

By setting the bracket rules, you can also control the result of the corresponding scalar products; note the use of the default abbreviation KroneckerDelta for KroneckerDelta.

%BracketBraQ,m,n,KetA,r,s=Aqkd_m,rkd_n,s

%BracketBraQ,m,n,KetA,r,s=AqKroneckerDeltam,rKroneckerDeltan,s

(15)

Setup

bracketrules=%Bracket%BraQ,m,n,%KetA,r,s=AqKroneckerDeltam,rKroneckerDeltan,s

(16)

%BracketBraQ,i,j,KetA,k,l

%BracketBraQ,i,j,KetA,k,l

(17)

value

Aqδi,kδj,l

(18)

BraQ,r,s·KetA,t,s

Aqδr,t

(19)

Note that the implementation of Physics[`.`] is that of an overloaded procedure. Thus if the arguments are not of type algebraic, for example, if they are of type Matrix, and other related packages are loaded, then the operation is automatically forwarded to these other packages. The same happens if you load the Vectors subpackage of Physics, which has its own scalar product operator, which is also implemented as an overloaded procedure. So provided that Physics or Physics[Vectors] is loaded last, these packages can be loaded together with everything working as expected.

For example, load the VectorCalculus and Physics[Vectors] packages to work with Matrix and algebraic representations of vectors, respectively.

withVectorCalculus:

withPhysics:-Vectors:

Try performing the operations between Bra and Ket vectors belonging to spaces of quantum states: everything continues working.

BraA,n·KetA,m

δm,n

(20)

BraC,x·KetC,y

δy+x

(21)

Q·KetC,y

Q·KetC,y

(22)

Now the symbols A_ and B_ are algebraic representations for vectors because you loaded the Vectors package, so the following operation is automatically forwarded to be performed by that package.

Scalar product between 3-D non-projected vectors:

ABA_·B_

ABA·B

(23)

Algebraic sum:

A_,B__i+2_j+3_k,4_i+5_j+6_k

A,Bi+2j+3k,4i+5j+6k

(24)

lprintA_

_i+2*_j+3*_k

typeA_,algebraic

true

(25)

AB

32

(26)

In the next example, A and B are Matrix representation of vectors because you loaded the VectorCalculus package. This operation is automatically forwarded to be performed by that package's subroutines.

A_ is not an algebraic object:

A_,B_1|2|3,4|5|6

A,B1ex+2ey+3ez,4ex+5ey+6ez

(27)

lprintA_

Vector[row](3,{1 = 1, 2 = 2, 3 = 3},datatype = anything,storage = rectangular,
order = Fortran_order,attributes = [coords = cartesian],shape = [])

typeA_,algebraic

false

(28)

A_·B_

32

(29)

The Physics[`.`] operator is also a handy shortcut for performing simplification of contracted indices in tensor products. Define first some spacetime tensors.

DefineA,B

Defined objects with tensor properties

A,B,γμ,σμ,μ,gμ,ν,εα,β,μ,ν

(30)

Compare the difference between `*` and `.`

g_α,μAμ

Aμg_αμαμ

(31)

g_α,μ·Aμ

Aα

(32)

So is g_[alpha, mu] . A[mu] equivalent to Simplify(g_[alpha, mu] * A[mu], indices). This functionality is particularly useful when handling larger expressions where you want contraction to be simplified only in some places. Consider the following product

g_α,μAμg_α,νBν

AμBνg_αμαμgα,να,ν

(33)

You can always Simplify the whole product, as in

Simplify,indices

AνBνν

(34)

Using Physics[`.`], however, you can achieve either the same, or any more selective simplification. Replacing the first `*` by `.`,

g_α,μ·Aμg_α,νBν

AαBνgα,να,ν

(35)

Likely (note the parenthesis to indicate the desired order of precedence between `.` and `*`)

g_α,μAμg_α,ν·Bν

BαAμgα,μα,μ

(36)

and replacing `*` and `.` in the middle of the expression,

g_α,μAμ·g_α,νBν

AνBνν

(37)

When one of the sides of `.` is a nested expression, the simplification of contracted indices is performed recursively, compare for instance

g_α,μAμ+Bμ

Aμ+Bμg_αμαμ

(38)

g_α,μ·Aμ+Bμ

Aα+Bα

(39)

Set the spacetime metric to be the Schwarzschild metric and consider the contraction of all the indices of the Riemann tensor

g_sc

_______________________________________________________

Systems of spacetime coordinates are:X=r,θ,φ,t

Default differentiation variables for d_, D_ and dAlembertian are:X=r,θ,φ,t

Setting lowercaselatin_is letters to represent space indices

The Schwarzschild metric in coordinates r,θ,φ,t

Parameters: m

Signature: - - - +

_______________________________________________________

g_μ,ν=r2mr0000r20000r2sinθ20000r2mr

(40)

Riemannα,β,μ,νRiemannα,β,μ,ν

Rα,β,μ,νRα,β,μ,να,β,μ,ν

(41)

Riemannα,β,μ,ν·Riemannα,β,μ,ν

48m2r6

(42)

See Also

`*`, Bra, Bracket, Define, g_, Ket, lprint, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics[Vectors], Riemann, Setup, Simplify, VectorCalculus

References

  

Cohen-Tannoudji, C.; Diu, B.; and Laloe, F. Quantum Mechanics. Chapter II. Paris, France: Hermann, 1977.