PanPalitta / phase_estimation

This project apply reinforcement learning algorithms based on DE and PSO to optimize adaptive quantum-phase estimation.
http://panpalitta.github.io/phase_estimation/
GNU General Public License v3.0
9 stars 5 forks source link

Drop the support for optimization of complex number data type #10

Closed PanPalitta closed 9 years ago

PanPalitta commented 9 years ago

There are many problems in making the code support both double and complex number data type, mainly because complex number data consisted of two data and manipulating them are not compatible with other standard numerical types.

peterwittek commented 9 years ago

In general, a structure of arrays gives you better performance than an array of structures. Given that the complex doubles extensively feature in the speed-critical part of the code, this change would improve execution time.

peterwittek commented 9 years ago

This is now mainly done. The only place where the complex type remains is the phase_loss_opt function.

peterwittek commented 9 years ago

The remaining complex variables in phase_loss_opt never appear in templated functions and they are never broadcast via MPI either. I believe it is a good idea to keep them, as they simplify mathematical operations. If you agree, we can close this issue.

PanPalitta commented 9 years ago

I agree. The complex variables in phase_loss_opt is just for generating a quantum state, so it's only relevant for the calculation of the fitness value and nothing else in the optimization process.