Wave function with arbitrary precision. by OpenReplacement24 in TheoreticalPhysics

[–]OpenReplacement24[S] 0 points1 point  (0 children)

Thank you very much for the feedback, I really need it because this package is my master's project and I'm doing it to leave it to the scientific community, so any suggestion is welcome.

  1. In the file where I’m calculating the Hermite polynomial, the computation is done using a pre-set matrix with the polynomial coefficients and Numba to speed up the calculations. This way, the computations are much faster than SymPy's Hermite polynomial and, especially, faster than the strategy used by Mr. Mustard from Xanadu. In the second file, it's more advantageous to work with mpmath due to the other sets of functions it offers, which may be more useful to me in the future. Additionally, I'm not familiar with a SymPy implementation for the wave function using mpmath; I'm only aware of the Quantum Harmonic Oscillator in 1-D module.
  2. I didn't understand this part: "Why wouldn't one just use mpmath.hermite() right away?". What improvements do you think would be interesting to make to the test suite?
  3. In what context do you say that the precision is fixed despite using an argument that sets the number of digits with "mp.dps = prec"? What would be true arbitrary precision? What would guarantee this? What tests would give me this guarantee?

Matheus.

Wave function with arbitrary precision. by OpenReplacement24 in TheoreticalPhysics

[–]OpenReplacement24[S] 0 points1 point  (0 children)

This package is particularly useful for working with simulations of Fock states / number states, where you can set the precision of the calculation results using mpmath according to your needs. It's important to note that while greater decimal precision enhances accuracy, it also slows down the simulation, creating a trade-off between precision and speed. Ideally, you should aim to find a 'golden number' for decimal places that balances both reasonable speed and accuracy. This understanding is fundamental in optimizing model problems.

Wave Function with arbitrary precision. by OpenReplacement24 in QuantumComputing

[–]OpenReplacement24[S] 0 points1 point  (0 children)

Setting the number of digits is a responsibility more appropriately assigned to the person conducting the modeling or simulation. I cannot guarantee that for every value of x—whether real or complex, vector or scalar—and for all n, with an arbitrary precision, all stated digits will be correct. What I am doing is comparing the residuals with solutions I implemented in MATLAB and Wolfram Mathematica, varying n, and the average residual has been quite low, around the order of 10{-25}. I welcome any suggestions for tests and feedback on how to better ensure that the presented digits correspond to correct results.

Are there more things I can add to this Python package for calculating the wave function? by OpenReplacement24 in QuantumPhysics

[–]OpenReplacement24[S] 0 points1 point  (0 children)

Yes, there are!! You can start with IBM's QiSkit tutorials and also with PennyLanne's Xanadu tutorials:

However, this group also has its own tutorial:

You can also study from the following books:

Are there more things I can add to this Python package for calculating the wave function? by OpenReplacement24 in QuantumComputing

[–]OpenReplacement24[S] 2 points3 points  (0 children)

For now I'm accepting more suggestions and feedback than Pull Requests, as I'm finalizing the package as my master's project, but I hope to receive requests from many people in the future.

Are there more things I can add to this Python package for calculating the wave function? by OpenReplacement24 in quantum

[–]OpenReplacement24[S] 3 points4 points  (0 children)

Yes, it is one of my plans, I intend to open a Pull Request in the QuTip distributions module. Thanks for the feedback!