Solving The Schrödinger Equation with PSO-MBO Optimization Algorithms
- Mitat Uysal , Software Engineering, Dogus University, Istanbul]
- S. Aynur Uysal , Software Engineering, Dogus University, Istanbul]
Article Information:
Abstract:
The two-dimensional Schrödinger equation is central to quantum mechanics but analytically intractable for complex potentials. This study employs Particle Swarm Optimization (PSO) and Migrating Birds Optimization (MBO) to obtain approximate solutions. Both algorithms converge effectively, with MBO showing greater stability. Results suggest that metaheuristic methods provide efficient, accurate alternatives for nonlinear quantum problems.
Keywords:
Article :
INTRODUCTION:
The time-independent Schrödinger equation lies at the heart of non-relativistic quantum mechanics, governing the stationary states of quantum systems. In two special dimensions, the equation takes the form [1-3]:
(1)
where denotes the wave function, is the potential energy function, E is the energy eigenvalue, is the reduced Planck’s constant, and is the particle mass. The wave function encapsulates all accessible physical information about the quantum system. Accurate determination of and its corresponding eigenvalue E is essential for predicting particle behaviour in a given potential landscape.
Analytical solutions to the Schrödinger equation are restricted to a narrow class of potentials, such as the infinite square well, harmonic oscillator, or hydrogen-like atoms. However, real-world quantum systems often involve more intricate potential configurations and boundary conditions for which closed-form solutions are not tractable. Consequently, the development of reliable numerical and approximation techniques has become indispensable for solving the Schrödinger equation in arbitrary geometries. Traditional numerical methods such as finite difference, finite element, and spectral techniques provide one avenue for approximate solutions [4-5]. However, these methods may suffer from limitations in handling complex, non-convex optimization landscapes, particularly when the goal is to minimize a residual functional over a high-dimensional parameter space.
In recent years, nature-inspired metaheuristic algorithms have emerged as powerful tools for solving such optimization problems. These algorithms, which include Genetic Algorithms (GA), Particle Swarm Optimization (PSO), and Migrating Birds Optimization (MBO), offer stochastic global search capabilities that are relatively immune to the pitfalls of local minima [6-10]. Their efficiency in exploring complex solution spaces makes them well-suited for parameter estimation and inverse problems in quantum systems.
Recent studies have demonstrated the growing effectiveness of metaheuristic algorithms in solving complex differential equations and physical modelling problems. Researchers have successfully employed PSO, Genetic Algorithms, Differential Evolution (DE), and Artificial Bee Colony
(ABC) techniques to approximate quantum mechanical systems and estimate energy eigenvalues [11-15]. Similarly, the Migrating Birds Optimization (MBO) algorithm has shown promising results in combinatorial and continuous optimization domains, including system identification and potential parameter estimation. However, the direct application of these algorithms to multidimensional Schrödinger equations remains relatively unexplored. This study contributes to the literature by providing a comparative analysis of PSO and MBO for solving the two-dimensional Schrödinger equation, offering both theoretical insights and practical implementation results through a Python-based simulation framework.
To evaluate the accuracy of an approximate solution to the time-independent two-dimensional Schrödinger equation, we define a residual-based error function over a discretised domain. The governing equation is
Rewriting this in normalized residual form, we have
The optimization objective is to minimize the total squared residual across a grid of sample points in the domain . The mean squared error is defined as
This error quantifies the discrepancy between the approximate and true solutions of the Schrödinger equation. The optimization process aims to determine the set of parameters—including the energy eigenvalue and any tunable parameters of the potential function —that minimize this error:
where denotes the vector of parameters defining the potential .
By minimizing this objective function, the algorithm approximates the wave function such that it satisfies the Schrödinger equation as closely as possible over the domain.
I. METAHEURISTIC OPTIMIZATION ALGORITHMS
Metaheuristic algorithms are general-purpose, nature-inspired methods that use stochastic and iterative strategies to efficiently explore large, nonlinear search spaces for near-optimal solutions when exact methods are impractical.
A. Optimization Schrödinger Equations with PSO
Particle Swarm Optimization (PSO) is a population-based stochastic optimization technique originally proposed by Kennedy, J. et al. [6], inspired by the collective behaviour of bird flocking and fish schooling. It has since been widely used for continuous optimization problems due to its simplicity, ease of implementation, and ability to converge toward global optima in complex search spaces.
In PSO, each individual—termed a "particle"—represents a candidate solution within the D-dimensional search space. The algorithm maintains and updates a population (swarm) of such particles, where each particle adjusts its trajectory according to its own experience and the knowledge shared by the swarm.
Each particle is characterized by a position vector and a velocity vector at iteration . The evolution of these vectors is governed by the following update equations
(6)
where is current position, is current velocity and is personal best position of particle , is global best position found by the swarm and is inertia weight, which balances exploration and exploitation. are acceleration coefficients (cognitive and social learning factors), are uniformly distributed random numbers in the interval [0,1].
Here, the inertia weight plays a critical role in controlling the convergence behavior of the swarm. A larger value encourages global exploration, while a smaller value promotes local exploitation. Typically, is dynamically decreased over iterations to gradually shift the focus from exploration to exploitation.
Each particle represents a potential solution in the search space and adjusts its position based on the best known position Personel Best ( ) and the best solution found by any particle in the entire swarm Global Best ( ).
Through iterative position and velocity updates, particles are drawn toward promising regions of the search space, influenced both by individual discovery and social cooperation. This dual-learning mechanism allows PSO to efficiently converge toward global optima in high-dimensional and nonlinear optimization problems.
The performance of PSO is highly sensitive to its parameter settings. Table 1 lists the commonly adopted values for the core PSO parameters:
RESULTS:
TABLE I
Typıcal Parameter Settings For The Particle Swarm Optimization (PSO) Algorithm
|
Parameter |
Typical Range/ Value |
|
Population Size |
20-100 |
|
Inertia Weight 𝜔 |
0.4-0.9 |
|
Cognitive Coefficient 𝑐1 |
≈ 2.0 |
|
Social Coefficient 𝑐2 |
≈ 2.0 |
|
Max Velocity |
Problem-specific bounds |
A linearly decreasing inertia weight strategy is often used to transition the search behaviour from global to local as iterations progress. The choice of coefficients and affects the relative influence of personal versus social experience. In most implementations, equal values (e.g., 2.0) are used to maintain a balance.
In this study, parameters were empirically tuned to achieve optimal performance on the Schrödinger residual minimization problem, ensuring both stability and convergence across trials.
We aim to find the optimal parameters (e.g., potential parameters or constants in a trial wavefunction) that minimize the energy expectation value from the time-independent Schrödinger equation:
where is the Hamiltonian operator.
Let’s consider a quantum system with a harmonic-oscillator potential
We want to find the best parameters (like frequency ω, trial function parameters, etc.) that minimize the energy .
Step 1: Define the Objective Function
This is the quantity to minimize:
python
def objective(params):
# params could be [a, b] for a trial wavefunction like ψ(x) = exp(-a * x^2 + b * x)
# Compute energy expectation value E
E = compute_energy(params)
return E
Step 2: Initialize the PSO Algorithm
- Particles: Each represents a candidate solution (set of wavefunction parameters).
- Position: Vector of parameters [a, b, ...]
- Velocity: Change applied to position in each iteration
- Memory:
- pbest: Best position a particle has visited
- gbest: Best global position found by the swarm
Step 3: PSO Algorithm Parameters
· Number of particles n
· Number of iterations max_iter
· Inertia weight w
· Cognitive coefficient c1
· Social coefficient c2
Step 4: PSO Update Equations
For each particle i and each dimension d:
python
v[i][d] = w*v[i][d] + c1*r1*(pbest[i][d] - x[i][d]) + c2*r2*(gbest[d] - x[i][d])
x[i][d] = x[i][d] + v[i][d]
where r1 and r2 are random numbers in [0,1].
Step 5: Evaluation and Update Steps
Finally, for each iteration:
· Evaluate the objective function at each particle’s position.
· Update pbest if current value is better.
· Update gbest based on all pbest.
· Update velocity and position using the update equations.
A. Optimization Schrödinger Equation with MBO
The Migrating Birds Optimization (MBO) algorithm was originally proposed by [9] and was inspired by the V-formation flying pattern commonly observed in migratory birds during long-distance flights. The algorithm was initially designed to address the Quadratic Assignment Problem (QAP), a well-known NP-hard combinatorial optimization problem. Due to its structure, MBO is particularly well-suited for discrete and combinatorial optimization tasks, although it has been effectively adapted for continuous domains as well.
MBO begins with a randomly generated population of candidate solutions arranged in a virtual V-formation. The bird at the front acts as the leader, while the remaining birds serve as followers, positioned symmetrically on the left and right wings.
At each iteration, the leader performs a local neighbourhood search to explore better solutions in its vicinity. The neighbourhood structure helps in refining the current solution by evaluating multiple neighbour configurations. To maintain diversity and avoid premature convergence, the algorithm employs a solution-sharing mechanism: if certain neighbour solutions are not adopted by the current bird, they can be shared with other birds in the flock to improve their own positions.
A distinctive feature of MBO is its periodic leadership change. After a predefined number of iterations—referred to as the flapping interval—the leader is replaced by a follower bird to simulate fatigue and promote diversity. This leadership transition is applied first to the left wing, where the leader bird moves to the end of the left formation and a new leader is selected from the remaining birds. The flock continues in this new formation until the next leadership cycle, at which point the right wing undergoes a similar transition.
We aim to solve the Schrödinger equation , optimizing parameters of potential V(x), domain bounds, or discretization step so that a specific energy is minimized.
Step 1: Define the Objective Function
Choose a parameterized version of the potential V(x; a, b, ...), such as
python
V(x) = a * x² + b * sin(x)
Discretize the Schrödinger equation (e.g., finite difference method), compute the Hamiltonian matrix H, and find the lowest eigenvalue E₀.
Minimize the lowest eigenvalue E₀(a, b, ...).
python
def objective_function(params): # params = [a, b]
a, b = params
# Build V(x) with a, b
# Discretize Hamiltonian
# Compute lowest eigenvalue E₀
return E₀
Step 2: Initialize MBO Parameters
N is the number of birds, L is the number of iterations, alpha is the angle formation behaviour, search_bounds is the parameter search space, positions are random initial parameter sets.
python
positions = np.random.uniform(low=lower_bounds, high=upper_bounds, size=(N, num_params))
Step 3: Evaluate Initial Fitness
For each bird (solution), calculate the fitness
python
fitness = [objective_function(pos) for pos in positions]
Step 4: Form V-Shape (Leader Selection)
Sort birds by fitness. Choose the best as leader, split others into left and right wings alternately.
Step 5: Local Search (for Each Bird)
For each bird: Generate a small perturbation in its current position and accept if fitness improves.
python
new_position = old_position + step_size * (random_vector)
Update position only if
python
objective_function(new_position) < objective_function(old_position)
Step 6: Leader Rotation
After a fixed number of iterations, Change leader bird (cyclically) and re-form the V shape.
Step 7: Track Best Solution
Keep track of:
python
best_position
best_fitness
Update if any bird improves over the current best.
Step 8: Termination and Output
After all iterations, return:
python
best_parameters, minimum_energy
Table 2
Typical Parameter Settings for the Migrating Birds Optimization (MBO) Algorithm
|
Parameter |
Description |
Typical Range / Value |
|
Number of Birds (N) |
Total number of solutions (population size) |
10 – 50 |
|
Number of Iterations (L) |
Total iteration count for convergence |
50 – 200 |
|
Neighborhood Size |
Number of neighbor solutions generated for each bird during local search |
3 – 10 |
|
Flapping Interval |
Number of iterations before the leader bird is rotated |
5 – 15 |
|
Perturbation Step Size (α) |
Step magnitude used to modify parameters during neighborhood search |
0.01 – 0.2 |
|
Information Sharing Ratio (β) |
Fraction of unused solutions shared with other birds |
0.2 – 0.5 |
|
Leader Replacement Rule |
Defines how the leader bird is cyclically changed (left/right wing alternation) |
Periodic rotation |
|
Termination Criterion |
Maximum iterations or convergence threshold |
Based on minimum fitness change (10⁻⁶ – 10⁻⁸) |
CONCLUSION:
A comparative evaluation between Particle Swarm Optimization (PSO) and Migrating Birds Optimization (MBO) reveals distinct advantages and behavioural characteristics for each method. PSO demonstrates rapid convergence in smooth and continuous potential landscapes due to its collective learning mechanism based on velocity and position updates. Its computational simplicity and minimal parameter requirements make it suitable for low to medium-dimensional quantum systems. However, PSO tends to lose population diversity in later iterations, which can lead to premature convergence when the search space is highly multimodal.
MBO, on the other hand, offers stronger robustness against local minima through its periodic leadership rotation and neighbourhood exploration mechanisms. This dynamic structure maintains diversity across iterations, allowing the algorithm to explore new regions even after partial convergence. Although slightly more complex to implement, MBO achieves more stable and consistent results in problems with rugged or irregular fitness surfaces. In the context of the Schrödinger equation optimization, MBO showed smoother convergence behaviour and higher stability compared to PSO, suggesting its superiority for multidimensional or nonconvex quantum potential problems. Overall, both algorithms proved effective, yet MBO’s adaptive exploration–exploitation balance provided a more reliable framework for quantum mechanical parameter estimation.
The comparative analysis indicates that both Particle Swarm Optimization (PSO) and Migrating Birds Optimization (MBO) are capable of effectively minimizing the residual associated with the two-dimensional time-independent Schrödinger equation. Among the tested methods, MBO exhibits marginally superior convergence performance for the specific problem instance considered. The provided Python-based implementation ensures reproducibility of the results and offers a convenient framework for visual analysis, thereby supporting future studies focused on parameter estimation in quantum mechanical systems. (Fig. 1).
Fig. 1. The comparative analysis for PSO and MBO
REFERENCES:
1. D.J.Griffiths,” Introduction to Quantum Mechanics," Pearson, 2018.
2. J.J.Sakurai,” Modern Quantum Mechanics,” Cambridge University Press, 2020.
3. S.-H. Dong,” Factorization Method in Quantum Mechanics,“ Springer, 2007.
4. X.-S. Yang,” Nature-Inspired Optimization Algorithms,” Elsevier, 2014.
5. C.Blum and A. Roli, “ Metaheuristics in Combinatorial Optimization,” ACM Computing Surveys,35(3),268-308, 2003.
6. J.Kennedy and R. Eberhart, “Particle Swarm Optimization”, Proceedings of the IEEE International Conference on Neural Networks, 4, 1942-1948 (1995). http://dx.doi.org/10.1109/ICNN.1995.488968
7. R.Poli., J.Kennedy and T. Blackwell,” Particle Swarm Optimization: An Overview,” Swarm Intelligence, DOI 10.1007/s11721-007-0002-0, 2007.
8. [A.Gad, “ Particle Swarm Optimization Algorithm and Its Applications: A Systematic Review,” Archives of Computational Methods in Engineering, 29,2531–2561, 2022.
9. E.Duman, M Uysal and A.F. Alkaya, “Migrating Birds Optimization: A New Metaheuristic Approach and its performance on quadratic assignment problem,” Information Sciences,(217), 65-77, 2012.
10. H.Makas,and N. Yumusak, “ System identification by using migrating birds optimization algorithm: a comparative performance analysis,” Turkish Journal of Electrical Engineering and Computer Sciences, Vol.24,1879, 2016.
a. Luitel,and G.Venayagamoorthhy, “Particle swarm optimization with quantum infusion for system identification,” Engineering Applications of Artificial Intelligence 23(5):635-649, 2010.
11. Y.Li, et al. “A hybrid artificial bee colony assisted differential evolution algorithm for optimal reactive power flow,” International Journal of Electrical Power & Energy Systems 52(1):25-33, 2013.
12. M.Şahin, et al., “Applications of Genetic Algorithm to Quantum Mechanical Systems,” Turkish Journal of Physics, Vol.30(4), 253-275, 2006.
a. Karaboga, and S.Ökdem, “A Simple and Global Optimization Algorithm for Engineering Problems Differential Evolution Algorithm,” Turkish Journal of Electrical Engineering and Computer Sciences, Vol.12,No.1,53-60, 2004.
13. G.Kuvat, “An Effect Analysis of the parallel Migrating Birds Optimization”, Algorithm Parameters, 6(1),41-49, 2020.