QuState / PhastFT

A high-performance, "quantum-inspired" Fast Fourier Transform (FFT) library written in pure and safe Rust.
Apache License 2.0
193 stars 8 forks source link

Documentation for Planner::new() does not mention power of two requirement #18

Closed HEnquist closed 3 months ago

HEnquist commented 4 months ago

The new() function for the planner panics if the length is not a power of two: https://github.com/QuState/PhastFT/blob/01aed517cb6ebf64930f81574035ebd312b38e93/src/planner.rs#L38

But this is not mentioned in the docstring: https://github.com/QuState/PhastFT/blob/01aed517cb6ebf64930f81574035ebd312b38e93/src/planner.rs#L36

HEnquist commented 4 months ago

The same problem is in the fft() method here: https://github.com/QuState/PhastFT/blob/01aed517cb6ebf64930f81574035ebd312b38e93/src/lib.rs#L29