How to write an array depending of an parameter in python, for example the number operator

Viewed 22

I want to diagonalize the following Hamiltonian:

lambda is a parameter. b and b^+ are the lowering and rising operators respectively, i.e, their egeinvalue equations are given by:

enter image description here

I wanto to write the Matrix elements of b, b^+, b^2 and (b^+ )^2 into an array to an "n" given. For example, for n = 5

enter image description here

0 Answers
Related