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 , 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
|
= none
|
Or(symbol, set(symbol))
|
assumingusesAssume
|
= true
|
truefalse
|
automaticsimplification
|
= false
|
truefalse
|
bracketbasis
|
= none
|
name
|
bracketrules
|
= none
|
set(Bracket(Bra, Ket) = algebraic)
|
combinepowersofsamebase
|
= false
|
truefalse
|
coordinatesystems
|
= none
|
Or(symbol, set(symbol)) # Capital letters only
|
cosmologicalconstant
|
= 0
|
algebraic
|
Dgammarepresentation
|
= standard
|
identical(standard, chiral, Majorana)
|
differentialoperators
|
= none
|
[name, list(name)]
|
differentiationvariables
|
= none
|
symbol # Capital letter
|
dimension
|
= 4
|
And(posint, satisfies(d -> d > 1))
|
disjointedspaces
|
= none
|
Or(set(symbol), set(set(symbol), set(symbol), ...))
|
genericindices
|
= none
|
same as spacetimeindices
|
geometricdifferentiation
|
= false
|
truefalse
|
hermitianoperators
|
= none
|
Or(name, set(name))
|
hideketlabel
|
= false
|
truefalse
|
hilbertspaces
|
= none
|
same as disjointedspaces
|
levicivita
|
= galilean
|
identical(galilean, nongalilean)
|
lapseandshift
|
= standard
|
Or(identical(standard, arbitrary), [algebraic, [algebraic, algebraic, algebraic]])
|
masslessfields
|
= none
|
Or(name, set(name)
|
mathematicalnotation
|
= none
|
truefalse
|
metric
|
= Minkowski
|
<keyword, line_element, Matrix, set(nonzero components)>
|
noncommutativeprefix
|
= none
|
Or(name={algebraic, range}, set(name={algebraic, range}))
|
normusesconjugate
|
= false
|
truefalse
|
quantumbasisdimension
|
= none
|
Or(name, set(name))
|
quantumcontinuousbasis
|
= none
|
Or(name, set(name))
|
quantumdiscretebasis
|
= none
|
Or(name, set(name))
|
quantumoperators
|
= none
|
Or(name, set(name))
|
realobjects
|
= none
|
set(Or(name, function))
|
redefinesum
|
= false
|
truefalse
|
signature
|
= `-`
|
identical(`+`, `-`, `+++-`, `-+++`, `---+`, `+---`)
|
spacetimeindices
|
= greek
|
identical(greek, lowercaselatin, lowercaselatin_ah, lowercaselatin_is, uppercaselatin)
|
spaceindices
|
= none
|
same as spacetimeindices
|
spinorindices
|
= none
|
same as spacetimeindices
|
su2indices
|
= none
|
same as spacetimeindices
|
su2matrixindices
|
= none
|
same as spacetimeindices
|
su3indices
|
= none
|
same as spacetimeindices
|
su3matrixindices
|
= none
|
same as spacetimeindices
|
tensorsimplifier
|
= Physics:-TensorSimplifier
|
Or(procedure, algebraic)
|
tetrad
|
= none
|
<keyword, Matrix, set(nonzero components)>
|
tetradindices
|
= none
|
same as spacetimeindices
|
tetradmetric
|
= none
|
<keyword, Matrix, set(nonzero components)>
|
traceonlymatrices
|
= true
|
truefalse
|
unitaryoperators
|
= none
|
Or(name, set(name))
|
usecoordinatesastensorindices
|
= false
|
truefalse
|
usephysicsevaluator
|
= true
|
truefalse
|
usewirtingerderivatives
|
= false
|
truefalse
|
vectorpostfix
|
= none
|
symbol
|
|
|
•
|
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:
|
•
|
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:
|
|
|
The parameters of the computational environment
|
|
|
A description of the parameters and the setting action associated with each of them is as follows.
|
|
abbreviations
|
|
|
The default for this option is true, and so the abbreviations for KroneckerDelta and for LeviCivita are set when you load the package. Therefore, 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.
|
|
|
algebrarules
|
|
|
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.
|
|
|
anticommutativecolor
|
|
|
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, or yellow.
|
|
|
anticommutativeprefix
|
|
|
Any valid sequence of characters.
|
|
Sets the prefix of characters entering the symbols representing anticommutative variables; that is, variables and for which = . 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 . See the last examples in dsolve,details.
|
|
|
assumingusesAssume
|
|
|
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).
|
|
|
automaticsimplification
|
|
|
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.
|
|
|
bracketbasis
|
|
|
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, will be computed as .
|
|
|
bracketrules
|
|
|
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 or for some Bra and Ket and , and the quantum operator should have all the quantum numbers of and 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 . 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.
|
|
|
combinepowersofsamebase
|
|
|
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).
|
|
|
coordinatesystems
|
|
|
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 , and sets . See also Coordinates
|
|
|
cosmologicalconstant
|
|
|
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].
|
|
|
Dgammarepresentation
|
|
|
standard, chiral, or Majorana.
|
|
Note: The representation depends on the dimension of spacetime, and for a dimension lower than 4, only the standard representation is implemented.
|
|
|
differentialoperators
|
|
|
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.
|
|
|
differentiationvariables
|
|
|
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.
|
|
|
dimension
|
|
|
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 , where is the dimension and 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 , 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}}.
|
|
|
genericindices
|
|
|
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.
|
|
|
geometricdifferentiation
|
|
|
|
hermitianoperators
|
|
|
A name, or a set of them.
|
|
Indicates that these names represent linear hermitian quantum operators, that is, they satisfy . 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).
|
|
|
hideketlabel
|
|
|
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.
|
|
|
lapseandshift
|
|
|
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 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 part of the 4D metric, according to and , 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 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 , where and have the Lapse and Shift values mentioned, and 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 ) for the 3+1 decomposition of Einstein's equations. See also LapseAndShiftConditions.
|
|
|
levicivita
|
|
|
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).
|
|
|
masslessfields
|
|
|
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.
|
|
|
mathematicalnotation
|
|
|
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.
|
|
|
metric
|
|
|
<keyword, line_element, Matrix, set(nonzero components)>
|
|
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.
|
|
|
noncommutativecolor
|
|
|
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, or yellow.
|
|
|
noncommutativeprefix
|
|
|
Any valid sequence of characters; the same as anticommutativeprefix.
|
|
|
normusesconjugate
|
|
|
The default for this option is false so that the Vectors[Norm] command computes the Euclidean norm of a vector, say , that is . If, however, is not commutative, or the value for normusesconjugate is set to true, then Vectors[Norm] computes the norm on complex space, as .
|
|
|
quantumbasisdimension
|
|
|
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 where and 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 , where and are positive integers, algebraic expressions representing them, or ranges of the form . This dimension of a quantum basis is used to construct projectors when you call the Projector command.
|
|
|
quantumcontinuousbasis
|
|
|
A name, or a set of them.
|
|
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.
|
|
|
quantumdiscretebasis
|
|
|
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.
|
|
|
quantumoperators
|
|
|
A name, or a set of them.
|
|
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.
|
|
|
realobjects
|
|
|
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.
|
|
|
redefinesum
|
|
|
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.
|
|
|
signature
|
|
|
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.
|
|
|
spacetimeindices
|
|
|
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.
|
|
|
spaceindices
|
|
|
Sets the identifier for space indices.
|
|
|
spinorindices
|
|
|
Sets the identifier for spinor indices.
|
|
|
su2indices
|
|
|
Sets the identifier for SU2 indices, that run from 1 to 3, the dimension of the SU2 group.
|
|
|
su2matrixindices
|
|
|
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.
|
|
|
su3indices
|
|
|
Sets the identifier for SU3 indices, that run from 1 to 8, the dimension of the SU3 group.
|
|
|
su3matrixindices
|
|
|
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.
|
|
|
tensorsimplifier
|
|
|
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).
|
|
|
tetrad
|
|
|
<keyword, Matrix, set(nonzero components)>
|
|
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 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.
|
|
|
tetradindices
|
|
|
Sets the identifier for 2 tetrad indices.
|
|
|
tetradmetric
|
|
|
<keyword, Matrix, set(nonzero components)>
|
|
Indicates the tetrad metric. Instead of the word tetradmetric the left-hand side can also be the tetradmetric tensor 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.
|
|
|
traceonlymatrices
|
|
|
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.
|
|
|
unitaryoperators
|
|
|
A name, or a set of them.
|
|
Indicates that these names represent unitary quantum operators, that is, they satisfy . 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).
|
|
|
usecoordinatesastensorindices
|
|
|
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.
|
|
|
usephysicsevaluator
|
|
|
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.
|
|
|
usewirtingerderivatives
|
|
|
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.
|
|
|
vectordisplay
|
|
|
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.
|
|
|
vectorpostfix
|
|
|
Any valid sequence of characters.
|
|
Sets the identifier for non-projected 3-D vectors of the Physics[Vectors] subpackage.
|
|
|
|
|
Examples
|
|
>
|
Setup(mathematicalnotation = true);
|
| (1) |
Query the computational setup that is loaded with the Physics package.
| (2) |
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);
|
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).
| |
| |
| (4) |
The corresponding projector is now a triple integral.
>
|
Projector(Ket(R, x, y, z));
|
| (5) |
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));
|
>
|
%Bracket(Bra(R, x, y, z), Ket(R, u, v, w));
|
| (8) |
| (9) |
Let and 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]));
|
| (10) |
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]));
|
| (11) |
To set the above as a rule when computing Brackets between the vectors and , use:
Now this rule is used automatically.
>
|
%Bracket(Bra(R, a, b, c), Ket(P, d, e, f));
|
| (13) |
| (14) |
>
|
Setup(continuousbasis = {P,R});
|
| |
| |
| (15) |
>
|
Projector(Ket(P, p[1], p[2], p[3]));
|
| (16) |
>
|
Bra(R, x[1], x[2], x[3]) . (16);
|
>
|
(16) . Ket(R, x[1], x[2], x[3]);
|
In the result above, to compute , the rule for has been used, but you can also state the rule for in addition to the rule for , 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);
|
| (19) |
>
|
%Bracket(Bra(R, 1,2,3), H, Ket(R, 4,5,6));
|
| (21) |
Define two quantum operators and a commutator algebra for them.
>
|
Setup(quantumop = {R, P}, algebrarule = {%Commutator(R[j], P[k]) = I*KroneckerDelta[j, k]});
|
| |
| |
| |
| (23) |
>
|
Commutator(R[1], P[2]);
|
>
|
Commutator(R[2], P[2]);
|
>
|
Commutator(R[n], P[m]);
|
To indicate that two operators, say and , 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 , acting in more than one space. For example,
>
|
Setup(hilbertspaces = {{F, H}, {G, H}});
|
| (27) |
The eigenkets of operators acting on disjointed spaces can be used to form tensor products
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
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);
|
The display for the projector above is now
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
Clear the setting of and as quantum operators, to allow for reusing these letters with a different meaning.
>
|
Setup(clear, op = {F, G, H});
|
| |
| |
| (33) |
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);
|
| (34) |
Now theta alone, followed by a positive integer, or indexed as in where is any valid maple object, is interpreted as an anticommutative variable.
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';
|
| (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);
|
| (39) |
Load the Physics[Vectors] package.
>
|
with(Physics[Vectors]);
|
| (41) |
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.
>
|
type(A_, PhysicsVectors);
|
Changing the vectorpostfix; the matching mechanism is used to avoid typing the entire keyword.
| |
| |
Now, neither nor are vectors, and and are non-projected vectors.
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
By default, when you load Physics the representation used for the Dirac matrices is the standard one
| |
| |
| (48) |
To see the components of each of Dirac's matrices the simplest way is
Set the Majorana representation for them
| |
| |
| |
| |
| (50) |
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, `+`]);
|
| |
| |
| |
| (52) |
Now define as an object having tensor properties; in addition, specify that has only one index.
| |
| (53) |
Differentiate with respect to .
Because the dimension is equal to 3, this evaluates to:
or directly differentiate with respect to , so that:
What is known about ?
| |
| (57) |
When changing the dimension in the middle of the session, the previous definitions set by Define are erased.
>
|
Setup(dim = [2, `+`], Dgammarepresentation = standard);
|
| |
| |
| |
| |
| (58) |
| (59) |
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);
|
| |
| |
| |
| |
| |
| |
| |
| (61) |
To see the matrix form of the metric you can enter g_ without indices
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);
|
| |
| |
| (63) |
The main coordinates (i.e. the ones used by d_ and D_) are
| |
| (64) |
Hence
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 . When usecoordinatesastensorindices = true and such ambiguous situation happens, the letter is interpreted as its numerical position, not as an index, so the following is , not the trace of the metric:
>
|
g_[theta, theta] = g_[2, 2];
|
| (66) |
Reset the value of this setting
>
|
Setup(usecoordinates = false);
|
| |
| |
| (67) |
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
| |
| |
| |
| |
| (68) |
When there are many matches, the choices are displayed and you can choose
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| (69) |
>
|
Setup(metric = [12, 38, 1]);
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| (70) |
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);
|
| |
| |
| (71) |
>
|
Coordinates(X = [r, theta, phi, t]);
|
| |
>
|
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;
|
| (73) |
| |
| |
| |
| |
| (74) |
The Minkowski line element, expressing the differentials concatenating d to the coordinates
| |
>
|
ds2 := - dx1^2 - dx2^2 - dx3^2 + dx4^2;
|
| (76) |
| |
| |
| |
| |
| |
| |
| (77) |
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);
|
>
|
Setup(coordinates = spherical, metric = G);
|
| |
| |
| |
| |
| |
| |
| (79) |
>
|
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))});
|
| |
| |
| |
| |
| |
| |
| |
| (80) |
By default, usephysicsevaluator is set to true so that contracted indices in tensorial expressions are automatically rewritten as one covariant one contravariant.
| |
| (81) |
When the indices are already given as one covariant, one contravariant, they are not changed
>
|
A[~mu]*B[mu] - A[mu]*B[~mu];
|
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);
|
| (85) |
The indices now remain the way you enter them (to enter a contravariant index, prefix it with ~)
Automatic simplification requires the Physics evaluator and is turned ON using the automaticsimplification keyword. The starting value of this keyword is false
>
|
Setup(automaticsimplification);
|
| (88) |
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;
|
| (89) |
Activate now the feature and re-enter this same expression
>
|
Setup(usephysicsevaluator = true, automaticsimplification = true);
|
| (90) |
>
|
-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;
|
| (91) |
The combinepowersofsamebase keyword: its starting value is false
>
|
Setup(combinepowersofsamebase);
|
| (92) |
Activate the feature
>
|
Setup(combinepowersofsamebase = true);
|
| (93) |
From here on, powers of the same base are automatically combined when that is mathematically correct
The combination is valid for noncommutative 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);
|
| |
| |
| (95) |
Automatic combination of exponentials using Glauber's formula
| (96) |
Turn the feature OFF and expand the previous result:
>
|
Setup(combine = false);
|
| |
| |
| (97) |
| (98) |
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]]});
|
| (99) |
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);
|
>
|
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;
|
| (104) |
>
|
Library:-ApplyProductsOfDifferentialOperators((104));
|
| (105) |
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);
|
| (106) |
>
|
Library:-ApplyProductsOfDifferentialOperators((104));
|
| (107) |
|
|
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.
|
|
|