Bracket - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Physics[Bracket] - compute the scalar product between Bras, Kets, and quantum operators in Dirac's notation

 Calling Sequence Bracket(H) Bracket(B, K) Bracket(B, H, K) Bracket(a, b, c, ...)

Parameters

 H - an algebraic expression, typically a linear quantum operator, defined as such by the Setup, Annihilation, Creation, or Projector commands B - a Bra state vector of a space of quantum states K - a Ket state vector of a space of quantum states a, b, c, ... - shortcut notation: algebraic expressions representing labels and quantum numbers of a Bra and a Ket, possibly including a quantum operator between them when there is an odd number of arguments

Description

 • A Ket state vector represents the quantum state of a physical system. A Bra is also a vector in a space of quantum states and corresponds to a Ket vector in that one is obtained from the other through Hermitian conjugation.
 • The Bracket(B, K) command (note the 'c' between Bra and Ket) performs the scalar product, also called the inner product, between a Bra B and a Ket K. The Bracket(B, H, K) command, where H represents a linear quantum operator, defined as such by the Setup command, or returned by one of the Annihilation, Creation, or Projector commands, returns the scalar product between the Bra B and the Ket resulting from the action of H on the Ket K. When H is not an operator, Bracket(B, H, K) transforms into H*Bracket(B, K).
 • The %Bracket command is the inert form of Bracket; that is, it represents the same mathematical operation while displaying the operation unevaluated. To evaluate the operation, use the value command.
 • A shortcut notation for Bracket consists of the following:
 - if an even number of arguments N are passed, and the first and (N/2 + 1)th are names (so they can represent labels for spaces of states), and the rest of the arguments are not quantum operators, then for example, Bracket(B, n1,n2, K, m1,m2) is transformed into Bracket(Bra(B, n1,n2), Ket(K, m1,m2)).
 - if an odd number of arguments N are passed, where the (N+1)/2th argument is $H$, then for example, Bracket(B, n1,n2, H, K, m1,m2) is transformed into Bracket(Bra(B, n1,n2), H, Ket(K, m1,m2)).
 • The scalar product between $B$ and $K$ (or $H$ and $K$) is computed also by using $B·K$ (or $H·K$), where $\mathrm{.}$ is the Physics[.] scalar (inner) product operator.
 • The Bracket between a Bra and a Ket is expressed in terms of KroneckerDeltas, when the state vectors belong to a discrete space of states, or by using Dirac functions, when the state vectors belong to a continuous space of states. To make the label (first argument) of a Bra or Ket be associated with a continuous space of states, use the Setup command, as in $\mathrm{Setup}\left(\mathrm{continuousbasis}=A\right)$; otherwise, it is assumed that the Bra or Ket corresponds to a discrete space of states.
 • To set bracket rules involving Bra and Ket state vectors, use the Setup command; see the examples below.
 • When the Bracket cannot be resolved, the operation is returned unevaluated; see details in Physics[.].

Examples

Consider two Kets belonging to the same basis, labeled with the letter $\mathrm{\psi }$ (psi).

 > $\mathrm{with}\left(\mathrm{Physics}\right):$
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (1)
 > $\mathrm{K1}≔\mathrm{Ket}\left(\mathrm{\psi },n,m\right)$
 ${\mathrm{K1}}{≔}{\mathrm{Ket}}{}\left({\mathrm{ψ}}{,}{n}{,}{m}\right)$ (2)
 > $\mathrm{K2}≔\mathrm{Ket}\left(\mathrm{\psi },r,s\right)$
 ${\mathrm{K2}}{≔}{\mathrm{Ket}}{}\left({\mathrm{ψ}}{,}{r}{,}{s}\right)$ (3)

To construct the corresponding Bras, you can enter them directly by using the Bra command (as in BK1), or take the Hermitian conjugate by using the Dagger command (as in BK2).

 > $\mathrm{BK1}≔\mathrm{Bra}\left(\mathrm{\psi },n,m\right)$
 ${\mathrm{BK1}}{≔}{\mathrm{Bra}}{}\left({\mathrm{ψ}}{,}{n}{,}{m}\right)$ (4)
 > $\mathrm{BK2}≔\mathrm{Dagger}\left(\mathrm{K2}\right)$
 ${\mathrm{BK2}}{≔}{\mathrm{Bra}}{}\left({\mathrm{ψ}}{,}{r}{,}{s}\right)$ (5)

