1. A method of optimising at least one measure that is a quadratic function of a wavefunction, the method comprising: superimposing a plurality of wavefunctions; determining a relationship between the superimposed wavefunctions and the quadratic measure, and using the determined relationship to identify the superimposed wavefunctions that provide a desired or optimised quadratic measure.