Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to combine with ChartJS #37

Open
dgks0n opened this issue Dec 14, 2024 · 1 comment
Open

Is it possible to combine with ChartJS #37

dgks0n opened this issue Dec 14, 2024 · 1 comment

Comments

@dgks0n
Copy link

dgks0n commented Dec 14, 2024

I'm curious if QMSolve can be combined with ChartJS in a Client-Server model? In this case QMSolve will calculate and return data for the client side to display.

@marl0ny
Copy link
Member

marl0ny commented Dec 19, 2024

Hi dgks0n, sorry for this late reply.

For time-independent simulations, such as those found in the eigenstates solver examples directory, the method H.solve returns a Numpy array of eigenstates: eigenstates.array[0] stores the ground state wave function with the lowest possible energy, eigenstates.array[1] gives the first excited stationary state, and so on. From here you will have to figure out how to pass these Numpy arrays from the server to client.

For the time-dependent simulations (refer to one of the scripts found in the time dependent solver examples directory), sim.method.simulation.Ψ gives a Numpy array that records the wave function at each step in time of the simulation, where sim is an instance of TimeSimulation. Note that you must run the simulation first by calling the method sim.run in order to get sim.method.simulation.Ψ. Just as before, you'll need to transfer the Numpy array sim.method.simulation.Ψ to the client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants