4545from qualtran .bloqs .state_preparation .prepare_uniform_superposition import (
4646 PrepareUniformSuperposition ,
4747)
48- from qualtran .resource_counting import BloqCountT , SympySymbolAllocator
48+ from qualtran .resource_counting import BloqCountDictT , SympySymbolAllocator
49+ from qualtran .resource_counting .generalizers import ignore_split_join
4950from qualtran .symbolics import is_symbolic , SymbolicFloat , SymbolicInt
5051from qualtran .symbolics .math_funcs import bit_length
5152
@@ -186,7 +187,7 @@ def diffusion(self):
186187 ],
187188 )
188189
189- def build_call_graph (self , ssa : SympySymbolAllocator ) -> set [ BloqCountT ] :
190+ def build_call_graph (self , ssa : SympySymbolAllocator ) -> BloqCountDictT :
190191 counts = Counter [Bloq ]()
191192
192193 counts [self .diffusion ] += 1
@@ -202,7 +203,7 @@ def build_call_graph(self, ssa: SympySymbolAllocator) -> set[BloqCountT]:
202203 counts [self .col_oracle .adjoint ()] += 1
203204 counts [self .diffusion .adjoint ()] += 1
204205
205- return set ( counts . items ())
206+ return counts
206207
207208 def build_composite_bloq (
208209 self , bb : BloqBuilder , system : SoquetT , ancilla : SoquetT , ** soqs
@@ -282,7 +283,7 @@ def build_composite_bloq(
282283 return soqs
283284
284285
285- @bloq_example
286+ @bloq_example ( generalizer = ignore_split_join )
286287def _sparse_matrix_hermitian_block_encoding () -> SparseMatrixHermitian :
287288 from qualtran .bloqs .block_encoding .sparse_matrix import TopLeftRowColumnOracle
288289 from qualtran .bloqs .block_encoding .sparse_matrix_hermitian import UniformSqrtEntryOracle
0 commit comments