Posts

Showing posts from December, 2025

Quantum Inspired Evolutionary Algorithms

Image
Genetic Algorithms (GAs) are based on concepts borrowed from biology: selection, crossover, and mutation. Quantum Inspired Evolutionary Algorithms  (QIEAs) borrow concepts from both biology (selection and mutation) and  quantum mechanics (measurement, qubit-style probabilistic encoding, and simple gate-like updates. The key word here is "inspired", QIEAs are not quantum computing. They are quantum by analogy. The Knapsack Problem Suppose you have a container like a knapsack or maybe a shipping container. It has a fixed weight capacity, $C$. You also have a collection of objects. Each object has a weight and a value, $({w_i},{v_i})$. We wish to pack the knapsack with the most value we can without exceeding the weight capacity. We can express this as an optimization problem. \[\max \,\sum\limits_i {{v_i}{x_i}} \] \[\sum\limits_i {{w_i}{x_i} \leqslant C} \] \[{x_i} \in \{ 0,1\} \forall i\] ${x_i}$ is an indicator variable that can take on the value of 1 if the item is inclu...