From: ehm <eri...@gm...> - 2024-10-11 20:27:08
|
Hi All, I'm announcing the availability of the qm-maxima package for performing quantum mechanical calculations in a finite dimensional Hilbert space. The package is located on my Github site: https://github.com/QMeqGR/qm-maxima Thanks to Robert Dodier and Barton Willis for their contributions that have greatly improved the package. I've expanded the functionality considerably since I first posted about the package here. It is geared toward undergrad and graduate students learning QM. The pdf doc is nearing 30 pages and gives lots of detail on how the package works and how to use it. Using the package, I can solve probably 60% of the problems I assign in my undergraduate quantum class. I bring it up now because I submitted an abstract to the American Association of Physics Teachers (AATP) meeting scheduled for Jan 2025 to present the package. I'll have a 12 minute talk and I plan to spend about 3 slides on Maxima itself before talking about my package. (There are a few things I wanted to bring up with everyone before I put my Maxima slides together, but I'll post about that separately.) So if any of you are interested in playing with the package, or just looking through the examples given in the docs, I would appreciate any feedback! Best regards, Eric |
From: Daniel V. <dan...@ya...> - 2024-10-15 12:37:00
|
Hi Eric, Thank you very much for this package! However, I was not able to use it yet.I downloaded the package from github, I unzip it and put it inD:\USERS\wxMaxima\qm-maxima. I'm using Windows 10. I used qm_examples-1.wxmx in directory docs\examplesI save it as qm_examples-1.wxm in which I did some changes. When I run qm_examples-1.wxm with no changes, I get file_search1: qm not found in file_search_maxima,file_search_lisp.This is obvious because I'm not pointing to the directory So I added load("D:/USERS/wxMaxima/qm-maxima/qm");instead of load(qm); but I getfile_search1: "qm.lisp" not found in file_search_maxima,file_search_lisp. I change it to load("D:/USERS/wxMaxima/qm-maxima/qm.mac");but I get:file_search1: "qm.lisp" not found in file_search_maxima,file_search_lisp. I added:file_search_maxima:cons(sconcat("D:/USERS/wxMaxima/qm-maxima/###.{lisp,mac,mc}"),file_search_maxima)$file_search_lisp:cons(sconcat("D:/USERS/wxMaxima/qm-maxima/###.{lisp,mac,mc}"),file_search_lisp)$before the load("D:/USERS/wxMaxima/qm-maxima/qm.mac"); but I getfile_search1: "qm-index.lisp" not found in file_search_maxima,file_search_lisp. This qm-index.lisp file is in the docs directory. It seems odd that thenormal functioning of the package depends on a file in the docs directory. I added:file_search_maxima:cons(sconcat("D:/USERS/wxMaxima/qm-maxima/docs/###.{lisp,mac,mc}"),file_search_maxima)$file_search_lisp:cons(sconcat("D:/USERS/wxMaxima/qm-maxima/docs/###.{lisp,mac,mc}"),file_search_lisp)$I get:While evaluating the form starting at line 5, column 0 of #P"D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp":; ; compilation unit aborted; caught 1 fatal ERROR conditionloadfile: failed to load D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp At this point I gave up and decided to write this letter.What is the proper way to point at your package? Thanks again, Daniel Volinski En viernes, 11 de octubre de 2024, 23:31:40 GMT+3, ehm <eri...@gm...> escribió: Hi All, I'm announcing the availability of the qm-maxima package for performing quantum mechanical calculations in a finite dimensional Hilbert space. The package is located on my Github site: https://github.com/QMeqGR/qm-maxima Thanks to Robert Dodier and Barton Willis for their contributions that have greatly improved the package. I've expanded the functionality considerably since I first posted about the package here. It is geared toward undergrad and graduate students learning QM. The pdf doc is nearing 30 pages and gives lots of detail on how the package works and how to use it. Using the package, I can solve probably 60% of the problems I assign in my undergraduate quantum class. I bring it up now because I submitted an abstract to the American Association of Physics Teachers (AATP) meeting scheduled for Jan 2025 to present the package. I'll have a 12 minute talk and I plan to spend about 3 slides on Maxima itself before talking about my package. (There are a few things I wanted to bring up with everyone before I put my Maxima slides together, but I'll post about that separately.) So if any of you are interested in playing with the package, or just looking through the examples given in the docs, I would appreciate any feedback! Best regards, Eric _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |
From: ehm <eri...@gm...> - 2024-10-15 13:28:45
|
Hi Daniel, I'm sorry you're having trouble with the package. Let's see if we can figure it out. The top level file "qm.mac" loads the other .mac and .lisp files. But file_search_maxima needs to see the whole directory. I'm on Linux, but I think the following might work with slight changes. In my maxima-init.mac file I have: /* ---------------------------------------------------------- */ file_search_maxima : append(["/home/ehm/math/Maxima/share/**/*.mac"],file_search_maxima )$ file_search_demo : append(["/home/ehm/math/Maxima/share/**/*.mac"],file_search_demo )$ /* ---------------------------------------------------------- */ I'm not sure how to specify wildcards for the subdirectories on Windows. Maybe try file_search_maxima : append(["D:/USERS/wxMaxima/**/*.mac"],file_search_maxima)$ If someone else is on Windows and knows how to set this please let us know! -Eric On Tue, 2024-10-15 at 12:36 +0000, Daniel Volinski via Maxima-discuss wrote: > > Hi Eric, > > Thank you very much for this package! > > However, I was not able to use it yet. > I downloaded the package from github, I unzip it and put it in > D:\USERS\wxMaxima\qm-maxima. I'm using Windows 10. > I used qm_examples-1.wxmx in directory docs\examples > I save it as qm_examples-1.wxm in which I did some changes. > > When I run qm_examples-1.wxm with no changes, I get > file_search1: qm not found in > file_search_maxima,file_search_lisp. > This is obvious because I'm not pointing to the directory > > So I added load("D:/USERS/wxMaxima/qm-maxima/qm"); > instead of load(qm); but I get > file_search1: "qm.lisp" not found in > file_search_maxima,file_search_lisp. > > I change it to load("D:/USERS/wxMaxima/qm-maxima/qm.mac"); > but I get: > file_search1: "qm.lisp" not found in > file_search_maxima,file_search_lisp. > > I added: > file_search_maxima:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/###.{lisp,mac,mc}"),file_search_maxima)$ > file_search_lisp:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/###.{lisp,mac,mc}"),file_search_lisp)$ > before the load("D:/USERS/wxMaxima/qm-maxima/qm.mac"); but I get > file_search1: "qm-index.lisp" not found in > file_search_maxima,file_search_lisp. > > This qm-index.lisp file is in the docs directory. It seems odd that > the > normal functioning of the package depends on a file in the docs > directory. > > I added: > file_search_maxima:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/docs/###.{lisp,mac,mc}"),file_search_maxima)$ > file_search_lisp:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/docs/###.{lisp,mac,mc}"),file_search_lisp)$ > I get: > While evaluating the form starting at line 5, column 0 > of #P"D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp":; > ; compilation unit aborted > ; caught 1 fatal ERROR condition > loadfile: failed to load D:/USERS/wxMaxima/qm-maxima/docs/qm-index- > html.lisp > > At this point I gave up and decided to write this letter. > What is the proper way to point at your package? > > Thanks again, > > Daniel Volinski > > > > > > En viernes, 11 de octubre de 2024, 23:31:40 GMT+3, ehm > <eri...@gm...> escribió: > > > > > > Hi All, > > I'm announcing the availability of the qm-maxima package for > performing > quantum mechanical calculations in a finite dimensional Hilbert > space. > The package is located on my Github site: > https://github.com/QMeqGR/qm-maxima > > Thanks to Robert Dodier and Barton Willis for their contributions > that > have greatly improved the package. > > I've expanded the functionality considerably since I first posted > about > the package here. It is geared toward undergrad and graduate students > learning QM. The pdf doc is nearing 30 pages and gives lots of detail > on how the package works and how to use it. Using the package, I can > solve probably 60% of the problems I assign in my undergraduate > quantum > class. > > I bring it up now because I submitted an abstract to the American > Association of Physics Teachers (AATP) meeting scheduled for Jan 2025 > to present the package. I'll have a 12 minute talk and I plan to > spend > about 3 slides on Maxima itself before talking about my package. > (There > are a few things I wanted to bring up with everyone before I put my > Maxima slides together, but I'll post about that separately.) > > So if any of you are interested in playing with the package, or just > looking through the examples given in the docs, I would appreciate > any > feedback! > > Best regards, > Eric > > > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss |
From: Daniel V. <dan...@ya...> - 2024-10-15 20:05:23
|
Hi Eric, Thank you for your response, I deleted the previous commands form the file and I used:file_search_maxima:append(["D:/USERS/wxMaxima/**/*.mac"],file_search_maxima )$file_search_demo:append(["D:/USERS/wxMaxima/**/*.mac"],file_search_demo )$ but it didn't work I tried:file_search_maxima:append(["D:/USERS/wxMaxima/qm-maxima/**/*.mac"],file_search_maxima )$file_search_demo:append(["D:/USERS/wxMaxima/qm-maxima/**/*.mac"],file_search_demo )$ but to no avail. In both cases I get: load("qm.mac"); file_search1: "qm.mac" not found in file_search_maxima,file_search_lisp. Daniel Volinski En martes, 15 de octubre de 2024, 16:31:39 GMT+3, ehm <eri...@gm...> escribió: Hi Daniel, I'm sorry you're having trouble with the package. Let's see if we can figure it out. The top level file "qm.mac" loads the other .mac and .lisp files. But file_search_maxima needs to see the whole directory. I'm on Linux, but I think the following might work with slight changes. In my maxima-init.mac file I have: /* ---------------------------------------------------------- */ file_search_maxima : append(["/home/ehm/math/Maxima/share/**/*.mac"],file_search_maxima )$ file_search_demo : append(["/home/ehm/math/Maxima/share/**/*.mac"],file_search_demo )$ /* ---------------------------------------------------------- */ I'm not sure how to specify wildcards for the subdirectories on Windows. Maybe try file_search_maxima : append(["D:/USERS/wxMaxima/**/*.mac"],file_search_maxima)$ If someone else is on Windows and knows how to set this please let us know! -Eric On Tue, 2024-10-15 at 12:36 +0000, Daniel Volinski via Maxima-discuss wrote: > > Hi Eric, > > Thank you very much for this package! > > However, I was not able to use it yet. > I downloaded the package from github, I unzip it and put it in > D:\USERS\wxMaxima\qm-maxima. I'm using Windows 10. > I used qm_examples-1.wxmx in directory docs\examples > I save it as qm_examples-1.wxm in which I did some changes. > > When I run qm_examples-1.wxm with no changes, I get > file_search1: qm not found in > file_search_maxima,file_search_lisp. > This is obvious because I'm not pointing to the directory > > So I added load("D:/USERS/wxMaxima/qm-maxima/qm"); > instead of load(qm); but I get > file_search1: "qm.lisp" not found in > file_search_maxima,file_search_lisp. > > I change it to load("D:/USERS/wxMaxima/qm-maxima/qm.mac"); > but I get: > file_search1: "qm.lisp" not found in > file_search_maxima,file_search_lisp. > > I added: > file_search_maxima:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/###.{lisp,mac,mc}"),file_search_maxima)$ > file_search_lisp:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/###.{lisp,mac,mc}"),file_search_lisp)$ > before the load("D:/USERS/wxMaxima/qm-maxima/qm.mac"); but I get > file_search1: "qm-index.lisp" not found in > file_search_maxima,file_search_lisp. > > This qm-index.lisp file is in the docs directory. It seems odd that > the > normal functioning of the package depends on a file in the docs > directory. > > I added: > file_search_maxima:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/docs/###.{lisp,mac,mc}"),file_search_maxima)$ > file_search_lisp:cons(sconcat("D:/USERS/wxMaxima/qm- > maxima/docs/###.{lisp,mac,mc}"),file_search_lisp)$ > I get: > While evaluating the form starting at line 5, column 0 > of #P"D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp":; > ; compilation unit aborted > ; caught 1 fatal ERROR condition > loadfile: failed to load D:/USERS/wxMaxima/qm-maxima/docs/qm-index- > html.lisp > > At this point I gave up and decided to write this letter. > What is the proper way to point at your package? > > Thanks again, > > Daniel Volinski > > > > > > En viernes, 11 de octubre de 2024, 23:31:40 GMT+3, ehm > <eri...@gm...> escribió: > > > > > > Hi All, > > I'm announcing the availability of the qm-maxima package for > performing > quantum mechanical calculations in a finite dimensional Hilbert > space. > The package is located on my Github site: > https://github.com/QMeqGR/qm-maxima > > Thanks to Robert Dodier and Barton Willis for their contributions > that > have greatly improved the package. > > I've expanded the functionality considerably since I first posted > about > the package here. It is geared toward undergrad and graduate students > learning QM. The pdf doc is nearing 30 pages and gives lots of detail > on how the package works and how to use it. Using the package, I can > solve probably 60% of the problems I assign in my undergraduate > quantum > class. > > I bring it up now because I submitted an abstract to the American > Association of Physics Teachers (AATP) meeting scheduled for Jan 2025 > to present the package. I'll have a 12 minute talk and I plan to > spend > about 3 slides on Maxima itself before talking about my package. > (There > are a few things I wanted to bring up with everyone before I put my > Maxima slides together, but I'll post about that separately.) > > So if any of you are interested in playing with the package, or just > looking through the examples given in the docs, I would appreciate > any > feedback! > > Best regards, > Eric > > > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |
From: ehm <eri...@gm...> - 2024-10-15 22:12:55
|
Hi Daniel, I looked at some previous posts regarding setting of the paths on Windows. Please try the following: append(["D:/USERS/wxMaxima/qm- maxima/###.{mac,lisp}","D:/USERS/wxMaxima/qm- maxima/docs/###.{mac,lisp}"],file_search_maxima); append(["D:/USERS/wxMaxima/qm- maxima/###.{mac,lisp}","D:/USERS/wxMaxima/qm- maxima/docs/###.{mac,lisp}"],file_search_lisp); To see if the file search is working you can try: file_search(qm); --> should point to qm.mac file_search("qm-index-html.lisp"); --> should find the html docs If this works (fingers crossed), you can add the append commands to run automatically through configure-->startup-commands on wxMaxima. -Eric |
From: Daniel V. <dan...@ya...> - 2024-10-16 06:54:14
|
Hi Eric, I also commented out the loading of documentation in "qm.mac", like this:/* load the documentation */;; load("qm-index.lisp")$;; load("qm-index-html.lisp")$ Now I get the following problem in "basic.mac"load("qm.mac"); D:/USERS/wxMaxima/qm-maxima/basis.mac:30:0:incorrect syntax: Premature termination of input at ;.; ^ Daniel Volinski En miércoles, 16 de octubre de 2024, 01:15:53 GMT+3, ehm <eri...@gm...> escribió: Hi Daniel, I looked at some previous posts regarding setting of the paths on Windows. Please try the following: append(["D:/USERS/wxMaxima/qm- maxima/###.{mac,lisp}","D:/USERS/wxMaxima/qm- maxima/docs/###.{mac,lisp}"],file_search_maxima); append(["D:/USERS/wxMaxima/qm- maxima/###.{mac,lisp}","D:/USERS/wxMaxima/qm- maxima/docs/###.{mac,lisp}"],file_search_lisp); To see if the file search is working you can try: file_search(qm); --> should point to qm.mac file_search("qm-index-html.lisp"); --> should find the html docs If this works (fingers crossed), you can add the append commands to run automatically through configure-->startup-commands on wxMaxima. -Eric _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |
From: Daniel V. <dan...@ya...> - 2024-10-16 06:44:59
|
Hi Eric, I think we have overcome the problems of pointing at your package: file_search(qm); "D:/USERS/wxMaxima/qm-maxima/qm.lisp" file_search("qm-index-html.lisp"); "D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp" file_search("qm-index-html.lisp"); "D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp" But now the problem remains: load("qm-index-html.lisp"); While evaluating the form starting at line 5, column 0 of #P"D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp":; ; compilation unit aborted ; caught 1 fatal ERROR conditionloadfile: failed to load D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp This file, qm-index-html.lisp, is full of explicit references to your installation: (in-package :cl-info)(let ((html-index '(("hbar" "/home/ehm/math/Maxima/share/ehm/qm-maxima/docs/qm_html/index.html" "index-hbar") ("zp" "/home/ehm/math/Maxima/share/ehm/qm-maxima/docs/qm_html/index.html" "index-zp") I think this file should be changed to point to "relative-to-the-installation" references. Daniel Volinski En miércoles, 16 de octubre de 2024, 01:15:53 GMT+3, ehm <eri...@gm...> escribió: Hi Daniel, I looked at some previous posts regarding setting of the paths on Windows. Please try the following: append(["D:/USERS/wxMaxima/qm- maxima/###.{mac,lisp}","D:/USERS/wxMaxima/qm- maxima/docs/###.{mac,lisp}"],file_search_maxima); append(["D:/USERS/wxMaxima/qm- maxima/###.{mac,lisp}","D:/USERS/wxMaxima/qm- maxima/docs/###.{mac,lisp}"],file_search_lisp); To see if the file search is working you can try: file_search(qm); --> should point to qm.mac file_search("qm-index-html.lisp"); --> should find the html docs If this works (fingers crossed), you can add the append commands to run automatically through configure-->startup-commands on wxMaxima. -Eric _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |
From: ehm <eri...@gm...> - 2024-10-16 13:50:11
|
Hi Daniel, On Wed, 2024-10-16 at 06:44 +0000, Daniel Volinski via Maxima-discuss wrote: > But now the problem remains: > > load("qm-index-html.lisp"); > While evaluating the form starting at line 5, column 0 > of #P"D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp":; > ; compilation unit aborted > ; caught 1 fatal ERROR condition > loadfile: failed to load D:/USERS/wxMaxima/qm-maxima/docs/qm-index- > html.lisp This might be related to recent changes in Maxima regarding loading of multiple index files. We developed a package template for third-party packages (https://github.com/QMeqGR/PKG-maxima). Some changes were made to core Maxima to be able to deal with multiple index doc files. These changes are in the current development branch, but not in the last release 5.47. (The 5.48 release is currently being assembled but I don't know when that will be completed.) Until then you could clone the Maxima repo from SourceForge and build Maxima to get the functionality, or just use the PDF and text-based docs available through the "?" and "??" functions. The easiest thing to do is just comment out the loading of the index files like you have below, but the way it is done is not quite correct. > I also commented out the loading of documentation in "qm.mac", like > this: > /* load the documentation */ > ;; load("qm-index.lisp")$ > ;; load("qm-index-html.lisp")$ To comment out code in a .mac file use the C-style /* ... */ delimiters. The Lispy ";;" comments won't work in a .mac file because ";" means 'end of input' to the Maxima parser. Let me know how it goes. -Eric |
From: Daniel V. <dan...@ya...> - 2024-10-17 09:21:13
|
Hi Eric, 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? Daniel Volinski En miércoles, 16 de octubre de 2024, 16:54:35 GMT+3, ehm <eri...@gm...> escribió: Hi Daniel, On Wed, 2024-10-16 at 06:44 +0000, Daniel Volinski via Maxima-discuss wrote: > But now the problem remains: > > load("qm-index-html.lisp"); > While evaluating the form starting at line 5, column 0 > of #P"D:/USERS/wxMaxima/qm-maxima/docs/qm-index-html.lisp":; > ; compilation unit aborted > ; caught 1 fatal ERROR condition > loadfile: failed to load D:/USERS/wxMaxima/qm-maxima/docs/qm-index- > html.lisp This might be related to recent changes in Maxima regarding loading of multiple index files. We developed a package template for third-party packages (https://github.com/QMeqGR/PKG-maxima). Some changes were made to core Maxima to be able to deal with multiple index doc files. These changes are in the current development branch, but not in the last release 5.47. (The 5.48 release is currently being assembled but I don't know when that will be completed.) Until then you could clone the Maxima repo from SourceForge and build Maxima to get the functionality, or just use the PDF and text-based docs available through the "?" and "??" functions. The easiest thing to do is just comment out the loading of the index files like you have below, but the way it is done is not quite correct. > I also commented out the loading of documentation in "qm.mac", like > this: > /* load the documentation */ > ;; load("qm-index.lisp")$ > ;; load("qm-index-html.lisp")$ To comment out code in a .mac file use the C-style /* ... */ delimiters. The Lispy ";;" comments won't work in a .mac file because ";" means 'end of input' to the Maxima parser. Let me know how it goes. -Eric _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |
From: ehm <eri...@gm...> - 2024-10-17 13:19:01
|
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? |
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 |
From: ehm <eri...@gm...> - 2024-10-18 19:04:18
|
Hi Daniel, What version of Maxima/wxMaxima are you using? Independent of qm- maxima, if you input: declare(c,complex); conjugate(c); you should see the overbar in wxMaxima, while you will see 'conjugate(c)' in the Maxima terminal. On Fri, 2024-10-18 at 18:10 +0000, Daniel Volinski via Maxima-discuss wrote: > > 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) > Strange that you don't see the kron_delta(). Try it like this k: ket([u]); b: bra([d]); b . k; you should see kron_delta(u,d). > The second cell is identical > L: makelist( concat(c,i), i, 5 ); > apply('declare,[L,complex])$ > facts(); > Do you see that all the c_i variables are declared complex after 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]|*con > jugate(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 > I've pushed version 0.9.5-beta5 with some new and updated examples if you want to download the new version. -Eric |
From: Daniel V. <dan...@ya...> - 2024-10-21 11:22:36
|
Hi Eric, I'm using "5.38.1".Yes, I know, it's rather old but for my needs it has served me well. Daniel Volinski En viernes, 18 de octubre de 2024, 22:08:19 GMT+3, ehm <eri...@gm...> escribió: Hi Daniel, What version of Maxima/wxMaxima are you using? Independent of qm- maxima, if you input: declare(c,complex); conjugate(c); you should see the overbar in wxMaxima, while you will see 'conjugate(c)' in the Maxima terminal. On Fri, 2024-10-18 at 18:10 +0000, Daniel Volinski via Maxima-discuss wrote: > > 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) > Strange that you don't see the kron_delta(). Try it like this k: ket([u]); b: bra([d]); b . k; you should see kron_delta(u,d). > The second cell is identical > L: makelist( concat(c,i), i, 5 ); > apply('declare,[L,complex])$ > facts(); > Do you see that all the c_i variables are declared complex after 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]|*con > jugate(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 > I've pushed version 0.9.5-beta5 with some new and updated examples if you want to download the new version. -Eric _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |
From: ehm <eri...@gm...> - 2024-10-21 13:34:58
|
Hi Daniel, On Mon, 2024-10-21 at 11:22 +0000, Daniel Volinski via Maxima-discuss wrote: > > I'm using "5.38.1". > Yes, I know, it's rather old but for my needs it has served me well. > OK. This might explain the differences in output that you are seeing. If you upgrade to 5.47.0 everything but the online docs should work. When 5.48.0 is released, hopefully soon, then the docs will work as well. I am also updating qm-maxima and adding new capabilities frequently. The latest pre-release is 0.9.6-beta1. If you download this version and run the test suite with "batch(rtest_qm,test)" you will see any failures on the version of Maxima you are running. -Eric |