pyqtorch
pyqtorch copied to clipboard
[Feature] Add wavefunction normalization check
Certain numerical operations like the Hamiltonian Evolution with RK4 method do not conserve the wavefunction normalization. We should either:
- Add a normalization check at certain steps in the computation and raise an error when above certain threshold.
- Add a renormalization step to any non-norm-conserving operations (the danger being that the results will diverge without raising any errors).
Implement both of the above solutions with a flag for choosing which one to use when building the quantum circuit.