To perform the scalar product, use the Bracket command.

 > $\mathrm{Bracket}\left(\mathrm{BK1},\mathrm{K2}\right)$
 ${{\mathrm{\delta }}}_{{n}{,}{r}}{}{{\mathrm{\delta }}}_{{m}{,}{s}}$ (6)

You can also use the scalar product operator, Physics[.]

 > $\mathrm{BK1}·\mathrm{K2}$
 ${{\mathrm{\delta }}}_{{n}{,}{r}}{}{{\mathrm{\delta }}}_{{m}{,}{s}}$ (7)

Notice that the above is the product of two Kronecker deltas. This is so because these Kets are assumed to be part of the same discrete basis. To indicate that they belong to a continuous space of states, use the Setup command.

 > $\mathrm{Setup}\left(\mathrm{continuousbasis}=\mathrm{\psi }\right)$
 $\mathrm{* Partial match of \text{'}}{}\mathrm{continuousbasis}{}\mathrm{\text{'} against keyword \text{'}}{}\mathrm{quantumcontinuousbasis}{}\text{'}$
 $\mathrm{_______________________________________________________}$
 $\left[{\mathrm{quantumcontinuousbasis}}{=}\left\{{\mathrm{\psi }}\right\}\right]$ (8)
 > $\mathrm{Bracket}\left(\mathrm{BK1},\mathrm{K2}\right)$
 ${\mathrm{Dirac}}{}\left(\left[{-}{r}{+}{n}{,}{-}{s}{+}{m}\right]\right)$ (9)

In the above, you see a 2-dimensional Dirac function. To expand this Dirac function into a product of two 1-dimensional Dirac functions, use the expand command. When taking the Bracket between state vectors with different labels, unless a bracket rule for them is known to the system, the result is returned unevaluated.

 > $\mathrm{Bracket}\left(\mathrm{Bra}\left(\mathrm{\psi },x\right),\mathrm{Ket}\left(\mathrm{\phi },y\right)\right)$
 ${\mathrm{Bracket}}{}\left({\mathrm{Bra}}{}\left({\mathrm{ψ}}{,}{x}\right){,}{\mathrm{Ket}}{}\left({\mathrm{φ}}{,}{y}\right)\right)$ (10)

To set a rule for the evaluation of these brackets, see Setup and the example below.

You can also set the label $\mathrm{\psi }$ (formerly set to represent a continuous space of states) to represent a discrete space of states by using the Setup command again. When resetting a label from a continuous to a discrete space of states, you first need to clear the previous setting (a two step operation), or directly redo the setting in one step, as shown below.

 > $\mathrm{Setup}\left(\mathrm{discretebasis}=\mathrm{\psi },\mathrm{redo}\right)$
 $\mathrm{* Partial match of \text{'}}{}\mathrm{discretebasis}{}\mathrm{\text{'} against keyword \text{'}}{}\mathrm{quantumdiscretebasis}{}\text{'}$
 $\mathrm{_______________________________________________________}$
 $\left[{\mathrm{quantumdiscretebasis}}{=}\left\{{\mathrm{\psi }}\right\}\right]$ (11)

For discrete bases, it is possible to define creation and annihilation operators acting on Kets belonging to this space of states (that is, to the basis labeled by the Ket's first argument). For these purposes, use the Annihilation and Creation operators.

 > $\mathrm{am1}≔\mathrm{Annihilation}\left(\mathrm{\psi },1\right)$
 ${\mathrm{am1}}{≔}{{a}}^{{-}}$ (12)
 > $\mathrm{ap2}≔\mathrm{Creation}\left(\mathrm{\psi },2\right)$
 ${\mathrm{ap2}}{≔}{{a}}^{{+}}$ (13)

In the above, $\mathrm{am1}$ and $\mathrm{ap2}$ represent the annihilation (with respect to the first quantum number) and creation (with respect to the second quantum number) operators, respectively; their actions over the Ket $\mathrm{K1}$ are shown below.

 > $\mathrm{am1}·\mathrm{K1}$
 $\sqrt{{n}}{}{\mathrm{Ket}}{}\left({\mathrm{ψ}}{,}{n}{-}{1}{,}{m}\right)$ (14)
 > $\mathrm{ap2}·\mathrm{K1}$
 $\sqrt{{m}{+}{1}}{}{\mathrm{Ket}}{}\left({\mathrm{ψ}}{,}{n}{,}{m}{+}{1}\right)$ (15)

where . is the scalar product operator in the Physics package.

The following are the related Bracket operations, expressed in the inert form %Bracket; inert computations are evaluated by using the value command.

 > $\mathrm{%Bracket}\left(\mathrm{Dagger}\left(\mathrm{K1}\right),\mathrm{am1},\mathrm{K2}\right)$
 ${\mathrm{%Bracket}}{}\left({\mathrm{Bra}}{}\left({\mathrm{ψ}}{,}{n}{,}{m}\right){,}{{a}}^{{-}}{,}{\mathrm{Ket}}{}\left({\mathrm{ψ}}{,}{r}{,}{s}\right)\right)$ (16)
 > $\mathrm{value}\left(\right)$
 $\sqrt{{r}}{}{{\mathrm{\delta }}}_{{n}{,}{r}{-}{1}}{}{{\mathrm{\delta }}}_{{m}{,}{s}}$ (17)
 > $\mathrm{%Bracket}\left(\mathrm{Dagger}\left(\mathrm{K1}\right),\mathrm{ap2},\mathrm{K2}\right)$
 ${\mathrm{%Bracket}}{}\left({\mathrm{Bra}}{}\left({\mathrm{ψ}}{,}{n}{,}{m}\right){,}{{a}}^{{+}}{,}{\mathrm{Ket}}{}\left({\mathrm{ψ}}{,}{r}{,}{s}\right)\right)$ (18)
 > $\mathrm{value}\left(\right)$
 $\sqrt{{s}{+}{1}}{}{{\mathrm{\delta }}}_{{n}{,}{r}}{}{{\mathrm{\delta }}}_{{m}{,}{s}{+}{1}}$ (19)

Let $|R,x,y,z>$ and $|P,\mathrm{px},\mathrm{py},\mathrm{pz}>$ represent "position" and "momentum" state vectors; their scalar product is unknown to the system.

 > $\mathrm{Bracket}\left(\mathrm{Bra}\left(R,x,y,z\right),\mathrm{Ket}\left(P,p\left[x\right],p\left[y\right],p\left[z\right]\right)\right)$
 ${\mathrm{Bracket}}{}\left({\mathrm{Bra}}{}\left({R}{,}{x}{,}{y}{,}{z}\right){,}{\mathrm{Ket}}{}\left({P}{,}{{p}}_{{x}}{,}{{p}}_{{y}}{,}{{p}}_{{z}}\right)\right)$ (20)

Let their scalar product be the corresponding normalized plane wave (see References below).

 > $=\frac{1}{{\left(2\mathrm{\pi }\right)}^{\frac{3}{2}}}\mathrm{exp}\left(I\left(xp\left[x\right]+yp\left[y\right]+zp\left[z\right]\right)\right)$
 ${\mathrm{Bracket}}{}\left({\mathrm{Bra}}{}\left({R}{,}{x}{,}{y}{,}{z}\right){,}{\mathrm{Ket}}{}\left({P}{,}{{p}}_{{x}}{,}{{p}}_{{y}}{,}{{p}}_{{z}}\right)\right){=}\frac{\sqrt{{2}}{}{{ⅇ}}^{{I}{}\left({x}{}{{p}}_{{x}}{+}{y}{}{{p}}_{{y}}{+}{z}{}{{p}}_{{z}}\right)}}{{4}{}{{\mathrm{\pi }}}^{{3}}{{2}}}}$ (21)

To set the above as a rule when computing brackets between the vectors $R$ and $P$, use the Setup command.

 > $\mathrm{Setup}\left(\right)$
 $\left[{\mathrm{bracketrules}}{=}\left\{{\mathrm{%Bracket}}{}\left({\mathrm{%Bra}}{}\left({R}{,}{x}{,}{y}{,}{z}\right){,}{\mathrm{%Ket}}{}\left({P}{,}{{p}}_{{x}}{,}{{p}}_{{y}}{,}{{p}}_{{z}}\right)\right){=}\frac{{1}}{{4}}{}\frac{\sqrt{{2}}{}{\mathrm{exp}}{}\left({I}{}\left({x}{}{{p}}_{{x}}{+}{y}{}{{p}}_{{y}}{+}{z}{}{{p}}_{{z}}\right)\right)}{{{\mathrm{π}}}^{{3}{/}{2}}}\right\}\right]$ (22)

Now this rule is used automatically. Note the use of shortcut notation in the example below.

 > $\mathrm{%Bracket}\left(R,a,b,c,P,d,e,f\right)$
 ${\mathrm{%Bracket}}{}\left({R}{,}{a}{,}{b}{,}{c}{,}{P}{,}{d}{,}{e}{,}{f}\right)$ (23)
 > $\mathrm{value}\left(\right)$
 $\frac{\sqrt{{2}}{}{{ⅇ}}^{{I}{}\left({a}{}{d}{+}{b}{}{e}{+}{f}{}{c}\right)}}{{4}{}{{\mathrm{\pi }}}^{{3}}{{2}}}}$ (24)

Construct the Projector onto the basis $P$.

 > $\mathrm{Setup}\left(\mathrm{continuousbasis}=\left\{P,R\right\}\right)$
 $\mathrm{* Partial match of \text{'}}{}\mathrm{continuousbasis}{}\mathrm{\text{'} against keyword \text{'}}{}\mathrm{quantumcontinuousbasis}{}\text{'}$
 $\mathrm{_______________________________________________________}$
 $\left[{\mathrm{quantumcontinuousbasis}}{=}\left\{{P}{,}{R}\right\}\right]$ (25)
 > $\mathrm{Projector}\left(\mathrm{Ket}\left(P,p\left[1\right],p\left[2\right],p\left[3\right]\right)\right)$
 ${\mathrm{Int}}{}\left({\mathrm{Int}}{}\left({\mathrm{Int}}{}\left({\mathrm{*}}{}\left({\mathrm{Ket}}{}\left({P}{,}{{p}}_{{1}}{,}{{p}}_{{2}}{,}{{p}}_{{3}}\right){,}{\mathrm{Bra}}{}\left({P}{,}{{p}}_{{1}}{,}{{p}}_{{2}}{,}{{p}}_{{3}}\right)\right){,}{{p}}_{{1}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{{p}}_{{2}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{{p}}_{{3}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right)$ (26)

Consider the representation $R$ of this Projector: it is directly computable from the bracket rule already set (use delay evaluation quotes and perform the operation in the next line by using the ditto operator, %).

 > $'\mathrm{Bracket}'\left(R,x\left[1\right],x\left[2\right],x\left[3\right],,R,y\left[1\right],y\left[2\right],y\left[3\right]\right)$
 ${\mathrm{Bracket}}{}\left({R}{,}{{x}}_{{1}}{,}{{x}}_{{2}}{,}{{x}}_{{3}}{,}{\mathrm{Int}}{}\left({\mathrm{Int}}{}\left({\mathrm{Int}}{}\left({\mathrm{*}}{}\left({\mathrm{Ket}}{}\left({P}{,}{{p}}_{{1}}{,}{{p}}_{{2}}{,}{{p}}_{{3}}\right){,}{\mathrm{Bra}}{}\left({P}{,}{{p}}_{{1}}{,}{{p}}_{{2}}{,}{{p}}_{{3}}\right)\right){,}{{p}}_{{1}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{{p}}_{{2}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{{p}}_{{3}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{R}{,}{{y}}_{{1}}{,}{{y}}_{{2}}{,}{{y}}_{{3}}\right)$ (27)
 > 
 ${\mathrm{Int}}{}\left({\mathrm{Int}}{}\left({\mathrm{Int}}{}\left(\frac{{1}}{{8}}{}\frac{{\mathrm{exp}}{}\left({I}{}\left({{x}}_{{1}}{-}{{y}}_{{1}}\right){}{{p}}_{{1}}{+}{I}{}\left({{x}}_{{2}}{-}{{y}}_{{2}}\right){}{{p}}_{{2}}{+}{I}{}\left({{x}}_{{3}}{-}{{y}}_{{3}}\right){}{{p}}_{{3}}\right)}{{{\mathrm{π}}}^{{3}}}{,}{{p}}_{{1}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{{p}}_{{2}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right){,}{{p}}_{{3}}{=}{-}{\mathrm{∞}}{..}{\mathrm{∞}}\right)$ (28)
 > 

References

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