[Numpy-discussion] One question about the numpy.linalg.eig() routine
Tue Apr 3 13:09:59 CDT 2012
Interesting. I happen to know a little bit about Berry's phase
The latter one knocks out all point groups.
Probably you want to do something different, I cared about eigenvalues only
(BTW my Hamiltonians were carefully crafted).
PS I doubt anybody on this list cares to hear more about Berry's phase,
should take this discussion off-line
2012/4/3 Hongbin Zhang <firstname.lastname@example.org>
> Hej Val,
> Thank you very much for your replies.
> Yes, I know that both eigenvectors are correct while they are indeed
> to each other by unitary transformations (unitary matrices).
> Actually, what I am trying to do is to evaluate the Berry phase which is
> closely related to the gauge chosen. It is okay to apply an arbitrary
> phase to the eigenvectors, while to get the (meaningful) physical quantity
> the phase should be consistent for all the other eigenvectors.
> To my understanding, if I run both Fortran and python on the same computer,
> they should have the same phase (that is the arbitrary phase is
> computer-dependent). Maybe some additional "rotations" have been performed
> but should this be written/commented somewhere in the man page?
> I will try to fix this by performing additional rotation to make the
> elements real and check whether this is the solution or not.
> Thank you all again, a nd of course more insightful suggestions are
> Ad hoc, ad loc
> and quid pro quo
> &n bsp;
> --- Jeremy Hilary Boob
> Date: Mon, 2 Apr 2012 22:19:55 -0500
> From: email@example.com
> To: firstname.lastname@example.org
> Subject: Re: [Numpy-discussion] One question about the numpy.linalg.eig()
> BTW this extra degree of freedom can be used to "rotate" the eigenvectors
> along the unit circle (multiplication by exp(j*phi)). To those of physical
> it should remind of gauge fixing (vector potential in EM/QM).
> These "rotations" can be used to make one (any) non-zero component of each
> eigenvector be positive real number.
> Finally to the point: it seems that numpy.linalg.eig uses these
> "rotations" to turn the
> diagonal elements in the eigenvector matrix to real positive numbers,
> that's why the numpy solutions looks neat.
> PS Probably nobody cares to know, but the phase factor I gave in my 1st
> email should be negated:
> On Mon, Apr 2, 2012 at 8:53 PM, Matthew Brett <email@example.com>wrote:
> On Mon, Apr 2, 2012 at 5:38 PM, Val Kalatsky <firstname.lastname@example.org> wrote:
> > Both results are correct.
> > There are 2 factors that make the results look different:
> > 1) The order: the 2nd eigenvector of the numpy solution corresponds to
> > 1st eigenvector of your solution,
> > note that the vectors are written in columns.
> > 2) The phase: an eigenvector can be multiplied by an arbitrary phase
> > with absolute value = 1.
> > As you can see this factor is -1 for the 2nd eigenvector
> > and -0.99887305445887753-0.047461785427773337j for the other one.
> Thanks for this answer; for my own benefit:
> Definition: A . v = L . v where A is the input matrix, L is an
> eigenvalue of A and v is an eigenvector of A.
> In : A = [[0.6+0.0j,
> -1.97537668-0.09386068j],[-1.97537668+0.09386068j, -0.6+0.0j]]
> In : L, v = np.linalg.eig(A)
> In : np.allclose(np.dot(A, v), L * v)
> Out: True
> NumPy-Discussion mailing list
> _______________________________________________ NumPy-Discussion mailing
> list NumPy-Discussion@scipy.org
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion