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

SelectHubbard does not serialize #975

Open fdmalone opened 2 months ago

fdmalone commented 2 months ago
        except Exception as e:
>           raise BloqCheckException.fail('Serialization Failed:\n' + str(e)) from e
E           qualtran.testing.BloqCheckException: Serialization Failed:
E           Cannot serialize <function SelectHubbard.decompose_from_registers.<locals>.<lambda> at 0x7f226b215d00> of unknown type <class 'function'>

pretty sure this is the ApplyGateToLthTarget lambda for the nth gate.

cc @tanujkhattar