pub struct PathIntegralMonteCarlo {
pub n_slices: usize,
pub tau: f64,
pub mass: f64,
pub path: Vec<f64>,
}Expand description
A simple Path Integral Monte Carlo estimator for 1D quantum mechanics.
Uses a discrete Euclidean path (imaginary time) to estimate the ground state energy via the virial estimator.
Fields§
§n_slices: usizeNumber of time slices.
tau: f64Imaginary time step τ = β/N.
mass: f64Particle mass.
path: Vec<f64>Current path (positions at each time slice).
Implementations§
Source§impl PathIntegralMonteCarlo
impl PathIntegralMonteCarlo
Sourcepub fn new(n_slices: usize, beta: f64, mass: f64) -> Self
pub fn new(n_slices: usize, beta: f64, mass: f64) -> Self
Create a new PIMC estimator with all positions set to zero.
Sourcepub fn kinetic_action(&self) -> f64
pub fn kinetic_action(&self) -> f64
Euclidean (kinetic) action for the current path. S_E = Σ_k m/(2τ) * (x_{k+1} − x_k)²
Sourcepub fn potential_action_harmonic(&self, omega: f64) -> f64
pub fn potential_action_harmonic(&self, omega: f64) -> f64
Harmonic potential action contribution. S_V = τ * Σ_k ½ ω² x_k²
Sourcepub fn total_action_harmonic(&self, omega: f64) -> f64
pub fn total_action_harmonic(&self, omega: f64) -> f64
Total Euclidean action (kinetic + harmonic potential).
Sourcepub fn virial_energy_estimate(&self, omega: f64) -> f64
pub fn virial_energy_estimate(&self, omega: f64) -> f64
Estimate the ground state energy via the virial theorem (harmonic case). E_0 ≈ ½ω² ⟨x²⟩ + ½/(2m τ²) corrections (simplified).
Sourcepub fn winding_number(&self) -> f64
pub fn winding_number(&self) -> f64
Compute the winding number (only meaningful for a ring).
Trait Implementations§
Source§impl Clone for PathIntegralMonteCarlo
impl Clone for PathIntegralMonteCarlo
Source§fn clone(&self) -> PathIntegralMonteCarlo
fn clone(&self) -> PathIntegralMonteCarlo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PathIntegralMonteCarlo
impl RefUnwindSafe for PathIntegralMonteCarlo
impl Send for PathIntegralMonteCarlo
impl Sync for PathIntegralMonteCarlo
impl Unpin for PathIntegralMonteCarlo
impl UnsafeUnpin for PathIntegralMonteCarlo
impl UnwindSafe for PathIntegralMonteCarlo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more