MyNixOS website logo
Description

The Weyl Algebra.

A suite of routines for Weyl algebras. Notation follows Coutinho (1995, ISBN 0-521-55119-6, "A Primer of Algebraic D-Modules"). Uses 'disordR' discipline (Hankin 2022 <doi:10.48550/ARXIV.2210.03856>). To cite the package in publications, use Hankin 2022 <doi:10.48550/ARXIV.2212.09230>.

Weyl algebra in R

To cite the weyl package in publications please use Hankin 2022. The weyl package provides R-centric functionality for working with Weyl algebras of arbitrary dimension. A detailed vignette is provided in the package.

The Weyl algebra is a noncommutative algebra which is used in quantum mechanics and the theory of differential equations (Coutinho 1997). The weyl package offers a consistent and documented suite of R-centric software. It is based on the spray package for sparse arrays for computational efficiency.

The Weyl algebra is arguably the simplest noncommutative algebra and is useful in quantum mechanics. It is isomorphic to the quotient ring of the free algebra on two elements \left\lbrace X,Y\right\rbrace over the ideal generated by XY=YX+1. The weyl package implements this and also the n-th Weyl algebra.

One usually writes the Weyl algebra in terms of operators x,\partial where x means multiply by x and \partial means differentiate with respect to x. We find that \partial x-x\partial=1.

The Weyl algebra is also known as the symplectic Clifford algebra.

Installation

You can install the released version of the weyl package from CRAN with:

# install.packages("weyl")  # uncomment this to install the package
library("weyl")
set.seed(0)

The weyl package in use

The basic creation function is weyl(), which takes a spray object and returns a member of the Weyl algebra.

S <- spray(rbind(c(1,0,0,1,1,0),c(0,1,1,3,2,0)) ,1:2)
S
#>                  val
#>  0 1 1 3 2 0  =    2
#>  1 0 0 1 1 0  =    1

Above, object S is a standard spray object but to work with Weyl algebra we need to coerce it to a weyl object with weyl():

W <- weyl(S)
W
#> A member of the Weyl algebra:
#>   x  y  z dx dy dz     val
#>   0  1  1  3  2  0  =    2
#>   1  0  0  1  1  0  =    1

Above, object W is a member of the third Weyl algebra: that is, the algebra generated by \left\lbrace x,y,z,\partial_x,\partial_y,\partial_z\right\rbrace. In this case W=x\partial_x\partial_y + 2yz\partial_x^3\partial_y^2. In other words Wf=x\frac{\partial^2f}{\partial x\partial y} + 2yz\frac{\partial^5f}{\partial x^3\partial y^2}.

We might ask what WWf is, and this is easy in the package:

Wsquared <- W*W
Wsquared
#> A member of the Weyl algebra:
#>   x  y  z dx dy dz     val
#>   0  2  2  6  4  0  =    4
#>   0  1  2  6  3  0  =    8
#>   0  1  1  3  3  0  =    6
#>   1  1  1  4  3  0  =    4
#>   2  0  0  2  2  0  =    1
#>   1  0  1  4  2  0  =    2
#>   1  0  0  1  2  0  =    1

This is a more complicated operator. However, we might wish to display it in symbolic form:

options(polyform=TRUE)
Wsquared
#> A member of the Weyl algebra:
#> +4*y^2*z^2*dx^6*dy^4 +8*y*z^2*dx^6*dy^3 +6*y*z*dx^3*dy^3
#> +4*x*y*z*dx^4*dy^3 +x^2*dx^2*dy^2 +2*x*z*dx^4*dy^2 +x*dx*dy^2

References

Further information

For more detail, see the package vignette

vignette("weyl")

Metadata

Version

0.0-4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows