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 Unitary and TensorProduct block encodings #1094

Merged
merged 12 commits into from
Jul 2, 2024

Conversation

charlesyuan314
Copy link
Contributor

@charlesyuan314 charlesyuan314 commented Jun 27, 2024

Add instances of BlockEncoding that implement 1) a trivial block encoding of a unitary operator and 2) a tensor product of block encodings.

Extend the BlockEncoding interface to expose the properties alpha, ancilla_bitsize, and epsilon of block encodings.

With the newly designed block encoding interface, the selection_registers, junk_registers, and target_registers methods should now be considered deprecated and will be removed in a future PR.

Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

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

Great start, left a round of comments.

qualtran/bloqs/block_encoding/unitary_test.py Outdated Show resolved Hide resolved
qualtran/_infra/registers.py Outdated Show resolved Hide resolved
qualtran/bloqs/block_encoding/block_encoding_base.py Outdated Show resolved Hide resolved
qualtran/bloqs/block_encoding/block_encoding_base.py Outdated Show resolved Hide resolved
qualtran/bloqs/block_encoding/tensor_product.py Outdated Show resolved Hide resolved
qualtran/bloqs/block_encoding/unitary.py Outdated Show resolved Hide resolved
qualtran/bloqs/block_encoding/unitary.py Outdated Show resolved Hide resolved
qualtran/bloqs/block_encoding/unitary.py Outdated Show resolved Hide resolved
qualtran/bloqs/block_encoding/unitary.py Show resolved Hide resolved
Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the changes!

Please open issues to track

  • Migration of NotImplementedError to abc.abstractmethods.
  • Implementation of signal_state for the newly added block encodings.

@tanujkhattar tanujkhattar enabled auto-merge (squash) July 2, 2024 18:33
@tanujkhattar tanujkhattar merged commit bc32731 into quantumlib:main Jul 2, 2024
7 checks passed
@charlesyuan314 charlesyuan314 deleted the be branch July 2, 2024 20:10
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.

4 participants