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

Shared library exception handling #935

Closed WrathfulSpatula closed 2 years ago

WrathfulSpatula commented 2 years ago

In considering how PyQrack should handle C++ exceptions, it occurred to me that a C external interface probably should not raise C++11 exceptions at all, past the top level of the API. For PyQrack, likely, the QrackSimulator will poll the error code and re-throw a Python exception.