MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: von Neumann entropy

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43153] Re: von Neumann entropy
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Thu, 14 Aug 2003 07:06:38 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <bhd9nn$rpk$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <bhd9nn$rpk$1 at smc.vnet.net>,
 Chad Junkermeier <cej38 at email.byu.edu> wrote:

> I have been trying to use Mathematica to compute the von Neumann entropy 
> of a density matrix and have run into trouble with telling Mathematica 
> to use a particular definition in the calculation.
> 
> The von Neumann entropy is defined as
> 
> S =  -Tr [ rho Ln (rho)],
> 
> where rho is a square matrix.  

Are you sure that this definition, as written, is correct for matrices 
(as opposed to operators)? How is the multiplication of the matrices rho 
and Log[rho] to be interpreted (element-by-element, as written, or 
matrix multiplication using Dot)?

> The problem is how to handle the case when and element of the matrix rho is zero.  I want to tell Mathematica 
> to assume that
> 
> 0 * Ln(0) = 0
> 
> when it is computing the entropy.  How do I tell it to make that 
> assumption?

You can avoid this problem altogether. The definition I'm familiar with 
gives the von Neumann entropy as a sum over the eigenvalues, r, of rho:

  r = Eigenvalues[rho];

  S = - Sum[r[[i]] Log[r[[i]]],{i,Length[r]}]

which can be implemented more elegantly as

  S = - r . Log[r]

rho should be positive definite, so all the eigenvalues will be positive 
and there should be no errors.

Note that, in general, this will _not_ give the same result as

  S =  -Tr[rho Log[rho]]

Cheers,
Paul

-- 
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: RE: Don't want similar symbols to match pattern
  • Next by Date: AnimationCycleRepetitions
  • Previous by thread: Re: von Neumann entropy
  • Next by thread: Re: Re: von Neumann entropy