Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

Migrate t_complexity to `QECGatesCost` cost key

Open mpharrigan opened this issue 6 months ago • 1 comments

With the goal of #539 there are now two built-in ways of counting gates: one where you have to provide which gates to count and another, more-opinionated one that makes some assumptions about the relevant counts for a surface code / lattice surgery / qec execution model. This latter one is QECGatesCost and is similar to the t_complexity protocol. These two protocols should be unified.

  • Reduce the amount of dynamacism and magic in existing t_complexity while verifying no regression in t count. This is mostly done, see https://github.com/quantumlib/Qualtran/pull/678 https://github.com/quantumlib/Qualtran/pull/740 https://github.com/quantumlib/Qualtran/pull/803 https://github.com/quantumlib/Qualtran/pull/1015 https://github.com/quantumlib/Qualtran/pull/1012 https://github.com/quantumlib/Qualtran/pull/996 https://github.com/quantumlib/Qualtran/pull/994
  • Split the cirq t-complexity from pure-bloqs t-complexity https://github.com/quantumlib/Qualtran/pull/835
  • Remove remaining _t_complexity_ overrides and move logic either to from_directly_countable_bloqs (probably most of them) or duplicate to the my_static_costs generic method otherwise
  • make the t_complexity function and method be a wrapper around QECGateCost computation; verify identical resource counts

mpharrigan avatar Aug 05 '24 20:08 mpharrigan