Qualtran
Qualtran copied to clipboard
Fast QSP method is imprecise
The fast_complementary_polynomial method is very imprecise when compared to the qsp_complementary_polynomial. This is particularly an issue when polynomials with real coefficience are used (and the method is restricted to return a real complementary polynomial). In one such test, the precision must be set as low as 1e-1 for the test to pass.
For other tests, fast_qsp must be set to 1e-4 while generalized_qsp can be set to a higher precision of 1e-9.
Running the code from the paper that fast_qsp was based on, we found the method itself is imprecise.
A more recent paper addresses this very issue by providing an input that controls the precision of the complementary polynomial.
In particular, Algorithm 2 would best solve the problem and Theorem 4 should control the error.