quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
134 stars 35 forks source link

`SingleQubitCompare` has wrong T-complexity annotation? #1010

Closed tanujkhattar closed 1 month ago

tanujkhattar commented 1 month ago

_t_complexity_ annotation says 16 cliffords but decomposition is cleary using 5 cliffords + 1 And = 14 cliffords. The decomposition is not consistent with t-complexity.

I'm working on a PR to remove _t_complexity_ from comparison gates and found this (cc @NoureldinYosri @dstrain115 )

See decomposition here https://github.com/quantumlib/Qualtran/blob/8ea026792f0d86cf45f0309f7c6f37253dcc42c2/qualtran/bloqs/arithmetic/comparison.py#L330-L369