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

Fix t_complexity for symbolic ham. sim. by gqsp example #944

Merged

Conversation

anurudhp
Copy link
Contributor

@anurudhp anurudhp commented May 10, 2024

Copy link
Collaborator

@fdmalone fdmalone left a comment

Choose a reason for hiding this comment

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

LGTM % I'm slightly uneasy about the util bloq inheritance.

@anurudhp anurudhp force-pushed the fix-t-complexity-for-gqsp-examples branch from c8d5711 to 278354c Compare May 11, 2024 13:27
@anurudhp
Copy link
Contributor Author

@fdmalone @tanujkhattar ptal (notebook test failure is unrelated (#911))

@anurudhp anurudhp force-pushed the fix-t-complexity-for-gqsp-examples branch from c8479c7 to e67c580 Compare May 16, 2024 09:10
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.

style things

@@ -50,8 +50,31 @@
from qualtran.simulation.classical_sim import ClassicalValT


class UtilBloq(Bloq, metaclass=abc.ABCMeta):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is reasonable, but please

  • Rename to BookkeepingBloq, which is more specific than "util" (a name I despise -- we can change the module later :). This also makes the properties make sense: a bookkeeping bloq is trivially controlled and does notn affect the t complexity
  • make private, i.e. _BookkeepingBloq

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed to _BookkeepingBloq

Comment on lines 54 to 58
"""Base class for util bloqs.

1. Trivial controlled - pass through the control register.
2. Do not affect T complexity.
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

grammar & style in this docstring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

polished the docstring, how does it look now?

qualtran/bloqs/util_bloqs.py Show resolved Hide resolved
@mpharrigan
Copy link
Collaborator

Can you update the PR description to summarize the changes present in this PR

@anurudhp anurudhp force-pushed the fix-t-complexity-for-gqsp-examples branch from 542e72b to 9fac150 Compare May 16, 2024 23:30
@anurudhp anurudhp requested a review from mpharrigan May 16, 2024 23:43
@mpharrigan mpharrigan dismissed fdmalone’s stale review May 17, 2024 18:22

comments addressed

@mpharrigan mpharrigan enabled auto-merge (squash) May 17, 2024 18:22
@mpharrigan mpharrigan merged commit 7b602c1 into quantumlib:main May 17, 2024
7 checks passed
@anurudhp anurudhp deleted the fix-t-complexity-for-gqsp-examples branch May 17, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants