Skip to content

Commit 6e603a3

Browse files
authored
Use QROAMClean in Chemistry Sparse Prepare bloq (#1316)
1 parent 4e18633 commit 6e603a3

10 files changed

Lines changed: 173 additions & 229 deletions

File tree

dev_tools/qualtran_dev_tools/all_call_graph.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
"""Generate the library-wide call graph from all bloq examples."""
16+
import logging
1617
import warnings
1718
from typing import Iterable
1819

@@ -31,6 +32,8 @@
3132
ignore_split_join,
3233
)
3334

35+
logger = logging.getLogger(__name__)
36+
3437

3538
def get_all_call_graph(bes: Iterable[BloqExample]):
3639
"""Create a call graph that is the union of all of the bloqs in the list of bloq examples.
@@ -70,6 +73,7 @@ def keep(b: Bloq) -> bool:
7073
ssa = SympySymbolAllocator()
7174

7275
for be in bes:
76+
logger.info("Building call graph for: %s", be.name)
7377
bloq = be.make()
7478
_build_call_graph(
7579
bloq=bloq, generalizer=generalize, ssa=ssa, keep=keep, max_depth=None, g=g, depth=0

qualtran/bloqs/block_encoding/lcu_block_encoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def system_bitsize(self) -> int:
115115

116116
@cached_property
117117
def selection_registers(self) -> Tuple[Register, ...]:
118-
return self.prepare.selection_registers
118+
return self.select.selection_registers
119119

120120
@cached_property
121121
def junk_registers(self) -> Tuple[Register, ...]:

0 commit comments

Comments
 (0)