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

Windows stabilizer debug #938

Closed WrathfulSpatula closed 2 years ago

WrathfulSpatula commented 2 years ago

There might be a particularly bad bug in the Windows compiler implementation of std::swap() for std::vector<std::vector<bool>> elements, which affects our QStabilizer implementation. I hesitate to add a partial workaround I have for that, because it seems unlikely that this particular case of std::swap() would be bugged, and we might rather have something like a segmentation fault corrupting std::vector<std::vector<bool>>. I need to do more research into the issue, before I address the primary bug. However, this entailed minor style refactoring that can go in immediately.