QLT IR (qualtran l1) speed improvements - #1939
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces significant performance optimizations and feature enhancements to Qualtran's L1 IR serialization and Galois field types. Key improvements include fast-path optimizations for register shape and symbolic checks, a fast hashing and equality mixin for Galois field types, and the implementation of a direct recursive FastL1ASTPrinter to bypass slower visitor patterns. Additionally, L1ModuleBuilder and unique key generation have been optimized, and benchmark scripts have been added. The review feedback suggests that the shape validation in FastL1ASTPrinter is too restrictive as it checks against Python's built-in int instead of numbers.Integral, which fails to support NumPy integer types, and warns against allowing arbitrary sympy.Expr due to serialization limitations.
No description provided.