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 unary iteration bloq from Cirq-FT #399

Merged
merged 3 commits into from
Oct 13, 2023
Merged

Add unary iteration bloq from Cirq-FT #399

merged 3 commits into from
Oct 13, 2023

Conversation

tanujkhattar
Copy link
Collaborator

Part of Qualtran & Cirq-FT Integration

This is working sooooo nicely. Notice the assert_valid_bloq_decomposition in the tests for unary iteration :)

bloq = ApplyXToLthQubit(2, 4, 2)
cbloq = bloq.decompose_bloq()
draw_musical_score(get_musical_score_data(cbloq))
image

@fdmalone
Copy link
Collaborator

Very nice. bloq_counts and get_bloq_counts_graph work as expected too.

@fdmalone
Copy link
Collaborator

 {Split(n=4): 1,
  Join(n=2): 2,
  TGate(): 16,
  ArbitraryClifford(n=2): 58,
  CirqGateAsBloq(gate=(cirq.Y**0.5)): 7,
  CirqGateAsBloq(gate=(cirq.Y**-0.5)): 7,
  CirqGateAsBloq(gate=cirq.CZ): 7,
  Join(n=4): 1,
  Split(n=2): 2})

@fdmalone
Copy link
Collaborator

fdmalone commented Oct 13, 2023

Is there anything to review here or is this just copy paste? It could be nice to add some bloq drawings to the notebook in the future.

@tanujkhattar
Copy link
Collaborator Author

This is just copy paste for now. Let's add improvements in follow up PRs to keep the complexity manageable.

I'll start moving other algos once this is merged.

@fdmalone
Copy link
Collaborator

LGTM

@fdmalone fdmalone self-requested a review October 13, 2023 23:14
@fdmalone fdmalone merged commit 2c173fc into main Oct 13, 2023
8 checks passed
@mpharrigan mpharrigan deleted the unary_iteration branch November 22, 2023 18:19
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