quantum
quantum copied to clipboard
qsim path is weird
Let's investigate why this happens:
#include "../qsim/..."
and if it is possible that:
#include "qsim/..."
This might have to do with: https://github.com/quantumlib/qsim/issues/69
This issue has not had any activity in a month. Is it stale ?
I figured out what's going on the weird path. In bazel, it's creating the temporary cache directory path bazel_{project_name}
. For example, for tensorflow quantum, it has quantum
as project name, so it creates bazel_quantum
directory. Inside it, it collects the whole dependency library path as well as tensorflow_quantum
itself. So, in the directory, we can observe:
-
tensorflow_quantum
-
qsim
so to access the qsim
directory, we need to use ../
as prefix.
To make the qsim
itself as default include path, like #include "qsim/"
, we can use the bazel's cc_library(includes = ["PATH"])
option. To do that, we may re-organize qsim
directory structure. For example, add qsim
directory, and put lib
directory under it, then we can use #include "qsim/lib/..."
.
Let me prepare a PR to fix this, and maybe this will be a starter for migrating qsim to full bazel supports as mentioned in https://github.com/quantumlib/qsim/issues/69