Hi

A lecturer returned a year after we posted some
messagses, resulting in some bugs identified, 
some fixed and some still open.

The Quantum Spin Chain course repeated now on sage 4.2.1,
still computing eigenmatrix'es and involving complex numbers. 
We try to isolate the problems clearly here:

History

http://groups.google.com/group/sage-support/browse_thread/thread/2aa691129fdca1d3
http://trac.sagemath.org/sage_trac/ticket/4725
http://trac.sagemath.org/sage_trac/ticket/4726
http://trac.sagemath.org/sage_trac/ticket/4727

http://groups.google.com/group/sage-support/browse_thread/thread/9f2ee99b8da95c6
http://trac.sagemath.org/sage_trac/ticket/4834

Current status

0 j...@capetown:~$sage
----------------------------------------------------------------------
| Sage Version 4.2, Release Date: 2009-10-24                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
Loading Sage library. Current Mercurial branch is: AIMS-autosave-patch
sage: py=matrix([[0,-I],[I,0]]) # matrix contains I
sage: py.eigenmatrix_right() # does not work because of I
/home/jan/.sage/temp/capetown/27537/_home_jan__sage_init_sage_0.py:1: 
UserWarning: Using generic algorithm for an inexact ring, which may result in 
garbage from numerical precision issues.
  # -*- coding: utf-8 -*-
/home/jan/.sage/temp/capetown/27537/_home_jan__sage_init_sage_0.py:1: 
UserWarning: Using generic algorithm for an inexact ring, which will probably 
give incorrect results due to numerical precision issues.
  # -*- coding: utf-8 -*-
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/jan/.sage/temp/capetown/27537/_home_jan__sage_init_sage_0.py in <module>()

/usr/local/src/sage-4.2/local/lib/python2.6/site-packages/sage/matrix/matrix2.so
 in sage.matrix.matrix2.Matrix.eigenmatrix_right (sage/matrix/matrix2.c:23778)()

/usr/local/src/sage-4.2/local/lib/python2.6/site-packages/sage/matrix/matrix2.so
 in sage.matrix.matrix2.Matrix.eigenmatrix_left (sage/matrix/matrix2.c:23463)()

/usr/local/src/sage-4.2/local/lib/python2.6/site-packages/sage/matrix/matrix2.so
 in sage.matrix.matrix2.Matrix.eigenvectors_left (sage/matrix/matrix2.c:22794)()

/usr/local/src/sage-4.2/local/lib/python2.6/site-packages/sage/matrix/matrix2.so
 in sage.matrix.matrix2.Matrix.eigenspaces_left (sage/matrix/matrix2.c:21406)()

TypeError: degree() takes exactly one argument (0 given)
sage: 
sage: K.<j>=QQ[sqrt(-1)]
sage: j
I
sage: newpy=matrix([[0,-j],[j,0]])
sage: newpy.eigenmatrix_right() # now it works

([ 1  0]
[ 0 -1], [ 1  1]
[ I -I])
sage: pysquare=py*py; pysquare

[1 0]
[0 1]
sage: newpysquare= newpy*newpy; newpysquare

[1 0]
[0 1]
sage: v1=vector([1,1]);v1
(1, 1)
sage: v2=vector([1,-1]);v2
(1, -1)
sage: var('a')
a
sage: pysquare*(v1+a*v2) # This works OK
(a + 1, -a + 1)
sage: newpysquare*(v1+a*v2) # But the same thing with the square of newpy does 
NOT work
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/jan/.sage/temp/capetown/27537/_home_jan__sage_init_sage_0.py in <module>()

/usr/local/src/sage-4.2/local/lib/python2.6/site-packages/sage/structure/element.so
 in sage.structure.element.Matrix.__mul__ (sage/structure/element.c:13683)()

/usr/local/src/sage-4.2/local/lib/python2.6/site-packages/sage/structure/coerce.so
 in sage.structure.coerce.CoercionModel_cache_maps.bin_op 
(sage/structure/coerce.c:7021)()

TypeError: unsupported operand parent(s) for '*': 'Full MatrixSpace of 2 by 2 
dense matrices over Number Field in I with defining polynomial x^2 + 1' and 
'Vector space of dimension 2 over Symbolic Ring'
sage: 




regards,
Jan
-- 
   .~. 
   /V\     Jan Groenewald
  /( )\    www.aims.ac.za
  ^^-^^ 

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to