Physics[`*`] - generalized product that operates like a commutative, anticommutative, or noncommutative product depending on the parity of its operands
Physics[`^`] - generalized exponentiation
a * b * c ...
a ^ b ...
a, b, c, ...
arbitrary algebraic expressions that typically enter products
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 |A>*<B| (a quantum operator) or |A>*|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*bx→a⁡x*b⁡x, 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:
The sequence of operands of * is split into two sequences: s1 and s2, containing the commutative and not commutative (anticommutative and noncommutative) operands, respectively.
The elements of s1 are sorted by using machine ordering (table(symmetric)), resulting in sorted_s1.
Each subsequence of anticommutative elements of s2 is sorted using machine ordering (table(antisymmetric)), resulting in sorted_s2.
Both sorted_s1 and sorted_s2 are normalized by using normal.
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*bx→a⁡x*b⁡x, to have any of a⁡x or b⁡x 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 :-a⁢b. 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.
First, set some identifiers to work with anticommutative and noncommutative variables.
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.
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 *.
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):
A canonical representation for this product with the commutative, anticommutative, and noncommutative operands, sorted according to the itemization in the Description:
The Commutator between two noncommutative objects, Z1 and Z2:
The above is the difference between two * products. Applying this difference to an argument distributes the application across the operands of the * products.
To have, for example, Z1 not applied to x when applying the product zz as above, use the Parameters command.
Set the Commutator between two quantum operators A and B to zero, so that A and B are noncommutative objects that commute between themselves.
* Partial match of 'mop' against keyword 'quantumoperators'
Their product is not automatically normalized when taking the algebra rules set.
A canonical form would be A⁢B.
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.
`.`, 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
Download Help Document
What kind of issue would you like to report? (Optional)