-
Notifications
You must be signed in to change notification settings - Fork 77
Implement Kikuchi graph oracles and block-encoding #1555
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
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
qualtran/bloqs/optimization/k_xor_sat/kikuchi_adjacency_list.py
Outdated
Show resolved
Hide resolved
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.
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.
Makes sense! I added a reference to KXorInstance
for all the bloqs, which explains the problem and notation.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.