A demonstration of the logic of a quantum genetic algorithm and an example of its application to a real problem.