5151from qualtran .bloqs .mcmt .and_bloq import And , MultiAnd
5252from qualtran .bloqs .mcmt .multi_control_multi_target_pauli import MultiControlX
5353from qualtran .cirq_interop .bit_tools import iter_bits
54- from qualtran .cirq_interop .t_complexity_protocol import t_complexity , TComplexity
54+ from qualtran .cirq_interop .t_complexity_protocol import TComplexity
5555from qualtran .drawing import WireSymbol
5656from qualtran .drawing .musical_score import Text , TextBox
5757
@@ -628,12 +628,6 @@ def signature(self):
628628 a = QUInt (self .a_bitsize ), b = QUInt (self .b_bitsize ), target = QBit ()
629629 )
630630
631- def _t_complexity_ (self ) -> 'TComplexity' :
632- # TODO Determine precise clifford count and/or ignore.
633- # See: https://github.com/quantumlib/Qualtran/issues/219
634- # See: https://github.com/quantumlib/Qualtran/issues/217
635- return t_complexity (LessThanEqual (self .a_bitsize , self .b_bitsize ))
636-
637631 def wire_symbol (self , reg : Optional [Register ], idx : Tuple [int , ...] = tuple ()) -> WireSymbol :
638632 if reg is None :
639633 return Text ("a>b" )
@@ -646,11 +640,7 @@ def wire_symbol(self, reg: Optional[Register], idx: Tuple[int, ...] = tuple()) -
646640 raise ValueError (f'Unknown register name { reg .name } ' )
647641
648642 def build_call_graph (self , ssa : 'SympySymbolAllocator' ) -> Set ['BloqCountT' ]:
649- # TODO Determine precise clifford count and/or ignore.
650- # See: https://github.com/quantumlib/Qualtran/issues/219
651- # See: https://github.com/quantumlib/Qualtran/issues/217
652- tc = t_complexity (LessThanEqual (self .a_bitsize , self .b_bitsize ))
653- return {(TGate (), tc .t )}
643+ return {(LessThanEqual (self .a_bitsize , self .b_bitsize ), 1 )}
654644
655645
656646@bloq_example
@@ -868,12 +858,6 @@ class GreaterThanConstant(Bloq):
868858 def signature (self ) -> Signature :
869859 return Signature .build_from_dtypes (x = QUInt (self .bitsize ), target = QBit ())
870860
871- def _t_complexity_ (self ) -> TComplexity :
872- # TODO Determine precise clifford count and/or ignore.
873- # See: https://github.com/quantumlib/Qualtran/issues/219
874- # See: https://github.com/quantumlib/Qualtran/issues/217
875- return t_complexity (LessThanConstant (self .bitsize , less_than_val = self .val ))
876-
877861 def wire_symbol (self , reg : Optional [Register ], idx : Tuple [int , ...] = tuple ()) -> WireSymbol :
878862 if reg is None :
879863 return Text ("" )
@@ -884,11 +868,7 @@ def wire_symbol(self, reg: Optional[Register], idx: Tuple[int, ...] = tuple()) -
884868 raise ValueError (f'Unknown register symbol { reg .name } ' )
885869
886870 def build_call_graph (self , ssa : 'SympySymbolAllocator' ) -> Set ['BloqCountT' ]:
887- # TODO Determine precise clifford count and/or ignore.
888- # See: https://github.com/quantumlib/Qualtran/issues/219
889- # See: https://github.com/quantumlib/Qualtran/issues/217
890- tc = t_complexity (LessThanConstant (self .bitsize , less_than_val = self .val ))
891- return {(TGate (), tc .t )}
871+ return {(LessThanConstant (self .bitsize , less_than_val = self .val ), 1 )}
892872
893873
894874@bloq_example
@@ -923,9 +903,6 @@ class EqualsAConstant(Bloq):
923903 def signature (self ) -> Signature :
924904 return Signature .build_from_dtypes (x = QUInt (self .bitsize ), target = QBit ())
925905
926- def _t_complexity_ (self ) -> 'TComplexity' :
927- return TComplexity (t = 4 * (self .bitsize - 1 ))
928-
929906 def wire_symbol (self , reg : Optional [Register ], idx : Tuple [int , ...] = tuple ()) -> WireSymbol :
930907 if reg is None :
931908 return Text ("" )
0 commit comments