12

Can anybody recommend a good introduction book on Monte Carlo algorithms in c++? Preferably with applications to physics, and even more preferably, the kind of physics being quantum mechanics.

Thanks!

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
trolle3000
  • 1,067
  • 2
  • 14
  • 27
  • 2
    You are probably better off removing the C++ requirement - perhaps make it C or C++. –  Jan 26 '10 at 20:41
  • 2
    Monte carlo algorithms (and algorithms in general) are usually best expressed in language-agnostic pseudocode so that the implementer can easily translate them into his/her language of choce. – dsimcha Jan 26 '10 at 20:44
  • There's lots to know about doing numerics in general, and specifically in C++, but that's not really specific to Monte Carlo techniques. One library to look at, because you'll probably end up using it a lot, is CGAL: http://www.cgal.org/ – Andrew McGregor Jan 26 '10 at 21:58
  • +1 for leading me to wiki a new way to waste time with a deck of cards – iandisme Jan 26 '10 at 22:51

7 Answers7

6

You can have a look at Morten Hjorth-Jensen's Lecture Notes on Computational Physics (pdf file, 5.3 MB), University of Oslo (2009), chapters 8-11 (especially chapter 11, on Quantum Monte Carlo).

However, you should make sure you are not trying to learn too many things at the same time (Monte Carlo, C++, quantum mechanics). There are very good references (or introductory books) for each one of those topics separately.

dexter04
  • 123
  • 6
Alexandros Gezerlis
  • 2,221
  • 16
  • 21
  • 1
    Those lecture notes look great! And free is a good price. Good point about learning many things at once - I should know the QM by know, so it'll *only* be c++ and monte carlo ;-) – trolle3000 Jan 27 '10 at 06:56
2

Numerical Recipes in C (or C++ now!).

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
  • 4
    Personally I think those books are awful. Keep in mind the copyright on the source code is rather restrictive. Here's a balanced view: http://www.astro.gla.ac.uk/users/norman/star/sc13/sc13.htx/N-a2b3c1.html. – jason Jan 26 '10 at 20:54
  • Jason: I pretty much agree with that assessment. NR is a starting point for academic uses. I'm assuming OP is not writing commercial software. – i_am_jorf Jan 26 '10 at 22:06
  • No, it's not commercial, I'm writing an undergrad project in physics – trolle3000 Jan 27 '10 at 06:59
2

If you don't mind a book with a finance slant to it, my initial assessment of Monte Carlo Frameworks: Building Customisable High-Performance C++ Applications is very positive.

jason
  • 236,483
  • 35
  • 423
  • 525
2

It isn't a book just on Monte Carlo methods or just about C++, but a good book about general computational physics that has a few chapters on Monte Carlo methods including quantum Monte Carlo is Computational Physics by J.M. Thijssen.

Also, one good package for some Monte Carlo simulations is the ALPS Project. All of the codes are written in C++. The ALPS Project also has a program in it for Density Renormalization Group theory which is a great method mostly for 1D lattice simulations. These are more for simulations on lattices though and I don't know what sort of quantum simulations you are looking to do.

Justin Peel
  • 46,722
  • 6
  • 58
  • 80
1

Look for Radford Neal's Markov Chain Monte Carlo lecture notes.

anon
  • 41,035
  • 53
  • 197
  • 293
1

Jerome Spanier and Ely M. Gelbard wrote a book many years ago called "Monte Carlo Principles and Neutron Transport Problems," which has been released for ~$12 in the last year or so. Jun Liu wrote a good book several years ago, but it's more of a statistician approach to use MC and MCMC. Lots of good material in there though with some advanced applications. I have a paperback version that I picked up for ~$30.

Jeff
  • 33
  • 7
0

Why not using C# instead ?

I would recommend you the book of George Levy http://www.amazon.fr/Computational-Finance-Using-C/dp/0750669195. This book deals with financial mathematics and so with Monte-Carlo methods..

Beer4All
  • 183
  • 1
  • 7