Linked Questions

6
votes
1answer
2k views

How to implement ladder operators for quantum harmonic oscillator?

I would like to write the annihilation and creation operators for the harmonic oscillator, and see how they act on basis states of the form $\lvert n\rangle$. What's the best approach to implement ...
11
votes
1answer
943 views

Sorting function for non commuting bosons

I am trying to write a sorting function which will sort expressions involving products of bosonic objects which do not commute. For example, I can have objects like $a,\ a^\dagger,\ b,\ b^\dagger$ ...
5
votes
1answer
850 views

Normal ordering in Mathematica

I want to create a function which normally orders a string of field operators. Consider the following: $$\langle0\vert\hat{a}(k_n) \cdots \hat{a}(k_2)\hat{a}(k_1)\hat{a}^\dagger(k_1)\hat{a}^\dagger(...
3
votes
1answer
598 views

A product for fermionic variables

I'm trying to write a dot product that can handle fermionic variables, i.e., let $a,b$ be fermionic variables, $a\, b=-b\, a$. There is already a package that can handle fermionic+bosonic variables, ...
0
votes
3answers
398 views

Calculating bracket operations [closed]

Is there a way to calculate commutation relations in Mathematica? For example, let's say I want to compute ; how can this be done?
1
vote
1answer
97 views

Rearrange the list with some rules

I am trying to solve physic problem on operators which are not commute. However, I am not good at coding, so I am having some problem with Mathematica code. Let's define my list such that ...
2
votes
1answer
42 views

NonCommutativeMultiply question- syntax question

if I define id as: id /: NonCommutativeMultiply[id, x_] := x id /: NonCommutativeMultiply[y_, id] := y then ...
1
vote
1answer
55 views

normal ordering of Bose operators

Suppose I have lot of product terms of Bose operators, e.g: ...
2
votes
1answer
51 views

grouping common powers of Bose operators

I compute a product of Bose operators and turn it into normal ordering using Boson commutation relations, e.g: ...
0
votes
0answers
34 views

Simplifying expression involving Boson operators

I want to do calculations involving Boson operators $a(k), a^{\dagger}(k)$, e.g $(x + a(k))(y+a^{\dagger}(k))$. My code is: ...