mm.physics.fock.estimate_dx¶
- mrmustard.physics.fock.estimate_dx(cutoff, period_resolution=20)[source]¶
Estimates a suitable quadrature discretization interval dx. Uses the fact that Fock state n oscillates with angular frequency \(\sqrt{2(n + 1)}\), which follows from the relation
\[\psi^{[n]}'(q) = q - sqrt(2*(n + 1))*\psi^{[n+1]}(q)\]by setting q = 0, and approximating the oscillation amplitude by `psi^{[n+1]}(0)
Ref: https://en.wikipedia.org/wiki/Hermite_polynomials#Hermite_functions
- Args
cutoff (int): Fock cutoff period_resolution (int): Number of points used to sample one Fock
wavefunction oscillation. Larger values yields better approximations and thus smaller dx.
- Returns
(float): discretization value of quadrature
code/api/mrmustard.physics.fock.estimate_dx
Download Python script
Download Notebook
View on GitHub