quil-lang / quilc

The optimizing Quil compiler.
Apache License 2.0
452 stars 73 forks source link

remove randomization in `find-diagonalizer-in-e-basis` #847

Closed stylewarning closed 1 year ago

stylewarning commented 1 year ago

I don't think the F-D-I-E-B is a "probabilistic algorithm" in the traditional sense (i.e., we don't need randomness to asymptotically converge to something), we just need numbers that break possible degenerate relationships between the Re and Im part. I propose we replace the RNG with something aperiodic but deterministic sequence like $r_k = \vert\sin \frac{k}{10}\vert$ for $k=1,2,\ldots$. This sequence will get arbitrarily close to every value in $[0,1]$, but that probably matters only to the theoretician.

ecpeterson commented 1 year ago

👍