Linked Questions

12 votes
1 answer
5k views

How to implement ladder operators for the 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 ...
0x90's user avatar
  • 599
11 votes
1 answer
1k 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$ ...
Bilentor's user avatar
  • 515
6 votes
1 answer
1k 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(...
Sid's user avatar
  • 987
4 votes
1 answer
1k 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, ...
CGH's user avatar
  • 96
1 vote
3 answers
644 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?
yasiren's user avatar
  • 21
1 vote
1 answer
102 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 ...
Saesun Kim's user avatar
  • 1,820
1 vote
1 answer
162 views

normal ordering of Bose operators

Suppose I have lot of product terms of Bose operators, e.g: ...
geom's user avatar
  • 678
0 votes
0 answers
184 views

Is it possible to perform the following computation in mathematica?

Consider the following defined commutation relations: $$[\hat a,\hat a^{\dagger}]=1$$ $$[\hat b,\hat b^{\dagger}]=1$$ $$[\hat a,\hat b]=0$$ (where the usual algebra of commutators holds) Let us now ...
Lost's user avatar
  • 226
2 votes
1 answer
52 views

NonCommutativeMultiply question- syntax question

if I define id as: id /: NonCommutativeMultiply[id, x_] := x id /: NonCommutativeMultiply[y_, id] := y then ...
geom's user avatar
  • 678
2 votes
1 answer
74 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: ...
geom's user avatar
  • 678
0 votes
0 answers
92 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: ...
geom's user avatar
  • 678