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

Add SymmetricBanded matrix block encoding #1177

Merged
merged 11 commits into from
Jul 26, 2024

Conversation

charlesyuan314
Copy link
Contributor

Add row and column oracles to block encode a symmetric banded matrix. The symmetry here refers to the pattern of non-zero entries, not necessarily the entries themselves, which are determined separately by the entry oracle.

Copy link
Collaborator

@mpharrigan mpharrigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things, but lgtm after fixing them

Comment on lines +319 to +321
is_symbolic(self.bandsize)
or is_symbolic(self.system_bitsize)
or is_symbolic(self.num_nonzero)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably keep this check for now, but it's interesting that I think this method would still work for symbolic values (except for the check, which can be ignored for symbolic)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right that it would still work. Is it expected that we would ever call_classically a bloq with symbolic attributes but concrete ClassicalValT?

qualtran/bloqs/block_encoding/sparse_matrix.py Outdated Show resolved Hide resolved
@charlesyuan314 charlesyuan314 enabled auto-merge (squash) July 26, 2024 17:41
@charlesyuan314 charlesyuan314 merged commit c272b66 into quantumlib:main Jul 26, 2024
8 checks passed
@charlesyuan314 charlesyuan314 deleted the banded branch July 30, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants