Anurudh Peduri
Anurudh Peduri
closed in favor of #1327
Ah! I think we should document this in the code clearly.
This has deviated too much from main, closing it for now. We can make a new refactor PR if needed
Sample code snippet: ```py import sympy from qualtran.bloqs.basic_gates import ZPowGate t, eps = sympy.symbols(r"t \epsilon") bloq = ZPowGate(exponent=t, eps=eps) print(bloq.t_complexity()) ``` Prints `TComplexity(rotations=1)`. One could do `bloq.t_complexity().t_incl_rotations(eps)`, but this `eps`...
`.t_complexity()` raises a `TypeError` for the second and third examples.
We should also override `ZPowGate.get_ctrl_system` to return a `CZPowGate` (similar to other basic gates).
@tanujkhattar's comment: > It's better to store frequency of `eps` by assuming we can represent float `eps` as a fraction `x / 2^{precision}` and store frequencies of `x`; with `precision`...
@mpharrigan ptal!
The code snippet I was trying to use (which works with this PR): ```py import sympy from qualtran.bloqs.basic_gates import ZPowGate from qualtran.resource_counting import get_cost_value, QECGatesCost t, eps = sympy.symbols(r"t \epsilon")...
Unfortunately not, we are still using `fxpmath.Fxp` to convert input floats to bits, which seems to be very slow.