Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

mean_estimation.complex_phase_oracle_test.test_phase_oracle is very slow because of Fxp

Open mpharrigan opened this issue 1 year ago • 3 comments

This is the change: https://github.com/quantumlib/Qualtran/pull/1041/files#r1638968757

Somehow, this has turned the parameterized unit test from a 1 second to a 21 second ordeal on my machine.

Is it worth resuscitating our own fixed-point-bits function? or is there a better incantation to the Fxp library to get it to go faster?

Perhaps related: https://github.com/quantumlib/Qualtran/issues/643#issuecomment-2065491533

mpharrigan avatar Jun 13 '24 21:06 mpharrigan

I never dug into what was the cause of the slowness, whether it was Fxp or whether it was something else.

fdmalone avatar Jun 13 '24 21:06 fdmalone

@anurudhp do you know if your change fixed this

mpharrigan avatar Aug 08 '24 16:08 mpharrigan

Unfortunately not, we are still using fxpmath.Fxp to convert input floats to bits, which seems to be very slow.

anurudhp avatar Aug 08 '24 21:08 anurudhp