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
174 stars 38 forks source link

int64_t OpenCL device count #969

Closed WrathfulSpatula closed 2 years ago

WrathfulSpatula commented 2 years ago

We will likely never need 2^64+ bits of OpenCL device addressing in our lifetimes, or many lifetimes after. However, conceivably, we could at some time exceed 2^32 devices, (or 2^31, with sign degeneracy in Qrack). By finishing the already vestigial shift toward the assumption of 64-bit device indices, we future-proof this, probably forever, even if the OpenCL standard might assume 32 bits of device enumeration, for now.

I need to make sure this works with XACC. If it doesn't, I will hold off on merge, to also update the XACC plugin. However, I'm guessing this probably won't break that build, and then I'll be merging, shortly.

WrathfulSpatula commented 2 years ago

XACC uses a special method to initialize Qrack layers automatically for its purpose, which was meant to avoid the need for spurious update in cases like these. I'll wait for CI, and then I'll merge.