unitaryfund / qrack

Comprehensive, GPU accelerated framework for developing universal virtual quantum processors
https://qrack.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
176 stars 38 forks source link

Call ZeroAmplitudes() as opportune for Compose() #796

Closed WrathfulSpatula closed 3 years ago

WrathfulSpatula commented 3 years ago

When QEngine types are used as QPager "pages," they might compose with another page that has 0 overall probability within it. If so, we know the Compose() operation will lead to a product state with 0 total internal probability represented, and we can deallocate the RAM for this page.