[QECGatesCost] Port everything to QECGatesCost #1359
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes the default implementation of
t_complexity
to go viaQECGatesCost
. This builds on the prior changes #1313 #1323 #1333 and the even longer history of bloq-ifying the t_complexity protocolSpecifically in this PR there are
QECGatesCost
that can toggle "legacy" behavior for exact matching of counts. You can read the code to see exactly what this isTComplexity
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 tomy_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.