### Quantum Commutation Rules...

Quantum Commutation Rules Basics

Pascal Szriftgiser1 and Edgardo S. Cheb-Terrab2

(1) Laboratoire PhLAM, UMR CNRS 8523, Université Lille 1, F-59655, France

(2) Maplesoft

In Quantum Mechanics, in the coordinates representation, the component of the momentum operator along the x axis is given by the differential operator

The purpose of the exercises below is thus to derive the commutation rules, in the coordinates representation, between an arbitrary function of the coordinates and the related momentum, departing from the differential representation

These two exercises illustrate how to have full control of the computational process by using different elements of the Maple language, including inert representations of abstract vectorial differential operators, Hermitian operators, algebra rules, etc.

These exercises also illustrate a new feature of the Physics package, introduced in Maple 2017, that is getting refined (the computation below requires the Maplesoft updates of the Physics package) which is the ability to perform computations algebraically, using the product operator, but with differential operators, and transform the products into the application of the operators only when we want that, as we do with paper and pencil.

 >

Start setting the problem:

 – all of are Hermitian operators
 – all of  commute between each other
 – tell the system only that the operators  are the differentiation variables of the corresponding (differential) operators  but do not tell what is the form of the operators

 >
 (1.1)

Assuming  is a smooth function, the idea is to apply the commutator  to an arbitrary ket of the Hilbert space , perform the operation explicitly after setting a differential operator representation for , and from there get the commutation rule between  and .

Start introducing the commutator, to proceed with full control of the operations we use the inert form %Commutator

 >
 >
 (1.2)
 >
 (1.3)

For illustration purposes only (not necessary), expand this commutator

 >
 (1.4)

Note that  ,  and the ket  are operands in the products above and that they do not commute: we indicated that the coordinates  are the differentiation variables of . This emulates what we do when computing with these operators with paper and pencil, where we represent the application of a differential operator as a product operation.

This representation can be transformed into the (traditional in computer algebra) application of the differential operator when desired, as follows:

 >
 (1.5)

Note that, in , the application of  is not expanded: at this point nothing is known about   , it is not necessarily a linear operator. In the Quantum Mechanics problem at hands, however, it is. So give now the operator   an explicit representation as a linear vectorial differential operator (we use the inert form %Nabla, , to be able to proceed with full control one step at a time)

 >
 (1.6)

The expression (1.5) becomes

 >
 (1.7)

Activate now the inert operator  and simplify taking into account the algebra rules for the coordinate operators

 >
 (1.8)

To make explicit the gradient in disguise on the right-hand side, factor out the arbitrary ket

 >
 (1.9)

Combine now the expanded gradient into its inert (not-expanded) form

 >
 (1.10)

Since (1.10) is true for all, this ket can be removed from both sides of the equation. One can do that either taking coefficients (see Coefficients ) or multiplying by the "formal inverse" of this ket, arriving at the (expected) form of the commutation rule between  and

 >
 (1.11)

Tensor notation,

The computation rule for position and momentum, this time in tensor notation, is performed in the same way, just that, additionally, specify that the space indices to be used are lowercase latin letters, and set the relationship between the differential operators and the coordinates directly using tensor notation.

You can also specify that the metric is Euclidean, but that is not necessary: the default metric of the Physics package, a Minkowski spacetime, includes a 3D subspace that is Euclidean, and the default signature, (- - - +), is not a problem regarding this computation.

 >
 >
 (2.1)

Define now the tensor

 >
 (2.2)

Introduce now the Commutator, this time in active form, to show how to reobtain the non-expanded form at the end by resorting the operands in products

 >
 (2.3)

Expand first (not necessary) to see how the operator  is going to be applied

 >
 (2.4)

Now expand and directly apply in one ago the differential operator

 >
 (2.5)

Introducing the explicit differential operator representation for , here again using the inert  to keep control of the computations step by step

 >
 (2.6)

The expanded and applied commutator (2.5) becomes

 >
 (2.7)

Activate now the inert operators  and simplify taking into account Einstein's rule for repeated indices

 >
 (2.8)

Since the ket  is arbitrary, we can take coefficients (or multiply by the formal Inverse  of this ket as done in the previous section). For illustration purposes, we use   Coefficients  and note hwo it automatically expands the commutator

 >
 (2.9)

One can undo this (frequently undesired) expansion of the commutator by sorting the products on the left-hand side using the commutator between  and

 >
 (2.10)

And that is the result we wanted to compute.

Additionally, to see this rule in matrix form,

 >
 (2.11)

In the above, we use equation (2.10) multiplied by -1 to avoid a minus sign in all the elements of (2.11), due to having worked with the default signature (- - - +); this minus sign is not necessary if in the Setup at the beginning one also sets

For display purposes, to see this matrix expressed in terms of the geometrical components of the momentum  , redefine the tensor  explicitly indicating its Cartesian components

 >
 (2.12)
 >
 (2.13)

Finally, in a typical situation, these commutation rules are to be taken into account in further computations, and for that purpose they can be added to the setup via

 >
 (2.14)

For example, from herein computations are performed taking into account that

 >
 (2.15)
 >

Download DifferentialOperatorCommutatorRules.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

### 2048 Game recreated in Maple

As my first project as a Junior Applications Developer, I set out to learn to code in the best way I know how, by doing.  I ended up picking what was probably one of the hardest options I could pick, namely to replicate the sliding puzzle game, 2048. (https://en.wikipedia.org/wiki/2048_(video_game) ) Of course I didn’t realize how hard it would be at the time, but after spending the first week alone working on the logic, I had already dug my hole.

2048, the sliding puzzle game, basically starts with a 4x4 grid filled with zeros. As you swipe the grid, values move toward one of the up, down, left or right sides. With every subsequent swipe, a randomly placed value of 2 or 4 is added to the grid. Any neighbouring matching values in the direction of the swipe are added to one another. This was done by swiping 2 tiles of equal value into each other, creating a new tile with double the value. Two 2 tiles became a 4, two 4’s an 8, and so on.

The goal? To create a 2048 tile.

Overall the logic was probably the most challenging part of my task, once the framework was set. . The logic consisted of many if statements that made the numbers “slide” properly, ie not combining with another number. This was probably the hardest part. Troubleshooting and allowing for all the possible conditions also proved difficult. However, the user interface was probably the toughest part, figuring out the labels, making everything display correctly, and programming all the buttons to not break. That was fun.

Anyway, it was a really fun project to work on, and I’m extremely happy for how it turned out, and I hope you enjoy playing it, as much as I did making it!

You can try it out here:

https://maple.cloud/#doc=5765606839156736

## Finding a numerical solution to a system of nonlinear...

Maple asked by November 17

## How do I draw contour plot of the function in...

asked by November 17

## foldl for sequence

Maple asked by Today

## equation value display format

Maple 2015 asked by Yesterday

## Generalising to arbitrary curvilinear orthogonal...

Maple asked by Yesterday

asked by Today

## How I can plot function y versus A?

Maple 2017 asked by Today

## How do we reverse the order of these two factors...

Maple 13 asked by Yesterday

## Is there a command that will place single left...

Maple 13 asked by November 17

## How do we get the single quotes off a quoted numbe...

asked by November 17

## Anaglyph or stereo image

Maple asked by November 17

## Why is this happening in Maple?

Maple 13 asked by November 17
﻿