-
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
Add support for multi-indexed data loading for both QROM and SelectSwapQROM #108
Comments
We also need multi-indexed selectedmajoranafermion and applygatetolthqubit for #107 |
Is this done? |
QROM yes (I think). For SelectSwapQROM where I've seen this in the literature they typically form a contiguous index from the multi index and do 1D array access if I'm reading this correctly. Although now that I write this I would assume QROM would also incur a contiguous index formation cost... |
@fdmalone The additional cost for computing a contiguous register is required only for the cases where one of the selection indices depends upon the other. For example for i in range(N):
for j in range(i):
# Load data[i][j] ==> This requires computing a contiguous register for i in range(N):
for j in range(M):
# Load data[i][j] ==> This DOES NOT require computing a contiguous register QROM supports the second case, |
thanks, I always found that appendix confusing. |
Unary iteration now supports writing nested for-loops by iterating over multiple qubit registers, each of different lengths. This support should be extended to QROM so that we can load, for example,
data[i][j]
in the target register when selection registers storei
andj
.The text was updated successfully, but these errors were encountered: