From: Daniel V. <dan...@ya...> - 2024-10-18 18:11:20
|
Hi Eric, I'm making progress.I'm still on qm-examples-1.wxm comparing to qm-examples-1.wxmx The first cell:k: ket([a]); => |[a]> it is OK b: bra([b]); => <[b]| it is OK b . k; => braket(<[b]|,|[a]>) in your file it is kron_delta(a,b) The second cell is identicalL: makelist( concat(c,i), i, 5 );apply('declare,[L,complex])$facts(); The third cell:k: sum( concat(c,i)*ket([i]),i,1,5); => |[5]>*c5+|[4]>*c4+|[3]>*c3+|[2]>*c2+|[1]>*c1 it is OK b: dagger(k); => on your output all the conjugates have an overbar, in my output it is conjugate <[5]|*conjugate(c5)+<[4]|*conjugate(c4)+<[3]|*conjugate(c3)+<[2]|*conjugate(c2)+<[1]|*conjugate(c1) then:b . k; => <[5]|*conjugate(c5) . |[5]>*c5+<[5]|* conjugate(c5) . |[4]>*c4+<[5]|*conjugate(c5) . |[3]>*c3+<[5]|*conjugate(c5) . |[2]>*c2+<[5]|*conjugate(c5) . |[1]>*c1+<[4]|*conjugate(c4) . |[5]>*c5+<[4]|*conjugate(c4) . |[4]>*c4+<[4]|*conjugate(c4) . |[3]>*c3+<[4]|*conjugate(c4) . |[2]>*c2+<[4]|*conjugate(c4) . |[1]>*c1+<[3]|*conjugate(c3) . |[5]>*c5+<[3]|*conjugate(c3) . |[4]>*c4+<[3]|*conjugate(c3) . |[3]>*c3+<[3]|*conjugate(c3) . |[2]>*c2+<[3]|*conjugate(c3) . |[1]>*c1+<[2]|*conjugate(c2) . |[5]>*c5+<[2]|*conjugate(c2) . |[4]>*c4+<[2]|*conjugate(c2) . |[3]>*c3+<[2]|*conjugate(c2) . |[2]>*c2+<[2]|*conjugate(c2) . |[1]>*c1+<[1]|*conjugate(c1) . |[5]>*c5+<[1]|*conjugate(c1) . |[4]>*c4+<[1]|*conjugate(c1) . |[3]>*c3+<[1]|*conjugate(c1) . |[2]>*c2+<[1]|*conjugate(c1) . |[1]>*c1 Daniel Volinski En jueves, 17 de octubre de 2024, 16:21:54 GMT+3, ehm <eri...@gm...> escribió: Hi Daniel, If you use wxMaxima, then load the packages in the following order: load(qm); load("wx.lisp"); The file wx.lisp redefines the pretty printing of the kets in wxMaxima. If you only run maxima in a terminal window, you do not need to load wx.lisp. I'm glad the package is working for you! Let me know if you have other questions. Best, Eric On Thu, 2024-10-17 at 09:20 +0000, Daniel Volinski via Maxima-discuss wrote: > Thank you for your help. I changed the comment-out as you indicated. > Now I am able to run the package. > I am using qm-examples-1.wxm and I compare it with the original qm- > examples-1.wxmx for reference. > > I get the following output: > > k: ket([a]); => ket([a]) > b: bra([b]); => bra([b]) > b . k; => braket(bra([b]),ket([a])) > > Not at all like the original: > > k: ket([a]); => |[a]> > b: bra([b]); => <[b]| > b . k; => kron_delta(a,b) > > What am I missing? Is it possible this depends on the commented-out > packages? _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |