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

[Costs] Bloq & Gate counts #958

Merged
merged 8 commits into from
May 30, 2024

Conversation

mpharrigan
Copy link
Collaborator

This introduces two CostKeys to let you count gates in different ways. Part of #899

  • BloqCount takes a sequence of bloqs to count (based on equality)
  • QECGatesCost counts the common "leaf bloqs" we care about, cc More Leaf Bloqs #873

@@ -99,4 +100,7 @@ def test_hamiltonian_simulation_by_gqsp(

def test_hamiltonian_simulation_by_gqsp_t_complexity():
hubbard_time_evolution_by_gqsp = _hubbard_time_evolution_by_gqsp.make()
_ = hubbard_time_evolution_by_gqsp.t_complexity()
t_comp = hubbard_time_evolution_by_gqsp.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.

Is there a reason you just picked this test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

somewhat arbitrary -- seemed like a reasonably complicated example

@mpharrigan
Copy link
Collaborator Author

I've gone through all the bloq examples and validated that each bloq_example with a non-erroring t_complexity() has a matching get_cost_val(bloq, QECGatesCost).total_t_count().

This PR does not include rotations! Will do in a follow-up

@fdmalone fdmalone self-requested a review May 22, 2024 18:31
@mpharrigan mpharrigan merged commit bae2356 into quantumlib:main May 30, 2024
7 checks passed
@mpharrigan mpharrigan mentioned this pull request Aug 22, 2024
6 tasks
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