Skip to content

Conversation

@mpharrigan
Copy link
Collaborator

This changes the default implementation of t_complexity to go via QECGatesCost. This builds on the prior changes #1313 #1323 #1333 and the even longer history of bloq-ifying the t_complexity protocol

Specifically in this PR there are

  • some changes to get matching clifford counts (t & rotation counts were already settled)
  • A flag to QECGatesCost that can toggle "legacy" behavior for exact matching of counts. You can read the code to see exactly what this is
  • Converters to the "legacy" TComplexity object.

With these changes: all bloq examples match their T complexities. All tests pass.

Next steps will be to remove all _t_complexity_ overrides. This should be seamless, as I did most of the testing without the legacy shim to priorities _t_complexity_ override and fixed most of the issues (usually by moving the costs to my_static_costs).

Pending resolution of #1318, we can change the way MultiTargetCNOT is handled. In this PR: the legacy flag makes it count as multiple cliffords; otherwise the "new" behavior of counting it as one object is maintained. If we want it to always count as multiple, then a symbolic call graph is needed.

@mpharrigan mpharrigan force-pushed the 2024-08/t-matching-finale branch from b4f72a0 to 667cc3e Compare August 28, 2024 21:36
@mpharrigan mpharrigan enabled auto-merge (squash) August 30, 2024 20:57
@mpharrigan mpharrigan merged commit a36c50f into quantumlib:main Aug 30, 2024
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