Skip to content
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

Issues with existing Select/Prepare Oracles #549

Open
fdmalone opened this issue Nov 30, 2023 · 4 comments
Open

Issues with existing Select/Prepare Oracles #549

fdmalone opened this issue Nov 30, 2023 · 4 comments
Assignees

Comments

@fdmalone
Copy link
Collaborator

This might be a misunderstanding on my part, but currently we expect that the SelectOracle and PrepareOracle selection registers should match up (in terms of bitsizes) (this is assumed in #508), AND that the selection registers (from prepare) are those registers that we want to reflect about for constructing the walk operator. However, this leads to some awkward cases:

  1. We typically perform a state preparation over a register (sigma) for alias sampling which needs to be reflected on, so it should be a selection register. Now Select would require this register as part of its signature (but won't act on it) and require knowledge of the bitsize.
  2. For sparse state preparation we use a flat register to index non-zero matrix elements and the store the indices in another register (called $|ind_j\rangle$), this ind register doesn't need to be reflected on BUT the ind_j register is used a selection register for SELECT, so again there's some inconsistency.

A possible workaround would be to define black boxes which partition the incoming registers and only select the ones absolutely necessary for the gate, and then prepare should probably define a registers_for_reflection?

@fdmalone fdmalone self-assigned this Nov 30, 2023
@fdmalone
Copy link
Collaborator Author

cc @tanujkhattar @mpharrigan

@mpharrigan
Copy link
Collaborator

What's the essence of the problem? We use PREPARE to create a state but certain parts of that state are reflect-only or use-as-index-only? And the current system assumes the prepared state is both the thing we want to reflect and the indices used for select?

@mpharrigan
Copy link
Collaborator

is my understanding of the issue (close to) correct?

@fdmalone
Copy link
Collaborator Author

fdmalone commented Dec 8, 2023

yes that's right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants