-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear how to use symbolics #951
Comments
Yes, only some bloqs support symbolic parameters but there's no way of (reliably) knowing which. Some fixes that we need
|
Can you tell me which bloqs do support it, just so I have some examples to work with for now :) ? |
qrom supports it after #945 |
Thanks @tanujkhattar, now this works properly!
However, while I can decompose a numeric bloq, I can't decompose a symbolic one:
|
This is because a QROM decomposes into a unary iteration circuit; if the number of selection registers is symbolic (depends upon Similar to qref, the size of each port can be symbolic but the number of ports in the decomposition should not be. Whenever a symbolic bloq would have variable number of ports in its decomposition, you would get an error. |
Discussed offline: but state prep alias sampling should be able to do one level of decomposition since the symbolic bitsizes of all the wires are preserved. Decomposing a qrom circuit with symbolic size is not possible since we need to split symbolically-sized registers into a concrete number of qubit wires One can use the call graph protocol to get callees without knowing exactly how they're wired up |
I tried to create some bloqs with symbolic costs and it's unclear how exactly to do that.
Here's the numeric version:
This works well and returns:
TComplexity(t=96, clifford=533, rotations=0)
However if I try the following:
I'm getting:
TypeError: cannot determine truth value of Relational
Perhaps things are working properly and I'm just using them in a wrong way, but I also wanted to give you some feedback on how it looks like from a user's perspective :) From reading the docs and tests I wasn't able to figure out how to make it work – I didn't see tests for symbolics for this bloq.
The text was updated successfully, but these errors were encountered: