-
Notifications
You must be signed in to change notification settings - Fork 58
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
Implement Kikuchi graph oracles and block-encoding #1555
base: main
Are you sure you want to change the base?
Implement Kikuchi graph oracles and block-encoding #1555
Conversation
@tanujkhattar ptal! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % nits
Note on sparsity: This bloq expects the user to provide the sparsity, as it is in general | ||
difficult to compute the precise sparsity of the Kikuchi matrix efficiently. As long as the | ||
provided number is at least the true sparsity, the algorithm will work as expected. | ||
In case the provides sparsity is smaller, it is equivalent to making the remaining entries zero in the final block encoding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case the provides sparsity is smaller, it is equivalent to making the remaining entries zero in the final block encoding. | |
In case the provided sparsity is smaller, it is equivalent to making the remaining entries zero in the final block encoding. |
|
||
The Kikuchi matrix is indexed by $S \in {[n] \choose k}$. | ||
For a given row $S$ and column $T$, the entry $\mathcal{K}_{k}_{S, T}$ | ||
is potentially non-zero if $S \Delta T = U_j$ for some $j$, which is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify whether
For a given row $S$ and column $T$, the entry $\mathcal{K}_{k}_{S, T}$ | ||
is potentially non-zero if $S \Delta T = U_j$ for some $j$, which is | ||
equivalent to $T = S \Delta U_j$. | ||
Here, $U_j$ is the $j$-th unique scope in the instance $\mathcal{I}$. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also not clear what you mean by "unique scope in the instance". Adding more details would be helpful!
|
||
|
||
@frozen | ||
class KikuchiNonZeroIndex(Bloq): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that the context to understand what's happening in this Bloq becomes clearer if the user also reads some of the other bloq docstrings (eg: ones for kxor_instance and other kikuchi matrix bloqs). It'd be helpeful (here and elsewhere) if we (a) either include a brief overview of the problem setup and define the necessary terms OR (b) add a sentence the refers the reader to docstrings of other bloqs to understand the background so the explanation in the docstring is easier to follow. I've highlighted two examples below of things that are not immediately clear without additional context.
part of #1348
Implements the Kikuchi graph adjacency matrix and adjacency list oracles, along with ones to load and index the constraints. And uses the oracles to build a sparse matrix block-encoding of the Kikuchi matrix.