Skip to content

Conversation

@TysonRayJones
Copy link
Member

@TysonRayJones TysonRayJones commented Jun 13, 2025

so that the COMPILE_CUQUANTUM preprocessor need only ever be consulted by the source during compilation, as per Oliver's suggestion in #645

so that the COMPILE_CUQUANTUM preprocessor need only ever be consulted by the source during compilation
@TysonRayJones
Copy link
Member Author

For posterity: one might wonder whether it's natural or worthwhile to support runtime or post-compilation toggling of cuQuantum. That is:

  • cuQuantum remains compile-time optional so that use of QuEST does not require its installation
  • if cuQuantum was compiled, it can be runtime disabled using e.g. initCustomQuESTEnv(), or an environment variable.
  • if it was not compiled, attempting to runtime force-enable it would trigger an error message

The benefits of this are not very compelling. It would enable performance comparisons of cuQuantum vs QuEST kernels without recompiling the QuEST source. That's a niche usecase which should be made redundant by us only using cuQuantum where performant. This benefit does not outweigh the necessary increase of the code complexity in gpu_subroutines.cpp to perform both compile-time and runtime branching.

@TysonRayJones TysonRayJones merged commit c357267 into devel Jun 14, 2025
130 checks passed
@TysonRayJones TysonRayJones deleted the bind-iscuquantum-to-env branch June 14, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants