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

Online Help

All Products    Maple    MapleSim


Physics[`*`] - generalized product that operates like a commutative, anticommutative, or noncommutative product depending on the parity of its operands

Physics[`^`] - generalized exponentiation

Calling Sequence

a * b * c ...

a ^ b ...

Parameters

a, b, c, ...

-

arbitrary algebraic expressions that typically enter products

Description

• 

When the Physics package is loaded, a more general product operator, represented by the same symbol *, is loaded. Unlike the default Maple * operator (herein called the commutative product operator), the * operator loaded with Physics does not assume commutativity of its operands and instead automatically operates like a commutative, anticommutative, or noncommutative product, depending on the corresponding commutation properties of its operands.

• 

Similarly, a generalized exponentiation operator, ^, is loaded, that takes into account possible assumptions equal to 0, 1 and -1 on a and b, and handles among other things matrices, the Physics Bra and Ket commands transforming integer powers into products, the Physics Inverse command (equivalent to b = -1), and returns using the standard :-`^` operator only when a and b are of type commutative, avoiding in this way what would otherwise be incorrect commutative products of noncommutative mathematical variables/expressions.

• 

When computing with quantum-state vectors in Dirac notation, the Physics * operator also represents the tensor product of Bras and Kets, such as in &verbar;A>*<B&verbar; (a quantum operator) or &verbar;A>*&verbar;B> (a Ket of the tensor product of spaces).

• 

To expand Physics[`*`] products over sums, use expand or Physics[Expand]; to represent their inverses, use Physics/Inverse. Additionally, the rules for differentiating these products with respect to commutative or anticommutative differentiation variables, as well as the function application of a product construction, a*bxax*bx, are all implemented, completing the computational representation of this generalized product operation.

• 

To set the identifiers for noncommutative and anticommutative variables in the context of the Physics package, see Setup. Also, when using the Standard graphical user interface, you can set the mathematical display so that commutative, anticommutative, and noncommutative objects are displayed in different colors, which can also be customized. To set the display to mathematical notation, enter the command Setup(mathematicalnotation = true). See Setup for details.

• 

In order to make zero recognition possible in the not commutative case, basic simplifications, unnesting, and sorting of arguments of these products are automatically performed. So the output of a*b will be equal to the output of b*a when a and/or b are commutative objects, and it will be equal to the output of b*a when a and b are anticommutative objects. If a and b are noncommutative, then for both a*b and b*a, the respective outputs are just the products as entered. The form automatically returned is * itself, built as follows:

1. 

The sequence of operands of * is split into two sequences: s1 and s2, containing the commutative and not commutative (anticommutative and noncommutative) operands, respectively.

2. 

The elements of s1 are sorted by using machine ordering (table(symmetric)), resulting in sorted_s1.

3. 

Each subsequence of anticommutative elements of s2 is sorted using machine ordering (table(antisymmetric)), resulting in sorted_s2.

4. 

Both sorted_s1 and sorted_s2 are normalized by using normal.

5. 

A result is built and returned as the normalized form of sorted_s1 times sorted_s2.

• 

To simplify these products of noncommutative objects (such as quantum operators), taking into account that some of them may commute between themselves or satisfy commutation rules previously set, use the Physics/Simplify command.

• 

In connection with applying a product to some arguments, as for instance in a*bxax*bx, to have any of ax or bx returned just as a or b, declare them first as parameters by using the Parameters command. To have only the quantum operators (a, b, or both) applied to x, use the `.` operator of the Physics package, as ina*b.x.

• 

After loading Physics, the original commutative product operator can still be invoked as the function :-`*`, as in :-ab. However, note that it would be wrong to use :-`*`... product constructions involving noncommutative or anticommutative operands.

• 

Remark: to compute the scalar product between Bras, Kets, and quantum operators defined as such by using the Setup command or returned by the Annihilation and Creation commands, use the `.` operator in the Physics package, not the * generalized multiplication operator described in this page.

Examples

withPhysics&colon;

Setupmathematicalnotation=true

mathematicalnotation=true

(1)

First, set some identifiers to work with anticommutative and noncommutative variables.

Setupanticommutativeprefix=Q&comma;θ&comma;noncommutativeprefix=Z

anticommutativeprefix=Q&comma;θ&comma;noncommutativeprefix=Z

(2)

So below, a,b,c, and fθ are commutative, the latter contains the anticommutative object θ, Q1 and Q2 are of anticommutative type, and Z1 is noncommutative. Use delay evaluation quotes to see the product before and after it is normalized.

afθbQ1cQ3Q2

afθbQ1cQ3Q2

(3)

abcfθQ1Q2Q3

(4)

Note that instead of using delay evaluation quotes as in the example above, you can also use the inert form of the product function, %*, to represent this product and then "perform the product" when you prefer using the value command: the differentiation and expansion rules for %* are the same as those for *.

`%*`a&comma;f&theta;&comma;b&comma;Q1&comma;c&comma;Q3&comma;Q2

afθbQ1cQ3Q2

(5)

value

abcfθQ1Q2Q3

(6)

The next example in a nested expression containing commutative, anticommutative, and noncommutative products and a sum. Due to the prefixes chosen, objects beginning with Q and followed by an integer are anticommutative, and those beginning with Z are noncommutative. In this example, the  symbol appears six times, nested in various ways (note the delay evaluation quotes):

ahθbQ1Z1Q2Q4Z3Q5cQ3Q6fθ

ahθbQ1Z1Q2Q4Z3Q5cQ3Q6fθ

(7)

A canonical representation for this product with the commutative, anticommutative, and noncommutative operands, sorted according to the itemization in the Description:

abcfθhθQ1Q2Q4Q5Q3Q6Z1Z3

(8)

The Commutator between two noncommutative objects, Z1 and Z2:

zzCommutatorZ1&comma;Z2

zzZ1,Z2

(9)

expandzz

Z1Z2Z2Z1

(10)

The above is the difference between two * products. Applying this difference to an argument distributes the application across the operands of the * products.

x

Z1xZ2xZ2xZ1x

(11)

zzx

Z1x,Z2x

(12)

To have, for example, Z1 not applied to x when applying the product zz as above, use the Parameters command.

ParametersZ1

Z1

(13)

zzx

Z1,Z2x

(14)

expandzz

Z1Z2Z2Z1

(15)

x

Z1Z2xZ2xZ1

(16)

Set the Commutator between two quantum operators A and B to zero, so that A and B are noncommutative objects that commute between themselves.

Setupmop=A&comma;B&comma;%CommutatorA&comma;B=0

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

_______________________________________________________

algebrarules=A,B=0&comma;quantumoperators=A&comma;B

(17)

Their product is not automatically normalized when taking the algebra rules set.

A canonical form would be AB.

AB

AB

(18)

BA

AB

(19)

You can normalize these products by using Simplify directly, which applies various simplifications. Alternatively, in order to avoid further simplifications, use the algebrarules restricting option, which applies only the algebra rules set.

Simplify&comma;algebrarules

AB

(20)

See Also

`.`, Annihilation, Bra, Creation, diff, evalapply, Inverse, Ket, Parameters, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Setup, Simplify, SortProducts, types: commutative, anticommutative and noncommutative