quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
132 stars 35 forks source link

Fast QSP method is imprecise #1076

Open Epsilon1024 opened 2 weeks ago

Epsilon1024 commented 2 weeks ago

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.