diff --git a/lib/simmux_gpu.h b/lib/simmux_gpu.h index 9b08ac48..1f0bb592 100644 --- a/lib/simmux_gpu.h +++ b/lib/simmux_gpu.h @@ -18,12 +18,12 @@ #ifdef __CUSTATEVEC__ # include "simulator_custatevec.h" namespace qsim { - using SimulatorGpu = SimulatorCuStateVec; + using SimulatorGpu = SimulatorCuStateVec<>; } #else # include "simulator_cuda.h" namespace qsim { - using SimulatorGpu = SimulatorCUDA; + using SimulatorGpu = SimulatorCUDA<>; } #endif diff --git a/third_party/cuquantum/cuquantum_configure.bzl b/third_party/cuquantum/cuquantum_configure.bzl index d4846ad4..19feb557 100644 --- a/third_party/cuquantum/cuquantum_configure.bzl +++ b/third_party/cuquantum/cuquantum_configure.bzl @@ -196,7 +196,12 @@ def _symlink_genrule_for_dir( def _cuquantum_pip_impl(repository_ctx): - cuquantum_root = repository_ctx.os.environ[_CUQUANTUM_ROOT] + if _CUQUANTUM_ROOT in repository_ctx.os.environ: + cuquantum_root = repository_ctx.os.environ[_CUQUANTUM_ROOT] + else: + repository_ctx.os.environ[_CUQUANTUM_ROOT] = "" + cuquantum_root = "" + if cuquantum_root == "": cuquantum_header_path = _find_file(repository_ctx, "custatevec.h") cuquantum_header_path = cuquantum_header_path[:cuquantum_header_path.find("/custatevec.h")]