The implementation of the algorithm itself is based on "The Hidden Subgroup Problem and Eigenvalue Estimation on a Quantum Computer" (Michele Mosca, Artur Ekert) and the Appendix of "A Quantum “Magic ...