physop.tex 29 KB

  1. \documentstyle[11pt,reduce,makeidx]{article}
  2. \makeindex
  3. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4. % The following definitions should be commented out by those
  5. % wishing to use MakeIndeX
  6. \def\indexentry#1#2{{\tt #1} \dotfill\ #2\newline}
  7. \renewcommand{\printindex}{\noindent \@input{\jobname.idx}}
  8. %%%%%%% end of definitions %%%%%%%%%%%%%%%%%%%%%
  9. \title{PHYSOP \\ A Package for Operator Calculus in Quantum Theory}
  10. \author{User's Manual \\ Version 1.5 \\ January 1992}
  11. \date{Mathias Warns \\
  12. Physikalisches Institut der Universit\"at Bonn \\
  13. Endenicher Allee 11--13 \\
  14. D--5300 BONN 1 (F.R.G.) \\*[2\parskip]
  15. Tel: (++49) 228 733724 \\
  16. Fax: (++49) 228 737869 \\
  17. e--mail: UNP008@DBNRHRZ1.bitnet}
  18. \begin{document}
  19. \maketitle
  20. \section{Introduction}
  21. The package PHYSOP has been designed to meet the requirements of
  22. theoretical physicists looking for a
  23. computer algebra tool to perform complicated calculations
  24. in quantum theory
  25. with expressions containing operators. These operations
  26. consist mainly in the calculation of commutators between operator
  27. expressions and in the evaluations of operator matrix elements
  28. in some abstract space. Since the capabilities
  29. of the current \REDUCE\ release to deal with complex
  30. expressions containing noncommutative operators are rather restricted,
  31. the first step was to enhance these possibilities in order to
  32. achieve a better usability of \REDUCE\ for these kind of calculations.
  33. This has led to the development of a first package called
  34. NONCOM2 which is described in section 2. For more complicated
  35. expressions involving both scalar quantities and operators
  36. the need for an additional data type has emerged in order to make a
  37. clear separation between the various objects present in the calculation.
  38. The implementation of this new \REDUCE\ data type is realized by the
  39. PHYSOP (for PHYSical OPerator) package described in section 3.
  40. \section{The NONCOM2 Package}
  41. The package NONCOM2 redefines some standard \REDUCE\ routines
  42. in order to modify the way noncommutative operators are handled by the
  43. system. In standard \REDUCE\ declaring an operator to be noncommutative
  44. using the \f{NONCOM} statement puts a global flag on the
  45. operator. This flag is checked when the system has to decide
  46. whether or not two operators commute during the manipulation of an
  47. expression.
  48. The NONCOM2 package redefines the \f{NONCOM} \index{NONCOM} statement in
  49. a way more suitable for calculations in physics. Operators have now to
  50. be declared noncommutative pairwise, i.e. coding: \\
  51. \begin{framedverbatim}
  52. NONCOM A,B;
  53. \end{framedverbatim}
  54. declares the operators \f{A} and \f{B} to be noncommutative but allows them
  55. to commute with any other (noncommutative or not) operator present in
  56. the expression. In a similar way if one wants e.g.\ \f{A(X)} and
  57. \f{A(Y)} not to commute, one has now to code: \\
  58. \begin{framedverbatim}
  59. NONCOM A,A;
  60. \end{framedverbatim}
  61. Each operator gets a new property list containing the
  62. operators with which it does not commute.
  63. A final example should make
  64. the use of the redefined \f{NONCOM} statement clear: \\
  65. \begin{framedverbatim}
  66. NONCOM A,B,C;
  67. \end{framedverbatim}
  68. declares \f{A} to be noncommutative with \f{B} and \f{C},
  69. \f{B} to be noncommutative
  70. with \f{A} and \f{C} and \f{C} to be noncommutative
  71. with \f{A} and \f{B}.
  72. Note that after these declaration
  73. e.g.\ \f{A(X)} and \f{A(Y)}
  74. are still commuting kernels.
  75. Finally to keep the compatibility with standard \REDUCE\, declaring a
  76. \underline{single} identifier using the \f{NONCOM} statement has the same
  77. effect as in
  78. standard \REDUCE\, i.e., the identifier is flagged with the \f{NONCOM} tag.
  79. From the user's point of view there are no other
  80. new commands implemented by the package. Commutation
  81. relations have to be declared in the standard way as described in
  82. the manual i.e.\ using
  83. \f{LET} statements. The package itself consists of several redefined
  84. standard
  85. \REDUCE\ routines to handle the new definition of noncommutativity in
  86. multiplications and pattern matching processes.
  87. {\bf CAVEAT: } Due to its nature, the package is highly version
  88. dependent. The current version has been designed for the 3.3 and 3.4
  89. releases
  90. of \REDUCE\ and may not work with previous versions. Some different
  91. (but still correct) results may occur by using this package in
  92. conjunction with
  93. LET statements since part of the pattern matching routines have been
  94. redesigned. The package has been designed to bridge a deficiency of the
  95. current \REDUCE\ version concerning the notion of noncommutativity
  96. and it is the author's hope that it will be made obsolete
  97. by a future release of \REDUCE.
  98. \section{The PHYSOP package}
  99. The package PHYSOP implements a new \REDUCE\ data type to perform
  100. calculations with physical operators. The noncommutativity of
  101. operators is
  102. implemented using the NONCOM2 package so this file should be loaded
  103. prior to the use of PHYSOP\footnote{To build a fast
  104. loading version of PHYSOP the NONCOM2
  105. source code should be read in prior to the PHYSOP
  106. code}.
  107. In the following the new commands implemented by the package
  108. are described. Beside these additional commands,
  109. the full set of standard \REDUCE\ instructions remains
  110. available for performing any other calculation.
  111. \subsection{Type declaration commands}
  112. The new \REDUCE\ data type PHYSOP implemented by the package allows the
  113. definition of a new kind of operators (i.e. kernels carrying
  114. an arbitrary
  115. number of arguments). Throughout this manual, the name
  116. ``operator''
  117. will refer, unless explicitly stated otherwise, to this new data type.
  118. This data type is in turn
  119. divided into 5 subtypes. For each of this subtype, a declaration command
  120. has been defined:
  121. \begin{description}
  122. \item[\f{SCALOP A;} ] \index{SCALOP} declares \f{A} to be a scalar
  123. operator. This operator may
  124. carry an arbitrary number of arguments i.e.\ after the
  125. declaration: \f{ SCALOP A; }
  126. all kernels of the form e.g.\
  127. \f{A(J), A(1,N), A(N,L,M)}
  128. are recognized by the system as being scalar operators.
  129. \item[\f{VECOP V;} ] \index{VECOP} declares \f{V} to be a vector operator.
  130. As for scalar operators, the vector operators may carry an arbitrary
  131. number of arguments. For example \f{V(3)} can be used to represent
  132. the vector operator $\vec{V}_{3}$. Note that the dimension of space
  133. in which this operator lives is \underline{arbitrary}.
  134. One can however address a specific component of the
  135. vector operator by using a special index declared as \f{PHYSINDEX} (see
  136. below). This index must then be the first in the argument list
  137. of the vector operator.
  138. \item[\f{TENSOP C(3);} ] \index{TENSOP}
  139. declares \f{C} to be a tensor operator of rank 3. Tensor operators
  140. of any fixed integer rank larger than 1 can be declared.
  141. Again this operator may carry an arbitrary number of arguments
  142. and the space dimension is not fixed.
  143. The tensor
  144. components can be addressed by using special \f{PHYSINDEX} indices
  145. (see below) which have to be placed in front of all other
  146. arguments in the argument list.
  147. \item[\f{STATE U;} ] \index{STATE} declares \f{U} to be a state, i.e.\ an
  148. object on
  149. which operators have a certain action. The state U can also carry an
  150. arbitrary number of arguments.
  151. \item[\f{PHYSINDEX X;} ] \index{PHYSINDEX} declares \f{X} to be a special
  152. index which will be used
  153. to address components of vector and tensor operators.
  154. \end{description}
  155. It is very important to understand precisely the way how the type
  156. declaration commands work in order to avoid type mismatch errors when
  157. using the PHYSOP package. The following examples should illustrate the
  158. way the program interprets type declarations.
  159. Assume that the declarations listed above have
  160. been typed in by the user, then:
  161. \begin{description}
  162. \item[$\bullet$] \f{A,A(1,N),A(N,M,K)} are SCALAR operators.
  163. \item[$\bullet$] \f{V,V(3),V(N,M)} are VECTOR operators.
  164. \item[$\bullet$] \f{C, C(5),C(Y,Z)} are TENSOR operators of
  165. rank 3.
  166. \item[$\bullet$] \f{U,U(P),U(N,L,M)} are STATES.
  167. \item[BUT:] \f{V(X),V(X,3),V(X,N,M)} are all \underline{scalar}
  168. operators
  169. since the \underline{special index} \f{X} addresses a
  170. specific component
  171. of the vector operator (which is a scalar operator). Accordingly,
  172. \f{C(X,X,X)} is also a \underline{scalar} operator because
  173. the diagonal component $C_{xxx}$
  174. of the tensor operator \f{C} is meant here
  175. (C has rank 3 so 3 special indices must be used for the components).
  176. \end{description}
  177. In view of these examples, every time the following text
  178. refers to \underline{scalar} operators,
  179. it should be understood that this means not only operators defined by
  180. the
  181. \f{SCALOP} statement but also components of vector and tensor operators.
  182. Depending on the situation, in some case when dealing only with the
  183. components of vector or tensor operators it may be preferable to use
  184. an operator declared with \f{SCALOP} rather than addressing the
  185. components using several special indices (throughout the
  186. manual,
  187. indices declared with the \f{PHYSINDEX} command are referred to as special
  188. indices).
  189. Another important feature of the system is that
  190. for each operator declared using the statements described above, the
  191. system generates 2 additional operators of the same type:
  192. the \underline{adjoint} and the \underline{inverse} operator.
  193. These operators are accessible to the user for subsequent calculations
  194. without any new declaration. The syntax is as following:
  195. If \f{A} has been declared to be an operator (scalar, vector or tensor)
  196. the \underline{adjoint} operator is denoted \f{A!+} and the
  197. \underline{inverse}
  198. operator is denoted \f{A!-1} (an inverse adjoint operator \f{A!+!-1}
  199. is also generated).
  200. The exclamation marks do not appear
  201. when these operators are printed out by \REDUCE\ (except when the switch
  202. \f{NAT} is set to off)
  203. but have to be typed in when these operators are used in an input
  204. expression.
  205. An adjoint (but \underline{no} inverse) state is also
  206. generated for every state defined by the user.
  207. One may consider these generated operators as ''placeholders'' which
  208. means that these operators are considered by default as
  209. being completely independent of the original operator.
  210. Especially if some value is assigned to the original operator,
  211. this value is \underline{not} automatically assigned to the
  212. generated operators. The user must code additional assignement
  213. statements in order to get the corresponding values.
  214. Exceptions from these rules are (i) that inverse operators are
  215. \underline{always} ordered at the same place as the original operators
  216. and (ii) that the expressions \f{A!-1*A}
  217. and \f{A*A!-1} are replaced\footnote{This may not always occur in
  218. intermediate steps of a calculation due to efficiency reasons.}
  219. by the unit operator \f{UNIT} \index{UNIT}.
  220. This operator is defined
  221. as a scalar operator during the initialization of the PHYSOP package.
  222. It should be used to indicate
  223. the type of an operator expression whenever no other PHYSOP
  224. occur in it. For example, the following sequence: \\
  225. \begin{framedverbatim}
  226. SCALOP A;
  227. A:= 5;
  228. \end{framedverbatim}
  229. leads to a type mismatch error and should be replaced by: \\
  230. \begin{framedverbatim}
  231. SCALOP A;
  232. A:=5*UNIT;
  233. \end{framedverbatim}
  234. The operator \f{UNIT} is a reserved variable of the system and should
  235. not be used for other purposes.
  236. All other kernels (including standard \REDUCE\ operators)
  237. occurring in expressions are treated as ordinary scalar variables
  238. without any PHYSOP type (referred to as \underline{scalars} in the
  239. following).
  240. Assignement statements are checked to ensure correct operator
  241. type assignement on both sides leading to an error if a type
  242. mismatch occurs. However an assignement statement of the form
  243. \f{A:= 0} or \f{LET A = 0} is \underline{always} valid regardless of the
  244. type of \f{A}.
  245. Finally a command \f{CLEARPHYSOP} \index{CLEARPHYSOP}
  246. has been defined to remove
  247. the PHYSOP type from an identifier in order to use it for subsequent
  248. calculations (e.g. as an ordinary \REDUCE\ operator). However it should be
  249. remembered that \underline{no}
  250. substitution rule is cleared by this function. It
  251. is therefore left to the user's responsability to clear previously all
  252. substitution rules involving the identifier from which the PHYSOP type
  253. is removed.
  254. Users should be very careful when defining procedures or statements of
  255. the type \f{FOR ALL ... LET ...} that the PHYSOP type of all identifiers
  256. occurring in such expressions is unambigously fixed. The type analysing
  257. procedure is rather restrictive and will print out a ''PHYSOP type
  258. conflict'' error message if such ambiguities occur.
  259. \subsection{Ordering of operators in an expression}
  260. The ordering of kernels in an expression is performed according to
  261. the following rules: \\
  262. 1. \underline{Scalars} are always ordered ahead of
  263. PHYSOP \underline{operators} in an expression.
  264. The \REDUCE\ statement \f{KORDER} \index{KORDER} can be used to control the
  265. ordering of scalars but has \underline{no}
  266. effect on the ordering of operators.
  267. 2. The default ordering of \underline{operators} follows the
  268. order in which they have been declared (and \underline{not}
  269. the alphabetical one).
  270. This ordering scheme can be changed using the command \f{OPORDER}.
  271. \index{OPORDER}
  272. Its syntax is similar to the \f{KORDER} statement, i.e.\ coding:
  273. \f{OPORDER A,V,F;}
  274. means that all occurrences of the operator \f{A} are ordered ahead of
  275. those of \f{V} etc. It is also possible to include operators
  276. carrying
  277. indices (both normal and special ones) in the argument list of
  278. \f{OPORDER}. However including objects \underline{not}
  279. defined as operators (i.e. scalars or indices) in the argument list
  280. of the \f{OPORDER} command leads to an error.
  281. 3. Adjoint operators are placed by the declaration commands just
  282. after the original operators on the \f{OPORDER} list. Changing the
  283. place of an operator on this list means \underline{not} that the
  284. adjoint operator is moved accordingly. This adjoint operator can
  285. be moved freely by including it in the argument list of the
  286. \f{OPORDER} command.
  287. \subsection{Arithmetic operations on operators}
  288. The following arithmetic operations are possible with
  289. operator expressions: \\
  290. 1. Multiplication or division of an operator by a scalar.
  291. 2.Addition and substraction of operators of the \underline{same}
  292. type.
  293. 3. Multiplication of operators is only defined between two
  294. \underline{scalar} operators.
  295. 4. The scalar product of two VECTOR operators is implemented
  296. with a new function \f{DOT} \index{DOT}. The system expands
  297. the product of
  298. two vector operators into an ordinary product of the components of these
  299. operators by inserting a special index generated by the program.
  300. To give an example, if one codes: \\
  301. \begin{framedverbatim}
  302. VECOP V,W;
  303. V DOT W;
  304. \end{framedverbatim}
  305. the system will transform the product into: \\
  306. \begin{framedverbatim}
  307. V(IDX1) * W(IDX1)
  308. \end{framedverbatim}
  309. where \f{IDX1} is a \f{PHYSINDEX} generated by the system (called a DUMMY
  310. INDEX in the following) to express the summation over the components.
  311. The identifiers \f{IDXn} (\f{n} is
  312. a nonzero integer) are
  313. reserved variables for this purpose and should not be used for other
  314. applications. The arithmetic operator
  315. \f{DOT} can be used both in infix and prefix form with two arguments.
  316. 5. Operators (but not states) can only be raised to an
  317. \underline{integer} power. The system expands this power
  318. expression into a product of the corresponding number of terms
  319. inserting dummy indices if necessary. The following examples explain
  320. the transformations occurring on power expressions (system output
  321. is indicated with an \f{-->}): \\
  322. \begin{framedverbatim}
  323. SCALOP A; A**2;
  324. - --> A*A
  325. VECOP V; V**4;
  326. - --> V(IDX1)*V(IDX1)*V(IDX2)*V(IDX2)
  327. TENSOP C(2); C**2;
  328. - --> C(IDX3,IDX4)*C(IDX3,IDX4)
  329. \end{framedverbatim}
  330. Note in particular the way how the system interprets powers of
  331. tensor operators which is different from the notation used in matrix
  332. algebra.
  333. 6. Quotients of operators are only defined between
  334. \underline{scalar} operator expressions.
  335. The system transforms the quotient of 2 scalar operators into the
  336. product of the first operator times the inverse of the second one.
  337. Example\footnote{This shows how inverse operators are printed out when
  338. the switch \f{NAT} is on}: \\
  339. \begin{framedverbatim}
  340. SCALOP A,B; A / B;
  341. -1
  342. - --> A * B
  343. \end{framedverbatim}
  344. 7. Combining the last 2 rules explains the way how the system
  345. handles negative powers of operators: \\
  346. \noindent
  347. \begin{framedverbatim}
  348. SCALOP B;
  349. B**(-3);
  350. -1 -1 -1
  351. - --> B *B *B
  352. \end{framedverbatim}
  353. The method of inserting dummy indices and expanding powers of
  354. operators has been chosen to facilitate the handling of
  355. complicated operator
  356. expressions and particularly their application on states
  357. (see section 3.4.3). However it may be useful to get rid of these
  358. dummy indices in order to enhance the readability of the
  359. system's final output.
  360. For this purpose the switch \f{CONTRACT} \index{CONTRACT} has to
  361. be turned on (\f{CONTRACT} is normally set to \f{OFF}).
  362. The system in this case contracts over dummy indices reinserting the
  363. \f{DOT} operator and reassembling the expanded powers. However due to
  364. the predefined operator ordering the system may not remove all the
  365. dummy indices introduced previously.
  366. file).
  367. \subsection{Special functions}
  368. \subsubsection{Commutation relations}
  369. If 2 PHYSOPs have been declared noncommutative using the (redefined)
  370. \f{NONCOM} statement, it is possible to introduce in the environment
  371. \underline{elementary} (anti-) commutation relations between them. For
  372. this purpose,
  373. 2 \underline{scalar} operators \f{COMM} \index{COMM} and
  374. \f{ANTICOMM} \index{ANTICOMM} are available.
  375. These operators are used in conjunction with \f{LET} statements.
  376. Example: \\
  377. \begin{framedverbatim}
  378. SCALOP A,B,C,D;
  379. LET COMM(A,B)=C;
  382. FOR ALL X,Y LET COMM(V(X),W(Y))=U(Z);
  383. \end{framedverbatim}
  384. Note that if special indices are used as dummy variables in
  385. \f{FOR ALL ... LET} constructs then these indices should have been
  386. declared previously using the \f{PHYSINDEX} command.
  387. Every time the system
  388. encounters a product term involving 2
  389. noncommutative operators which have to be reordered on account of the
  390. given operator ordering, the list of available (anti-) commutators is
  391. checked in the following way: First the system looks for a
  392. \underline{commutation} relation which matches the product term. If it
  393. fails then the defined \underline{anticommutation} relations are
  394. checked. If there is no successful match the product term
  395. \f{A*B} is replaced by: \\
  396. \begin{framedverbatim}
  397. A*B;
  398. --> COMM(A,B) + B*A
  399. \end{framedverbatim}
  400. so that the user may introduce the commutation relation later on.
  401. The user may want to force the system to look for
  402. \underline{anticommutators} only; for this purpose a switch \f{ANTICOM}
  403. \index{ANTICOM}
  404. is defined which has to be turned on ( \f{ANTICOM} is normally set to
  405. \f{OFF}). In this case, the above example is replaced by: \\
  406. \begin{framedverbatim}
  407. ON ANTICOM;
  408. A*B;
  409. --> ANTICOMM(A,B) - B*A
  410. \end{framedverbatim}
  411. Once the operator ordering has been fixed (in the example above \f{B}
  412. has to be ordered ahead of \f{A}),
  413. there is \underline{no way} to prevent the
  414. system from introducing (anti-)commutators every time it encounters
  415. a product whose terms are not in the right order. On the other hand,
  416. simply by changing the \f{OPORDER} statement and reevaluating the
  417. expression one can change the operator ordering
  418. \underline{without}
  419. the need to introduce new commutation relations.
  420. Consider the following example: \\
  421. \begin{framedverbatim}
  423. LET COMM(A,B)=C;
  424. A*B;
  425. - --> B*A + C;
  426. OPORDER A,B;
  427. B*A;
  428. - --> A*B - C;
  429. \end{framedverbatim}
  430. The functions \f{COMM} and \f{ANTICOMM} should only be used to
  431. define
  432. elementary (anti-) commutation relations between single operators.
  433. For the calculation of (anti-) commutators between complex
  434. operator
  435. expressions, the functions \f{COMMUTE} \index{COMMUTE} and
  436. \f{ANTICOMMUTE} \index{ANTICOMMUTE} have been defined.
  437. Example (is included as example 1 in the test file): \\
  438. \begin{framedverbatim}
  439. VECOP P,A,K;
  441. FOR ALL X,Y LET COMM(P(X),A(Y))=K(X)*A(Y);
  442. COMMUTE(P**2,P DOT A);
  443. \end{framedverbatim}
  444. \subsubsection{Adjoint expressions}
  445. As has been already mentioned, for each operator and state defined
  446. using the declaration commands quoted in section 3.1, the system
  447. generates automatically the corresponding adjoint operator. For the
  448. calculation of the adjoint representation of a complicated
  449. operator expression, a function \f{ADJ} \index{ADJ} has been defined.
  450. Example\footnote{This shows how adjoint operators are printed out
  451. when the switch \f{NAT} is on}: \\
  452. \begin{framedverbatim}
  453. SCALOP A,B;
  454. ADJ(A*B);
  455. + +
  456. - --> A * B
  457. \end{framedverbatim}
  458. \subsubsection{Application of operators on states}
  459. For this purpose, a function \f{OPAPPLY} \index{OPAPPLY} has been
  460. defined.
  461. It has 2 arguments and is used in the following combinations: \\
  462. {\bf (i)} \f{LET OPAPPLY(}{\it operator, state}\f{) =} {\it state};
  463. This is to define a elementary
  464. action of an operator on a state in analogy to the way
  465. elementary commutation relations are introduced to the system.
  466. Example: \\
  467. \begin{framedverbatim}
  469. FOR ALL N,P LET OPAPPLY((A(N),U(P))= EXP(I*N*P)*U(P);
  470. \end{framedverbatim}
  471. {\bf (ii)} \f{LET OPAPPLY(}{\it state, state}\f{) =} {\it scalar exp.};
  472. This form is to define scalar products between states and normalization
  473. conditions.
  474. Example: \\
  475. \begin{framedverbatim}
  476. STATE U;
  478. \end{framedverbatim}
  479. {\bf (iii)} {\it state} \f{:= OPAPPLY(}{\it operator expression, state});
  480. In this way, the action of an operator expression on a given state
  481. is calculated using elementary relations defined as explained in {\bf
  482. (i)}. The result may be assigned to a different state vector.
  483. {\bf (iv)} \f{OPAPPLY(}{\it state}\f{, OPAPPLY(}{\it operator expression,
  484. state}\f{))}; This is the way how to calculate matrix elements of
  485. operator
  486. expressions. The system proceeds in the following way: first the
  487. rightmost operator is applied on the right state, which means that the
  488. system tries
  489. to find an elementary relation which match the application of the
  490. operator on the state. If it fails
  491. the system tries to apply the leftmost operator of the expression on the
  492. left state using the adjoint representations. If this fails also,
  493. the system prints out a warning message and stops the evaluation.
  494. Otherwise the next operator occuring in the expression is
  495. taken and so on until the complete expression is applied. Then the
  496. system
  497. looks for a relation expressing the scalar product of the two
  498. resulting states and prints out the final result. An example of such
  499. a calculation is given in the test file.
  500. The infix version of the \f{OPAPPLY} function is the vertical bar $\mid$
  501. . It is \underline{right} associative and placed in the precedence
  502. list just above the minus ($-$) operator.
  503. Some of the \REDUCE\ implementation may not work with this character,
  504. the prefix form should then be used instead\footnote{The source code
  505. can also be modified to choose another special character for the
  506. function}.
  507. \section{Known problems in the current release of PHYSOP}
  508. \indent {\bf (i)} Some spurious negative powers of operators
  509. may appear
  510. in the result of a calculation using the PHYSOP package. This is a
  511. purely ''cosmetic'' effect which is due to an additional
  512. factorization of the expression in the output printing routines of
  513. \REDUCE. Setting off the \REDUCE\ switch \f{ALLFAC} (\f{ALLFAC} is normally
  514. on)
  515. should make these
  516. terms disappear and print out the correct result (see example 1
  517. in the test file).
  518. {\bf (ii)} The current release of the PHYSOP package is not optimized
  519. w.r.t. computation speed. Users should be aware that the evaluation
  520. of complicated expressions involving a lot of commutation relations
  521. requires a significant amount of CPU time \underline{and} memory.
  522. Therefore the use of PHYSOP on small machines is rather limited. A
  523. minimal hardware configuration should include at least 4 MB of
  524. memory and a reasonably fast CPU (type Intel 80386 or equiv.).
  525. {\bf (iii)} Slightly different ordering of operators (especially with
  526. multiple occurrences of the same operator with different indices)
  527. may appear in some calculations
  528. due to the internal ordering of atoms in the underlying LISP system
  529. (see last example in the test file). This cannot be entirely avoided
  530. by the package but does not affect the correctness of the results.
  531. \section{Compilation of the packages}
  532. To build a fast loading module of the NONCOM2 package, enter the
  533. following commands after starting the \REDUCE\ system: \\
  534. \begin{framedverbatim}
  535. faslout "noncom2";
  536. in "";
  537. faslend;
  538. \end{framedverbatim}
  539. To build a fast loading module of the PHYSOP package, enter the
  540. following commands after starting the \REDUCE\ system: \\
  541. \begin{framedverbatim}
  542. faslout "physop";
  543. in "";
  544. in "";
  545. faslend;
  546. \end{framedverbatim}
  547. Input and output file specifications may change according to the
  548. underlying operating system. \\
  549. On PSL--based systems, a spurious message: \\
  550. \begin{framedverbatim}
  551. *** unknown function PHYSOP!*SQ called from compiled code
  552. \end{framedverbatim}
  553. may appear during the compilation of the PHYSOP package. This warning
  554. has no effect on the functionality of the package.
  555. \section{Final remarks}
  556. The package PHYSOP has been presented by
  557. the author at the IV inter. Conference on Computer Algebra in Physical
  558. Research, Dubna (USSR) 1990 (see M. Warns, {\it
  559. Software Extensions of \REDUCE\ for Operator Calculus in Quantum Theory},
  560. Proc.\ of the IV inter.\ Conf.\ on Computer Algebra in Physical
  561. Research, Dubna 1990, to appear). It has been developed with the aim in
  562. mind to perform calculations of the type exemplified in the test file
  563. included in the distribution of this package.
  564. However it should
  565. also be useful in some other domains like e.g.\ the calculations of
  566. complicated Feynman diagrams in QCD which could not be performed using
  567. the HEPHYS package. The author is therefore grateful for any
  568. suggestion
  569. to improve or extend the usability of the package. Users should not
  570. hesitate to contact the author for additional help and explanations on
  571. how to use
  572. this package. Some bugs may also
  573. appear which have not been discovered during the tests performed
  574. prior to the release of this version. Please send in this case to the
  575. author a short
  576. input and output listing displaying the encountered problem.
  577. \section*{Acknowledgements}
  578. The main ideas for the implementation of a new data type in the \REDUCE\
  579. environnement have been taken from the VECTOR package developed by
  580. Dr.\ David Harper (D. Harper, Comp.\ Phys.\ Comm.\ {\bf 54} (1989)
  581. 295).
  582. Useful discussions with Dr.\ Eberhard Schr\"ufer and
  583. Prof.\ John Fitch are also gratefully acknowledged.
  584. \appendix
  585. \section{List of error and warning messages}
  586. In the following the error (E) and warning (W) messages specific to the
  587. PHYSOP package are listed.
  588. \begin{description}
  589. \item[\f{cannot declare} {\it x}\f{ as }{\it data type}] (W):
  590. An attempt has been made to declare an
  591. object {\it x} which cannot be used as a PHYSOP operator of the
  592. required type. The declaration command is ignored.
  593. \item [{\it x} \f{already defined as} {\it data type}] (W): The object
  594. {\it x} has already been declared using a \REDUCE\ type declaration
  595. command and can therefore not be used as a PHYSOP operator.
  596. The declaration command is ignored.
  597. \item [{\it x} \f{already declared as} {\it data type}] (W): The object
  598. \f{x} has already been declared with a PHYSOP declaration command.
  599. The declaration command is ignored.
  600. \item[{\it x} \f{is not a PHYSOP}] (E): An invalid argument has been
  601. included in an \f{OPORDER} command. Check the arguments.
  602. \item[\f{invalid argument(s) to }{\it function}] (E): A
  603. function implemented by the PHYSOP package has been called with an
  604. invalid argument. Check type of arguments.
  605. \item[\f{Type conflict in }{\it operation}] (E): A PHYSOP type conflict
  606. has occured during an arithmetic operation. Check the arguments.
  607. \item [\f{invalid call of }{\it function} \f{with args:} {\it arguments}]
  608. (E): A function
  609. of the PHYSOP package has been declared with invalid argument(s). Check
  610. the argument list.
  611. \item[\f{type mismatch in} {\it expression}] (E): A type mismatch has
  612. been detected in an expression. Check the corresponding expression.
  613. \item[\f{type mismatch in} {\it assignement}] (E): A type
  614. mismatch has been detected in an assignment or in a \f{LET}
  615. statement. Check the listed statement.
  616. \item[\f{PHYSOP type conflict in} {\it expr}] (E): A ambiguity has been
  617. detected during the type analysis of the expression. Check the
  618. expression.
  619. \item[\f{operators in exponent cannot be handled}] (E): An operator has
  620. occurred in the exponent of an expression.
  621. \item[\f{cannot raise a state to a power}] (E): states cannot be
  622. exponentiated by the system.
  623. \item[\f{invalid quotient}] (E): An invalid denominator has occurred in a
  624. quotient. Check the expression.
  625. \item[\f{physops of different types cannot be commuted}] (E): An invalid
  626. operator has occurred in a call of the \f{COMMUTE}/\f{ANTICOMMUTE} function.
  627. \item[\f{commutators only implemented between scalar operators}] (E):
  628. An invalid operator has occurred in the call of the
  629. \f{COMMUTE}/\f{ANTICOMMUTE} function.
  630. \item[\f{evaluation incomplete due to missing elementary relations}] (W):
  631. \\
  632. The system has not found all
  633. the elementary commutators or application relations necessary to
  634. calculate or reorder the input expression. The result may however be
  635. used for further calculations.
  636. \end{description}
  637. \section{List of available commands}
  638. \printindex
  639. \end{document}