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
173 stars 40 forks source link

qubits are never freed in many cirq-style decompositions of arithmetic gates #1011

Closed tanujkhattar closed 4 months ago

tanujkhattar commented 4 months ago

All calls to context.qubit_manager.qalloc should be followed by calls to context.qubit_manager.qfree. Many arithmetic gate decompositions do not free the allocated qubits. This is bad and should be fixed.