Physics[Setup] - set and query the computational environment for the Physics package commands
Calling Sequence
Setup( )
Setup(parameter)
Setup(parameter = value, other_options)
Parameters
parameter
-
(optional) name (can be the keyword query); query the value of the specified parameter
parameter = value
(optional) equation of the form name = value; set the value of one or many of the parameters of the computational environment
other_options
(optional) any of the keywords: advanced, additionally, clear, conventions, default, keywords, query, quiet, redo, readsetup, savesetup, deletesavedsetup
Description
The Setup command is used to set, clear and query the computational environment used by the commands of the Physics package. To avoid having to remember the relatively large number of parameters that can be set, if you type the parameter misspelled, or just a portion of it, a matching against the existing parameters is performed, and when there is only one match, the input is automatically corrected. For example, to see the list of settable parameters, enter Setup(keywords), or simply pass a portion of the word keywords, such as Setup(k).
Alternatively, you can launch the graphical interface of the package, a setup applet, and set the values of these parameters directly from it. For this purpose, call Setup with no arguments, as in Setup(), and after closing the applet the entire setup will be returned on the screen as a list of equations with the keywords on the left-hand side and their values on the right-hand side.
When called with the argument conventions, Setup displays a brief summary of the computational conventions used by the Physics and Physics[Vectors] packages.
A summary of the parameters that can be set, the corresponding values when Physics is loaded, and the expected types of new values when you set them by using Setup are as follows:
Parameter
Value
Expected type of new value
abbreviations
= true
truefalse
algebrarules
= none
set((Anti)Commutator = algebraic)
anticommutativeprefix
Or(symbol, set(symbol))
assumingusesAssume
automaticsimplification
= false
bracketbasis
name
bracketrules
set(Bracket(Bra, Ket) = algebraic)
combinepowersofsamebase
coordinatesystems
Or(symbol, set(symbol)) # Capital letters only
cosmologicalconstant
= 0
algebraic
Dgammarepresentation
= standard
identical(standard, chiral, Majorana)
differentialoperators
[name, list(name)]
differentiationvariables
symbol # Capital letter
dimension
= 4
And(posint, satisfies(d -> d > 1))
disjointedspaces
Or(set(symbol), set(set(symbol), set(symbol), ...))
genericindices
same as spacetimeindices
geometricdifferentiation
hermitianoperators
Or(name, set(name))
hideketlabel
hilbertspaces
same as disjointedspaces
levicivita
= galilean
identical(galilean, nongalilean)
lapseandshift
Or(identical(standard, arbitrary), [algebraic, [algebraic, algebraic, algebraic]])
masslessfields
Or(name, set(name)
mathematicalnotation
metric
= Minkowski
<keyword, line_element, Matrix, set(nonzero components)>
noncommutativeprefix
Or(name={algebraic, range}, set(name={algebraic, range}))
normusesconjugate
quantumbasisdimension
quantumcontinuousbasis
quantumdiscretebasis
quantumoperators
realobjects
set(Or(name, function))
redefinesum
signature
= `-`
identical(`+`, `-`, `+++-`, `-+++`, `---+`, `+---`)
spacetimeindices
= greek
identical(greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, uppercaselatin)
spaceindices
spinorindices
su2indices
su2matrixindices
su3indices
su3matrixindices
tensorsimplifier
= Physics:-TensorSimplifier
Or(procedure, algebraic)
tetrad
<keyword, Matrix, set(nonzero components)>
tetradindices
tetradmetric
traceonlymatrices
unitaryoperators
usecoordinatesastensorindices
usephysicsevaluator
usewirtingerderivatives
vectorpostfix
symbol
Note: When the Vectors subpackage is loaded, or any of its commands is called by their long forms, the vectorpostfix is automatically set to the underscore _, and geometricdifferentiation is set to true.
Mathematical notation: In the standard GUI, with Typesetting level set to Extended (default), anticommutative and noncommutative variables are displayed in different colors, mathematical functions are displayed in textbook notation, if Physics[Vectors] is loaded, non-projected vectors and unit vectors are displayed with an arrow and a hat on top, respectively, the vectorial differential operators (Nabla, Curl, etc.) with an upside down triangle, and more. The notational aspects related to the Physics package can be changed to some point; the corresponding starting and expected values are:
Expected type (for details see below)
anticommutativecolor
= purple
identical(none, symbol) # one of 16 colors
noncommutativecolor
= olive
unitvectordisplay
= hat
identical(none, hat)
vectordisplay
= arrow
identical(none, arrow, bold, halfarrow)
To set the values of these parameters (could be many at the same time), call the Setup command with equations having the parameter keywords on the left-hand side, and their value on the right-hand side. The output of Setup is a list of equations of the same kind, echoing the values set.
When setting values, some explanatory messages are frequently displayed on the screen. To avoid that verbosity (will not avoid the list output), use the optional argument quiet.
To query the current value of any of these parameters, enter Setup(parameter) or Setup(query, parameter), where parameter is one of the keywords in the first column above. Entering Setup(query) returns the current values for all of the parameters.
To clear the value of one or many of these parameters, pass the keyword clear together with the parameter(s) that you want to clear; the value is set to none.
For most parameters, when setting their values, their previous settings are not discarded. For example, when you set some symbols to represent quantum operators, the previous quantum operators remain set as such. When you want to set the value of a parameter and discard the previous setting, use the optional argument redo.
When setting a parameter automatically discards the previous setting, but you want to preserve that setting, use the optional argument additionally.
Saving and loading an advanced or the default setup
You can also load an advanced setup (available but not loaded automatically when you load Physics) and save the setup existing at any moment, so that the next time Physics is loaded, it automatically loads with the saved setup. For these purposes, call Setup with the optional argument advanced or savesetup, respectively. To restore the starting setup, enter Setup(default). These are the values loaded with the advanced setup:
Advanced value
= {Pi,Pj_ = 0,
Ri,Rj_ = 0,
Ri,Pj_ = I⁢Kroneckerdeltai,j}
= {theta, Q}
= Bracket⁡R,P=2⁢ⅇI⁢R·P4⁢π32
= {X}
= [X]
= uppercaselatin
= {R, P}
= {Z}
= {u}
= lowercaselatin
= _
The parameters of the computational environment
A description of the parameters and the setting action associated with each of them is as follows.
true or false.
The default for this option is true, and so the abbreviations kd_ for KroneckerDelta and ep_ for LeviCivita are set when you load the package. Therefore, kd_ and KroneckerDelta can be used to perform the same operation. When abbreviations is set to false, these two abbreviations are unset. Alternatively, for these two or other Maple commands, you can set a macro to achieve the same results.
An equation with a Commutator or AntiCommutator on the left-hand side and an algebraic expression representing the result for that operation on the right-hand side; or a set, list or Matrix of them.
The operands in the (Anti)Commutator on the left-hand side of the equations are expected to be names, functions, or indexed functions, in which case the indices and functionality will be taken as parameters of the operation and expected to appear when arguments are passed to perform the operation (see examples of this in Commutator). These are used by Commutator and AntiCommutator to return results accordingly.
Tip: When setting algebra rules, use the inert forms %Commutator and %AntiCommutator instead of the active forms Commutator, AntiCommutator; this may help to prevent a premature evaluation of the Commutator or AntiCommutator.
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, or yellow.
When mathematicalnotation is set to true, the anticommutativecolor setting causes the Maple Standard GUI to display anticommutative variables in the selected color.
Any valid sequence of characters.
Sets the prefix of characters entering the symbols representing anticommutative variables; that is, variables θ1 and θ2 for which θ1 θ2 = −θ2 θ1. A
Note: In the context of the Physics package, the multiplication operator, * is commutative, anticommutative, or noncommutative, depending on the corresponding commutation properties of its operands (see type/commutative). Also, as soon as you set anticommutative variables in this way, you may want to solve differential equations with them (i.e. including derivative with respect to anticommutative variables), so that anticommutative integration constants will appear in the output, expressed using _lambda1,_lambda2,.... See the last examples in dsolve,details.
The default for this option is true, so that, when Physics is loaded, the Maple assuming command uses Physics:-Assume to place temporary assumptions. This makes the assuming command fully compatible with the Physics, DifferentialGeometry, DifferentialAlgebra and VectorCalculus packages. It is recommended to not change this setting. If assumingusesAssume is set to false, temporary assumptions placed by assuming are placed using the assume command, which redefines the variables receiving assumptions, so that, depending on the computation, the commands of these packages mentioned will fail in recognizing them within expressions (for example: when placing assumptions on the coordinates and computing with the spacetime metric).
The default for this option is false, and when set to true the output corresponding to every single input (not just related to Physics) gets automatically simplified in size before being returned to the screen. This is convenient for interactive work in most situations.
A name A.
A represents a space of quantum states, and the corresponding vectors (labeled with the same name) will be used when calling the Bracket command with a single argument. For example, Bracket⁡H will be computed as Bracket⁡A,H,A=A|H|A.
An equation with a Bracket on the left-hand side and an algebraic expression representing the result for that bracket (scalar product) on the right-hand side.
The bracket can be of the form A|B or A|H|B for some Bra and Ket A and B, and the quantum operator H should have all the quantum numbers of A and B represented by symbols. The right-hand side is an algebraic expression depending on these symbols (see examples in Bracket). It is also possible to pass a set of bracket rules at once, as a set (by enclosing them between { }), as in bracketrules={...}. As a shortcut, it is valid to pass the right-hand side directly, without using an equation with the keyword bracketrules. These bracket rules are saved internally as procedures having the quantum numbers as parameters, and are used by Bracket when computing brackets.
Tip: when setting bracket rules, use the inert form %Bracket instead of the active form Bracket; this may help to prevent a premature evaluation of the bracket.
The default for this option is false. When set to true, combination of powers of the same base (in products of powers or of exponentials) happens automatically, including taking care of the cases where the exponents or the base are not commutative (for example, using Glauber's formula to combine exponentials).
Any of the keywords cartesian, cylindrical or spherical, or a capital letter, or a set of them.
Aliases are set by using the alias command so that the capital letter represents the sequence of associated coordinates, such as the lowercase letters postfixed with a positive integer ranging from 1 to the dimension. For example, coordinatesystems = X sets the alias X=x1,x2,x3,x4, and sets x0=x4. See also Coordinates
0 or any algebraic expression.
The default value for the cosmological constant is 0, so that the Einstein and EnergyMomentum tensors are proportional. You can set the value of this constant to any valid algebraic expression, in which case the relationship defining those two tensors includes an additional term with this constant as usual - try for instance entering Einstein[definition] or EnergyMomentum[definition].
standard, chiral, or Majorana.
Sets the representation to be used for the Dirac matrices.
Note: The representation depends on the dimension of spacetime, and for a dimension lower than 4, only the standard representation is implemented.
A list with two operands: the name of the differentialoperator and a list with the related differentiation variables, or a set or list of those two-element lists.
Sets names to be considered differential operators, i.e. operators that do not commute with the differentiation variables indicated in the second list. In this way you can use them within products entering algebraic expressions, and have them applied only to the objects appearing to their right in products by using Library:-ApplyProductsOfDifferentialOperators.
A capital letter, or a list of differentiation variables.
Sets the default differentiation variables for the d_, D_ and d'Alembertian differentiation commands. These variables are automatically set when you define the first system of coordinates. If the setting for differentiationvariables is cleared (options clear, differentiationvariables), you can still use these three differentiation commands, provided you explicitly indicate the differentiation variables as a second argument.
A positive integer greater than 1.
Sets the dimension of the spacetime manifold. When this parameter is set, all of the definitions sensitive to the dimension are reset, such as aliases set by Coordinates, the representation for the Dirac matrices, and all tensor definitions introduced by Define. The behavior of the spacetime manifold depends also on the signature, which is another of the parameters that can be set (see below). As a shortcut, you can specify both the dimension and signature in one equation, with a list on the right-hand side, as in dimension=d,s, where d is the dimension and s is one of `+`, `-`, representing the signature, associated with a Euclidean or Minkowski spacetime, respectively. For example, the default value when you load the Physics package is dimension=4,`-`, representing a 3 + 1 Minkowski spacetime with signature (-,-,-,+).
Remark: the conventions for the dimension only affect the results of computations with objects defined by you using Define or known because they were defined automatically when Physics was loaded.
disjointedspaces, synonym: hilbertspaces
A set of Ket labels that act on one and the same Hilbert space, or a set of sets of them.
By default, all quantum operators, set as such using the keyword quantumoperators, act on the same Hilbert space, for example, position and momentum. The disjointedspaces is used to indicate sets of operators that act on disjointed Hilbert spaces. Operators acting on disjointed spaces automatically commute between themselves, and their respective basis of eigenkets can be used to construct tensor products of states. For example, hilbertspaces = {{A}, {B}} indicates that the operator A acts on one Hilbert space while B acts on another one. The Hilbert spaces thus have no particular name (as in 1, 2, 3 ...) and are instead identified by the operators that act on it. There can be one or more Hilbert spaces, and operators acting on one space can act on other spaces too, for instance as in hilbertspaces = {{A, C}, {B, C}}.
greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, or uppercaselatin.
Sets the identifier for gauge indices in that every index found in a tensor object defined by the Define command that has the genericindices prefix as a root and is followed by a positive integer will be interpreted as a gauge index.
The default for this option is false, and this value is automatically changed to true when the Vectors subpackage of Physics is loaded. When geometricdifferentiation is set to true, both the Physics[diff] and Physics[Vectors][diff] commands differentiate expressions taking into account the geometrical relations between curvilinear unit vectors and coordinates of different types. Note that when Physics and Physics[Vectors] are both loaded, Physics[diff] and Physics[Vectors][diff] are the same command.
A name, or a set of them.
Indicates that these names represent linear hermitian quantum operators, that is, they satisfy U=Dagger⁡U. This information is taken into account when computing, for example, the Dagger of the operator. When an operator is set to be Hermitian, it is also automatically set to be a noncommutative quantum operator (see quantumoperators below).
The default for this option is false. When passing hideketlabel = true, the labels of Bras and Kets are automatically suppressed when displaying them. Note that the labels are not removed, only suppressed in the display. Even when this option is set to true, you can see the Ket labels of an expression by entering show (see the Examples section), which works the same way as it does in the context of CompactDisplay.
standard, arbitrary, or a list of two operands: first an algebraic expression or value representing the Lapse, then a list with three algebraic expressions representing the 3 contravariant spatial components of the Shift.
The lapseandshift value determines the values of the components of all the ThreePlusOne tensors (e.g. ExtrinsicCurvature) and so of tensorial expressions involving them (e.g. the ADMEquations). Those components are always computed first in terms of the Lapse and Shift and the space part gi,j of the 4D metric, then in a second step, if lapseandshift = standard, the Lapse and the Shift are replaced by their expressions in terms of the g0,μ part of the 4D metric, according to α2=−g0,0-1 and βj=g0,j, or if lapseandshift is passed as a list, in terms of the values indicated in that list (these values are not used to set the g0,μ part of the 4D metric). When lapseandshift = arbitrary, the second step is not performed and the Lapse and Shift evaluate to themselves, representing an arbitrary value for them. In the three cases, standard, arbitrary, or a list of values, the components of the ThreePlusOne tensors are computed in terms of a metric with line element ds2=−α2⁢dt2+γi,j⁡dxi+β⁢i⁢i⁢dt⁡dxj+β⁢j⁢j⁢dt, where α and βi have the Lapse and Shift values mentioned, and γi,j=gi,j is the ThreePlusOne:-gamma3_ metric of the 3D hypersurface. This design permits working with any 4D metric set and, without changing its value, experimenting with different values of the Lapse and Shift (different values of g0,μ) for the 3+1 decomposition of Einstein's equations. See also LapseAndShiftConditions.
galilean or nongalilean
Indicates that the LeviCivita (pseudo)tensor represents either the galilean totally antisymmetric symbol ε, whose components are all equal to 0, 1 or -1, or its generalization to curvilinear coordinates Ε (see definition in LeviCivita).
Any name or a set of them.
Sets the fields that are massless. This information is used by the FeynmanDiagrams command when computing the propagators of vector fields entering Feynman integrals in momentum representation. For examples see FeynmanDiagrams.
Provides a noticeable improvement in the display of expressions by using traditional mathematical notation for Physics objects. For example, vectors are displayed with an arrow on top, the vectorial differential operators (such as Nabla and Laplacian) are displayed with an upside down triangle, anti and noncommutative variables, and so all the quantum operators, are displayed in different colors, mathematical functions are displayed using textbook notation, and more. The same enhancement in the display can be obtained by using the Options dialog (go to Tools -> Options, select the Display tab, and set the Typesetting level dropdown to Extended; see also interface). To change this mathematical notation to your preferred one, see anticommutativecolor, noncommutativecolor and vectordisplay.
Indicates the spacetime metric; instead of the word metric the left-hand side can also be the metric tensor itself, as in g_[mu, nu]. The right-hand side can be a keyword, for instance any of arbitrary, Euclidean, Minkowski, Schwarzschild, Tolman or related to any of the metrics of the book on "Exact Solutions of Einstein's Field Equations" - see references at the end. To indicate a metric of the book, pass a list with three numbers, identifying the chapter, equation number and the case as found in the book, for example as in metric = [12, 12, 1].
Note: a search on the database of solutions to Einstein's equation can be launched by passing also an incomplete keyword or misspelled, so that a searchtext is performed among the keywords and comments in the database and if a match is found the metric is set accordingly, or if many matches are found then corresponding information is displayed on the screen. This same search can be launched directly from the g_ command, see g_ for examples.
The right-hand side in metric = ... or g[mu, nu] = ... can also be a line element, quadratic in the differentials of the coordinates (you need to set the Coordinates first), passed using either of d_ or %d_, e.g. as in d_(x), d_(y), or by concatenating d with the coordinate, e.g. as in dx, dy, ...
Finally, the right-hand side in metric = ... can also be a 2 x 2 symmetric Matrix, in which case Setup extracts from it the nonzero elements using ArrayElems and sets the metric with that information; or it can also be the set returned by ArrayElems itself.
When mathematicalnotation is set to true, the noncommutativecolor setting causes the Maple Standard GUI to display noncommutative variables in the selected color.
Any valid sequence of characters; the same as anticommutativeprefix.
Sets the identifier for noncommutative variables, that is, variables that are neither commutative nor anticommutative.
The default for this option is false so that the Vectors[Norm] command computes the Euclidean norm of a vector, say A, that is A · A. If, however, A is not commutative, or the value for normusesconjugate is set to true, then Vectors[Norm] computes the norm on complex space, as A · A&conjugate0;.
An equation with a Ket-label on the left-hand side and a positive integer, an algebraic expression representing it, or a range (of the form a..b where a and b can also be half-integers) on the right-hand side; or a set of such equations.
It is valid to state different dimensions for different quantum numbers of Kets of a single basis. For that purpose, if the label of the basis is A, you can set the dimension of each quantum number entering quantumbasisdimension=A1=N,A2=M, where N and M are positive integers, algebraic expressions representing them, or ranges of the form a..b. This dimension of a quantum basis is used to construct projectors when you call the Projector command.
Bras and Kets labeled with this name will be considered state vectors of a continuous space of quantum states. This information is taken into account when computing Brackets and Projectors.
A name, or a set of them; equivalent to quantumcontinuousbasis.
Indicates that Bras and Kets labeled with the given names belong to a discrete space of quantum states. However, unlike the quantumcontinuousbasis case, when the label (first argument) in a Bra or a Ket has not been set to represent a continuous or discrete space of states, it is assumed that it represents a discrete space.
Indicates that these names represent linear quantum operators. This information is taken into account when computing Brackets and scalar products between these quantum operators and Bras or Kets.
A name or a function, or set of them.
To set and unset (when used together with the keyword clear) mathematical variables and functions as real, so that the is command, and through it the rest of the Maple library, take this property into account. The same, as well as more elaborated assumptions, can be placed directly with the Assume command.
The default for this option is false. When set to true, the sum command is automatically redefined so that: a) it can perform multi-index summation (see the Add command of Physics Library), and b) it has not premature evaluation problems.
Any of `+`, `-`, or `---+`, `+---`, `+++-`, `-+++`,
This parameter is associated with the signature of spacetime, that is, it indicates the positive and negative values of the elements of the metric after reduction to a diagonal form at a given point. The four possible values `---+`, `+---`, `+++-`, `-+++`, represent the most frequently used settings for a Minkowski spacetime. The value `+` indicates an Euclidean spacetime and is equivalent to using ++++. The value `-` is a shortcut to indicate a Minkowski spacetime with signature `---+`, the default value of signature when Physics is loaded. These conventions apply as well to a spacetime of dimension different than 4. For example in a 2+1 spacetime, you can use for instance `++-`, etc. See dimension above for details.
greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, or uppercaselatin; the same as genericindices.
Sets the identifier for spacetime indices in that every index found in a tensor object defined by the Define command that has the spacetimeindices prefix as a root and is followed by a positive integer will be interpreted as a spacetime index.
The same values as spacetimeindices.
Sets the identifier for space indices.
Sets the identifier for spinor indices.
Sets the identifier for SU2 indices, that run from 1 to 3, the dimension of the SU2 group.
Sets the identifier for SU2 matrix indices, that run from 1 to 2, the dimension of the 2x2 matrices of the SU2 group in the fundamental representation.
Sets the identifier for SU3 indices, that run from 1 to 8, the dimension of the SU3 group.
Sets the identifier for SU3 matrix indices, that run from 1 to 3, the dimension of the 3x3 matrices of the SU3 group in the fundamental representation.
Any procedure to be automatically applied when tensor components are computed (e.g. for the general relativity tensors)
The default tensor simplifier, automatically applied when computing the components of the predefined general relativity tensors, and also of any user-defined tensor, is Physics:-TensorSimplifier, a general simplifier with emphasis in handling radicals. Depending on the problem, however, other kinds of simplification may be more convenient. When the tensor components involve large algebraic expressions, for speed reasons, one may also prefer to only apply a (fast) normalization - for this purpose use tensorsimplifier = normal (see normal). One can also set tensorsimplifier = none in which case no simplification is applied but for some unavoidable zero recognitions performed in a few intermediate steps (e.g. when you set a spacetime metric, to verify that its determinant is different from zero). To restore the tensor simplifier to its default value use tensorsimplifier = default or Setup(redo, tensorsimplifier).
Indicates the tetrad (vierbein), relating spacetime tensor components to their components in a tetrad (local) system of references. Instead of the word tetrad the left-hand side can also be the tetrad tensor 𝔢__a,μ itself, as in e_[a, mu]. The right-hand side can be one of the keywords null (Newman-Penrose formalism), or orthonormal (related to a tetrad metric of Minkowski kind). For details, see e_.
The right-hand side in tetrad = ... or e_[mu, nu] = ... can also be a 2 x 2 symmetric Matrix, in which case Setup extracts from it the nonzero elements using ArrayElems and sets the tetrad with that information. Finally, the tetrad can be set directly by passing, on the right-hand side of tetrad = ... the set of elements returned by ArrayElems itself.
Sets the identifier for 2 tetrad indices.
Indicates the tetrad metric. Instead of the word tetradmetric the left-hand side can also be the tetradmetric tensor etaa,b itself, as in eta_[a, b]. The right-hand side can be one of the keywords null (Newman-Penrose formalism), or orthonormal (of Minkowski kind). For details, see eta_.
The right-hand side in tetradmetric = ... or eta_[mu, nu] = ... can also be a 2 x 2 symmetric Matrix, in which case Setup extracts from it the nonzero elements using ArrayElems and sets the tetradmetric with that information. Finally, the tetrad metric can be set directly by passing, on the right-hand side of tetradmetric = ... the set of elements returned by ArrayElems itself.
The default value for this option is true, so that Trace considers scalars everything but the algebraic representation for Dirac (Dgamma) and Pauli (Psigma) matrices as tensors of one index, or objects explicitly of type matrix or Matrix (Array). The Maple 16 behavior, where everything but constants were considered traceable objects can be restored with the new Setup option traceonlymatrices = false (its default value is true). This permits using Trace more naturally in the typical case, which is the computation of traces of expressions involving Dirac matrices where the coefficients are not just constants.
Indicates that these names represent unitary quantum operators, that is, they satisfy U⁢Dagger⁡U=1. This information is taken into account when simplifying products of operators using the Simplify command. When an operator is set to be unitary, it is also automatically set to be a noncommutative quantum operator (see quantumoperators).
The default for this option is false. When set to true, you can use the coordinates themselves as tensor indices (they will represent a number, i.e. their position in the list of coordinates of the coordinates system), approximating more the notation to what we do with paper and pencil changing this setting to false.
The default for this option is true, and so each pair of contracted tensor indices in a tensorial expression is automatically rewritten as one covariant and one contravariant. If you are handling tensorial expressions of thousands of terms and experience a slowdown in performance you can try changing this setting to false.
The default for this option is false. When set to true, the differentiation rule of the six complex components abs, argument, conjugate, Im, Re, and signum are redefined taking complex variables and their conjugates as independent and in equal footing.
none, arrow, bold, or halfarrow.
When mathematicalnotation is set to true, the vectordisplay setting causes the Maple Standard GUI to display non-projected vectors with an arrow or halfarrow on top, or in bold, as specified.
Sets the identifier for non-projected 3-D vectors of the Physics[Vectors] subpackage.
Examples
with(Physics):
Setup(mathematicalnotation = true);
mathematicalnotation=true
Query the computational setup that is loaded with the Physics package.
Setup(query);
Dgammarepresentation=standard,abbreviations=true,algebrarules=none,anticommutativecolor=purple,anticommutativeprefix=none,assumingusesAssume=false,automaticsimplification=false,bracketbasis=none,bracketrules=none,combinepowersofsamebase=false,coordinatesystems=none,cosmologicalconstant=0,differentialoperators=none,differentiationvariables=none,dimension=4,disjointedspaces=none,genericindices=none,geometricdifferentiation=false,hermitianoperators=none,hideketlabel=false,lapseandshift=standard,levicivita=galilean,masslessfields=none,mathematicalnotation=true,metric=1,1=−1,2,2=−1,3,3=−1,4,4=1,minimizetensorcomponents=false,noncommutativecolor=olive,noncommutativeprefix=none,normusesconjugate=false,primedvariables=true,quantumbasisdimension=none,quantumcontinuousbasis=none,quantumdiscretebasis=none,quantumoperators=none,realobjects=∅,redefinesum=false,signature=- - - +,spaceindices=none,spacetimeindices=greek,spinorindices=none,su2indices=none,su2matrixindices=none,su3indices=none,su3matrixindices=none,tensorproductnotation=true,tensorsimplifier=Physics:−TensorSimplifier,tetradindices=none,tetradmetric=orthonormal,traceonlymatrices=true,unitaryoperators=none,unitvectordisplay=hat,usecoordinatesastensorindices=false,usephysicsevaluator=true,usewirtingerderivatives=true,vectordisplay=arrow,vectorpostfix=none
Compute the Projector for a basis of state vectors that has not been set: it is assumed that the corresponding space is discrete.
Projector(Ket(A, n), dimension = 3);
∑n=02⁡An⁢An
Set a label for a continuous space of quantum states; note that you do not need to remember the exact keyword to be used, the matching mechanism will also attempt to match a part of a keyword (returning a list of options when there is more than one partial match).
Setup(continuous = R);
* Partial match of 'continuous' against keyword 'quantumcontinuousbasis'
_______________________________________________________
quantumcontinuousbasis=R
The corresponding projector is now a triple integral.
Projector(Ket(R, x, y, z));
∫−∞∞∫−∞∞∫−∞∞Rx,y,z⁢Rx,y,zⅆxⅆyⅆz
Note also the difference in behavior between computing the Bracket in state vectors of discrete and continuous spaces of states. Inert representations for these commands have % as a prefix, and the computation can then be performed by using the value command.
%Bracket(Bra(A,n), Ket(A,m));
An|Am
value((6));
δm,n
%Bracket(Bra(R, x, y, z), Ket(R, u, v, w));
Rx,y,z|Ru,v,w
value((8));
δ3⁡u−x,v−y,w−z
Let |R,x,y,z> and |P,px,py,pz> represent "position" and "momentum" state vectors; their scalar product is unknown to the system.
Bracket(Bra(R, x, y, z), Ket(P, p[x], p[y], p[z]));
Rx,y,z|Ppx,py,pz
Let their scalar product be the corresponding normalized plane wave (see references below).
(10) = 1/(2*Pi)^(3/2)*exp(I*(x*p[x] + y*p[y]+z*p[z]));
Rx,y,z|Ppx,py,pz=2⁢ⅇI⁢x⁢px+y⁢py+z⁢pz4⁢π32
To set the above as a rule when computing Brackets between the vectors R and P, use:
Setup((11));
Now this rule is used automatically.
%Bracket(Bra(R, a, b, c), Ket(P, d, e, f));
Ra,b,c|Pd,e,f
value((13));
2⁢ⅇI⁢a⁢d+b⁢e+f⁢c4⁢π32
Setup(continuousbasis = {P,R});
* Partial match of 'continuousbasis' against keyword 'quantumcontinuousbasis'
quantumcontinuousbasis=P,R
Projector(Ket(P, p[1], p[2], p[3]));
∫−∞∞∫−∞∞∫−∞∞Pp1,p2,p3⁢Pp1,p2,p3ⅆp1ⅆp2ⅆp3
Bra(R, x[1], x[2], x[3]) . (16);
(16) . Ket(R, x[1], x[2], x[3]);
In the result above, to compute P|R, the rule for R|P has been used, but you can also state the rule for P|R in addition to the rule for R|P, by using the keyword additionally or stating the two rules at the same time.
A rule can have the same Bra and Ket in its definition and be given using inert commands (same command name preceded by %).
%Bracket(%Bra(R, x0,y0,z0), H, %Ket(R, x1,y1,z1)) = E(x1-x0, y1-y0, z1-z0);
Rx0,y0,z0|H|Rx1,y1,z1=E⁡x1−x0,y1−y0,z1−z0
Setup((19));
%Bracket(Bra(R, 1,2,3), H, Ket(R, 4,5,6));
R1,2,3|H|R4,5,6
value((21));
E⁡3,3,3
Define two quantum operators and a commutator algebra for them.
Setup(quantumop = {R, P}, algebrarule = {%Commutator(R[j], P[k]) = I*KroneckerDelta[j, k]});
* Partial match of 'quantumop' against keyword 'quantumoperators'
* Partial match of 'algebrarule' against keyword 'algebrarules'
algebrarules=Rj,Pk−=I⁢δj,k,quantumoperators=P,R
Commutator(R[1], P[2]);
0
Commutator(R[2], P[2]);
I
Commutator(R[n], P[m]);
I⁢δm,n
To indicate that two operators, say F and G, operate on disjointed Hilbert spaces, that is, Hilbert spaces with no intersection whatsoever, you can use the keywords disjointedspaces or hilbertspaces which are synonyms. The operators acting on each Hilbert space are enclosed in a set, and there can be operators, say H, acting in more than one space. For example,
Setup(hilbertspaces = {{F, H}, {G, H}});
disjointedspaces=F,H,G,H
The eigenkets of operators acting on disjointed spaces can be used to form tensor products
Ket(F, 1)*Ket(G, 1);
F1⊗G1
The ordering of the Hilbert spaces in tensor products is preserved: Bras (Kets) of the first space always appear before Bras (Kets) of the second space. For example, construct a projector into the state above
(28) . Dagger((28));
F1⊗G1⊗F1⊗G1
For details on the design and implementation of tensor products see Tensor product of Quantum States using Dirac's Bra-Ket Notation. Because that ordering is preserved, one can now hide the label of Bras and Kets without ambiguity, as it is usual in textbooks (e.g. in Quantum Information). For that purpose use the keyword option hideketlabel
Setup(hideketlabel = true);
hideketlabel=true
The display for the projector above is now
(29);
1⊗1⊗1⊗1
Important: this option only hides the label at the time of displaying a Bra or a Ket. That label, however, is still there, both in the input and in the output. One can see what is behind this compact display using show, which works the same way as it does in the context of CompactDisplay. The actual contents being displayed in the above is thus
show;
Clear the setting of F,G and H as quantum operators, to allow for reusing these letters with a different meaning.
Setup(clear, op = {F, G, H});
* Partial match of 'op' against keyword 'quantumoperators'
quantumoperators=P,R
In the output of Setup(query), at the beginning, notice that there is no anticommutative prefix set. To work with anticommutative variables, set the prefix to be used to distinguish them; for example, set it to be theta.
Setup(anticommutativeprefix = theta);
anticommutativeprefix=θ
Now theta alone, followed by a positive integer, or indexed as in θn where n is any valid maple object, is interpreted as an anticommutative variable.
theta[1];
θ1
(35)^2;
After loading the Physics package, you can use delay evaluation quotes to prevent the normalization of powers or products. Then simply execute the output again to evaluate.
'theta1 * theta2 + theta2 * theta1';
θ1⁢θ2+θ2⁢θ1
(37);
The second mixed derivatives with respect to different anticommutative variables anticommute (note the use of %diff, which could be Diff, the inert representations for diff, turned active by using value).
%diff(f(theta1, theta2), theta1, theta2) + %diff(f(theta1, theta2), theta2, theta1);
∂2∂θ1∂θ2f⁡θ1,θ2+∂2∂θ2∂θ1f⁡θ1,θ2
value((39));
Load the Physics[Vectors] package.
with(Physics[Vectors]);
&x,`+`,`.`,Assume,ChangeBasis,ChangeCoordinates,CompactDisplay,Component,Curl,DirectionalDiff,Divergence,Gradient,Identify,Laplacian,∇,Norm,ParametrizeCurve,ParametrizeSurface,ParametrizeVolume,Setup,Simplify,`^`,diff,int
By default, the vectorpostfix identifier for non-projected 3-D vectors is _. So, after loading the Physics:-Vectors package any symbol ending with the underscore _ is interpreted as a non-projected vector.
A_;
A→
type(A_, PhysicsVectors);
true
A_ . (B_ &x A_);
Changing the vectorpostfix; the matching mechanism is used to avoid typing the entire keyword.
Setup(torp = v);
* Partial match of 'torp' against keyword 'vectorpostfix'
vectorpostfix=v
Now, neither A_ nor B_ are vectors, and Av and Bv are non-projected vectors.
Error, (in Physics:-Vectors:-&x) expected a vector as first argument, received: B_
Av . (Bv &x Av);
The Dirac matrices are implemented as all the other tensors of the Physics package, so that its components can be seen using the shortcut notation
Dgamma[];
γμ=
By default, when you load Physics the representation used for the Dirac matrices is the standard one
Setup(dg);
* Partial match of 'dg' against keyword 'Dgammarepresentation'
Dgammarepresentation=standard
To see the components of each of Dirac's matrices the simplest way is
Dgamma[1, matrix];
γ1=
Set the Majorana representation for them
Setup(mm = Majorana);
* Partial match of 'mm' against keyword 'Dgammarepresentation'
Defined Dirac gamma matrices 'Dgamma' in Majorana representation γ1,γ2,γ3,γ4
__________________________________________________
Dgammarepresentation=Majorana
In the Majorana representation implemented in Maple, all of the components of these matrices are purely imaginary.
Set a working 3-D Euclidean space. The following command is equivalent to Setup(dimension = 3, signature = `+`).
Setup(dimension = [3, `+`]);
Warning, the representation 'Majorana ' for the Dirac matrices is not implemented for a spacetime dimension <> 4; removing it
Changing the signature of the tensor spacetime to: + + +
The dimension and signature of the tensor space are set to 3,⁢⁡+ + +
dimension=3,signature=+ + +
Now define A as an object having tensor properties; in addition, specify that A has only one index.
Define(A[mu]);
Defined objects with tensor properties
Aμ,γμ,σμ,∂μ,gμ,ν,εα,μ,ν
Differentiate Aμ with respect to Aν.
diff(A[mu], A[~nu]);
gμ,ν
Because the dimension is equal to 3, this evaluates to:
eval((54), nu=mu);
3
or directly differentiate with respect to Aμ, so that:
diff(A[mu], A[mu]);
What is known about A?
Define(A, query);
Tensor structured as name,indices,variables :
A,1,0,0,0
When changing the dimension in the middle of the session, the previous definitions set by Define are erased.
Setup(dim = [2, `+`], Dgammarepresentation = standard);
* Partial match of 'dim' against keyword 'dimension'
Changing the signature of the tensor spacetime to: + +
The dimension and signature of the tensor space are set to 2,⁢⁡+ +
Dgammarepresentation=standard,dimension=2,signature=+ +
Not defined as a tensor within the framework of the Physics package
The components of the Dirac matrices are also automatically redefined according to the change in dimension and signature
Setting the spacetime metric passing a keyword: it automatically sets the corresponding Coordinates accordingly, and returns the set of nonzero elements of the metric Matrix
Setup(metric = Tolman);
Resetting the dimension of spacetime to 4 in order to match the indicated keyword 'Tolman'
⁢Systems of spacetime coordinates are:⁢X=r,θ,φ,t
⁢_______________________________________________________
Setting lowercaselatin_is letters to represent space indices
⁢The Tolman metric in coordinates ⁢r,θ,φ,t
Parameters: R⁡t,r,E⁡r
Signature: + + + -
gμ,ν=
metric=1,1=−Rr21+2⁢E⁡r,2,2=−R⁡t,r2,3,3=−R⁡t,r2⁢sin⁡θ2,4,4=1,spaceindices=lowercaselatin_is
To see the matrix form of the metric you can enter g_ without indices
g_[];
Usually, you can select a tensor component indexing the tensor name with a number, say 1, or a contravariant number, say ~1. With paper and pencil, however, it is common practice to index tensors with the coordinates themselves representing a number: their position in the list of coordinates. To turn ON that notation, use the keyword usecoordinatesastensorindices. For example,
Setup(usecoordinates = true);
* Partial match of 'usecoordinates' against keyword 'usecoordinatesastensorindices'
usecoordinatesastensorindices=true
The main coordinates (i.e. the ones used by d_ and D_) are
Setup(diff);
* Partial or misspelled keyword matches more than one possible keyword. Please select the correct one from below and try again.
differentialoperators,differentiationvariables
Hence
g_[t, t] = g_[4, 4];
1=1
Remark: θ is both a greek letter and a coordinate, so could be interpreted as an index or as its numerical position in the list of coordinates r,θ,φ,t. When usecoordinatesastensorindices = true and such ambiguous situation happens, the letter is interpreted as its numerical position, not as an index, so the following is g2,2, not the trace of the metric:
g_[theta, theta] = g_[2, 2];
−R⁡t,r2=−R⁡t,r2
Reset the value of this setting
Setup(usecoordinates = false);
usecoordinatesastensorindices=false
When you try to set the metric with a keyword and there is no exact match, a searchtext is performed against the keywords known, and if there is a single match, the metric is set accordingly
Setup(metric = sc);
⁢The Schwarzschild metric in coordinates ⁢r,θ,φ,t
Parameters: m
metric=1,1=−r2⁢m−r,2,2=r2,3,3=r2⁢sin⁡θ2,4,4=2⁢m−rr
When there are many matches, the choices are displayed and you can choose
Setup(metric = sik);
____________________________________________________________
[12, 34, 1] = [Authors = [Kaigorodov (1962), Cahen (1964), Siklos (1981), Ozsvath (1987)], PrimaryDescription = Einstein, SecondaryDescription = [Homogeneous], Comments = [All metrics with _epsilon <> 0 are equivalent to the cases _epsilon = +1, -1, _epsilon = 0 is anti-deSitter space]]
[12, 35, 1] = [Authors = [Kaigorodov (1962), Cahen (1964), Siklos (1981), Ozsvath (1987)], PrimaryDescription = Einstein, SecondaryDescription = [Homogeneous, SimpleTransitive]]
[12, 38, 1] = [Authors = [Siklos (1985)], PrimaryDescription = PureRadiation, SecondaryDescription = [Homogeneous, PureRadiation], Comments = [Generic k value, k <> -1 (see [12, 6, 1]), 1/2 (see [12,38,2]), 3/2 (see [12,38, 5]), 2 (see [12,38, 3] and [12, 38, 4]). Note the k = 1/2 is Petrov type "O" .]]
[12, 38, 2] = [Authors = [Siklos (1985)], PrimaryDescription = PureRadiation, SecondaryDescription = [PureRadiation, Homogeneous], Comments = [This is k = 1/2 in [12, 38, 1]. This is of Petrov type "O"]]
[12, 38, 3] = [Authors = [Siklos (1985)], PrimaryDescription = EinsteinMaxwell, SecondaryDescription = [PureRadiation, Homogeneous], Comments = [This is _k = 2 and _epsilon = 1 in [12, 38, 1]. Only _epsilon = 1 gives a Maxwell field]]
[12, 38, 4] = [Authors = [Siklos (1985)], PrimaryDescription = PureRadiation, SecondaryDescription = [PureRadiation, Homogeneous], Comments = [This is _k = 2 and _epsilon = -1 in [12, 38, 1]. Only _epsilon = 1 gives a Maxwell field]]
[12, 38, 5] = [Authors = [Siklos (1985), Nariai(1950)], PrimaryDescription = Einstein, SecondaryDescription = [Homogeneous], Comments = [This is k = 3/2 in [12, 38, 1]. It is equivalent to [12, 34, 1]]]
[13, 64, 1] = [Authors = [Siklos (1981)], PrimaryDescription = Einstein, SecondaryDescription = []]
[13, 64, 3] = [Authors = [Siklos (1981)], PrimaryDescription = Einstein, SecondaryDescription = [], Comments = [See also (13, 64, 4) for Riemannian orbits]]
[13, 64, 4] = [Authors = [Siklos (1981)], PrimaryDescription = Einstein, SecondaryDescription = [], Comments = [See also (13, 64, 3) for PseudoRiemannian orbits]]
[13, 65, 1] = [Authors = [Siklos (1981)], PrimaryDescription = Einstein, SecondaryDescription = [], Comments = [We can use the transformation x -> - x to assume the parameter _b > 0, A boost and a spatial rotation are required to take the null tetrad to an adapted null tetrad]]
[13, 67, 1] = [Authors = [Siklos (1981)], PrimaryDescription = Einstein, SecondaryDescription = [TwistingSolution]]
[13, 67, 2] = [Authors = [Siklos (1981)], PrimaryDescription = Einstein, SecondaryDescription = [TwistingSolution]]
[38, 1, 1] = [Authors = [Siklos (1981)], PrimaryDescription = Hypersurface-Homogeneous, SecondaryDescription = [AlgebraicallySpecial]]
Found more than one match for the keyword 'sik', as seen above. Please refine your 'keyword' or re-enter the metric g_... with the list of three numbers identifying the metric, for example as in g_12,34,1 or Setup⁡metric=12,34,1
Setup(metric = [12, 38, 1]);
⁢Systems of spacetime coordinates are:⁢X=v,y,z,u
⁢Default differentiation variables for d_, D_ and dAlembertian are:⁢X=v,y,z,u
The Siklos (1985) metric in coordinates v,y,z,u
Parameters: k,ε,Λ,κ0
Comments: Gⅇnⅇrⅈc k valuⅇ, k <> -1 (sⅇⅇ [12, 6, 1]), 1/2 (sⅇⅇ [12,38,2]), 3/2 (sⅇⅇ [12,38, 5]), 2 (sⅇⅇ [12,38, 3] anⅆ [12, 38, 4]). Notⅇ thⅇ k = 1/2 ⅈs Pⅇtrov typⅇ "O" .
Domain: 0<y
Assumptions: ε=−1,ε=1,0<κ0,Λ<0
metric=1,1=−3⁢y−2+2⁢k⁢εΛ,1,4=−32⁢y2⁢Λ,2,2=3y2⁢Λ,3,3=3y2⁢Λ
Setting the metric by passing the line element, as an expression quadratic in the differentials expressed using d_ or %d_. In order to use θ as a coordinate, clear first its anticommutative character
Setup(clear, anticommutativepre);
* Partial match of 'anticommutativepre' against keyword 'anticommutativeprefix'
anticommutativeprefix=∅
Coordinates(X = [r, theta, phi, t]);
X
ds2 := r*d_(r)^2/(-r+2*m)-r^2*d_(theta)^2-r^2*sin(theta)^2*d_(phi)^2+(r-2*m)*d_(t)^2/r;
ds2≔r⁢ⅆ⁡r22⁢m−r−r2⁢ⅆ⁡θ2−r2⁢sin⁡θ2⁢ⅆ⁡φ2+r−2⁢m⁢ⅆ⁡t2r
Setup(metric = ds2);
Coordinates: r,θ,φ,t. Signature: + + + -
metric=1,1=r2⁢m−r,2,2=−r2,3,3=−r2⁢sin⁡θ2,4,4=r−2⁢mr
The Minkowski line element, expressing the differentials concatenating d to the coordinates
Coordinates(redo, X);
⁢Systems of spacetime coordinates are:⁢X=x1,x2,x3,x4
ds2 := - dx1^2 - dx2^2 - dx3^2 + dx4^2;
ds2≔−dx12−dx22−dx32+dx42
Defined Pauli sigma matrices (Psigma): σ1 , σ2 , σ3 , σ0
Coordinates: x1,x2,x3,x4. Signature: - - - +
metric=1,1=−1,2,2=−1,3,3=−1,4,4=1
Setting the metric passing a Matrix or its nonzero components
G := Matrix(4, 4, {(1, 1) = r/(-r+2*m), (2, 2) = -r^2, (3, 3) = -r^2*sin(theta)^2, (4, 4) = (r-2*m)/r}, shape = symmetric);
G≔
Setup(coordinates = spherical, metric = G);
Coordinates: r,θ,φ,t. Signature: - - - +
coordinatesystems=X,metric=1,1=r2⁢m−r,2,2=−r2,3,3=−r2⁢sin⁡θ2,4,4=r−2⁢mr
Setup(coordinates = cartesian, metric = {(1, 1) = -3*y^(-2+2*k)*epsilon/abs(Lambda), (1, 4) = -3/(2*y^2*abs(Lambda)), (2, 2) = 3/(y^2*abs(Lambda)), (3, 3) = 3/(y^2*abs(Lambda))});
⁢Systems of spacetime coordinates are:⁢X=x,y,z,t
Warning, for the signature - - - +, that is with the timelike component in position 4, the spacetime metric indicated has g0,0 = g4,4 = 0, and so the corresponding system of reference cannot be realized with real bodies (e.g. you cannot define proper time nor synchronize clocks in any infinitesimal region of space). Note as well that the corresponding 3-dimensional space metric γ is singular.
Coordinates: x,y,z,t. Signature: - - - +
coordinatesystems=X,metric=1,1=−3⁢y−2+2⁢k⁢εΛ,1,4=−32⁢y2⁢Λ,2,2=3y2⁢Λ,3,3=3y2⁢Λ
By default, usephysicsevaluator is set to true so that contracted indices in tensorial expressions are automatically rewritten as one covariant one contravariant.
Define(A, B);
A,B,▿μ,γμ,σμ,Rμ,ν,Rμ,ν,α,β,Cμ,ν,α,β,∂μ,gμ,ν,γi,j,Γμ,ν,α,Gμ,ν,Τμ,ν,εα,β,μ,ν,Xμ
A[mu]^2;
Aμ⁢A⁢μ⁢μ
A[mu]*B[mu];
Aμ⁢B⁢μ⁢μ
When the indices are already given as one covariant, one contravariant, they are not changed
A[~mu]*B[mu] - A[mu]*B[~mu];
−Aμ⁢B⁢μ⁢μ+A⁢μ⁢μ⁢Bμ
If, however, you are working with tensorial expressions of thousands of terms and experience a slowdown in performance you can try setting the value to false
Setup(usephysicsevaluator = false);
usephysicsevaluator=false
The indices now remain the way you enter them (to enter a contravariant index, prefix it with ~)
Aμ2
Aμ⁢Bμ
Automatic simplification requires the Physics evaluator and is turned ON using the automaticsimplification keyword. The starting value of this keyword is false
Setup(automaticsimplification);
automaticsimplification=false
After setting automaticsimplification = true, everything gets automatically simplified in size before being returned to the screen. An example not related to Physics:
-3*sin(x)^(1/2)*cos(x)^2*sin(x)^m+3*sin(x)^(1/2)*cos(x)^2*cos(x)^n+4*sin(x)^(1/2)*cos(x)^4*sin(x)^m-4*sin(x)^(1/2)*cos(x)^4*cos(x)^n;
−3⁢sin⁡x⁢cos⁡x2⁢sin⁡xm+3⁢sin⁡x⁢cos⁡x2⁢cos⁡xn+4⁢sin⁡x⁢cos⁡x4⁢sin⁡xm−4⁢sin⁡x⁢cos⁡x4⁢cos⁡xn
Activate now the feature and re-enter this same expression
Setup(usephysicsevaluator = true, automaticsimplification = true);
automaticsimplification=true,usephysicsevaluator=true
−4⁢cos⁡x2⁢cos⁡x2−34⁢cos⁡xn−sin⁡xm⁢sin⁡x
The combinepowersofsamebase keyword: its starting value is false
Setup(combinepowersofsamebase);
combinepowersofsamebase=false
Activate the feature
Setup(combinepowersofsamebase = true);
combinepowersofsamebase=true
From here on, powers of the same base are automatically combined when that is mathematically correct
A^m*A^n;
Am+n
The combination is valid for noncommutative A provided that n and m commute. For exponentials, Glauber's formula is automatically taken into account. Set for instance A, B and C to be noncommutative operators, A and B to commute with C, and C equal to the commutator of A and B
Setup(op = {A, B, C}, %Commutator(A, C) = 0, %Commutator(B, C) = 0, %Commutator(A, B) = C);
algebrarules=A,B−=C,A,C−=0,B,C−=0,Rj,Pk−=I⁢δj,k,quantumoperators=A,B,C,P,R
Automatic combination of exponentials using Glauber's formula
exp(A)*exp(B);
ⅇA+B+C2
Turn the feature OFF and expand the previous result:
Setup(combine = false);
* Partial match of 'combine' against keyword 'combinepowersofsamebase'
expand((96));
ⅇA⁢ⅇB
To indicate that certain names are differential operators use the differentialoperators keyword with a list on the right-hand side, containing two operands: the name variable and a list with the corresponding differentiation variables, or to set many of them at the same time pass the many corresponding lists as a set. For example
Setup(differentialoperators = {[theta__x, [x, z]], [theta__y, [y, z]]});
differentialoperators=θ__x,x,z,θ__y,y,z
So now these names are noncommutative and these operators do not commute with the corresponding differentiation variables
type(theta__x, noncommutative);
Library:-Commute(theta__x, x);
false
Library:-Commute(theta__y, x);
Library:-Commute(theta__x, theta__y);
So you can now use these operators in products of algebraic expressions and have them applied to the objects to their right only when desired using Library:-ApplyProductsOfDifferentialOperators
(theta__x * theta__y + theta__y * theta__x + 1) * x;
θ__x⁢θ__y+θ__y⁢θ__x+1⁢x
Library:-ApplyProductsOfDifferentialOperators((104));
θ__x⁡x⁢θ__y+θ__y⁡θ__x⁡x+x
You can also define commutation relationships between the differential operators and everything else, to be taken into account at the time of applying the products of differential operators. For example:
Setup(%Commutator(theta__x, theta__y) = 0);
algebrarules=A,B−=C,A,C−=0,B,C−=0,θ__x,θ__y−=0,Rj,Pk−=I⁢δj,k
2⁢θ__x⁡x⁢θ__y+x
See Also
Bra, Bracket, Conventions, Coordinates, d_, D_, dAlembertian, Define, Dgamma, g_, Ket, LapseAndShiftConditions, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics[`*`], Physics[.], Projector, Vectors
References
Cohen-Tannoudji, C.; Diu, B.; and Laloe, F. Quantum Mechanics, Chapter II. Paris, France: Hermann, 1977.
Stephani, H., Kramer, D., MacCallum, M., Hoenselaers, C. Herlt, E. Exact Solutions of Einstein's Field Equations, Cambridge Monographs on Mathematical Physics, second edition. Cambridge University Press, 2003.
Compatibility
The Physics[Setup] command was updated in Maple 2020.
The su2matrixindices and su3matrixindices options were introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
Download Help Document