[x] Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
[x] Make sure you've read the documentation. Your issue may be addressed there.
[x] Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
[x] If possible, make a PR with a failing test to give us a starting point to work on!
This can cause issues if you are not using bash, as once install_cuda_quantum.$(uname -m) finishes running, you are returned to the calling shell. In my case, I am using zsh. The issues occurs because /opt/nvidia/cudaq/set_env.sh uses ${BASH_SOURCE[0]} which doesn't work well when using zsh.
Steps to reproduce the bug
Run a shell other than bash (such as zsh) and then attempt to source the environment file.
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
CUDA Quantum version: any
Python version: any
C++ compiler: any
Operating system: Ubuntu 22.04
Suggestions
This is honestly a pretty tricky situation to fix. Ideally you'd just insert a cheeky #!/bin/bash up top, but that does not work when you are sourcing a file.
Required prerequisites
Describe the bug
The quick start installation guide says to install and use cuda-quantum like so:
This can cause issues if you are not using bash, as once
install_cuda_quantum.$(uname -m)
finishes running, you are returned to the calling shell. In my case, I am using zsh. The issues occurs because/opt/nvidia/cudaq/set_env.sh
uses${BASH_SOURCE[0]}
which doesn't work well when using zsh.Steps to reproduce the bug
Run a shell other than bash (such as zsh) and then attempt to source the environment file.
Expected behavior
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
This is honestly a pretty tricky situation to fix. Ideally you'd just insert a cheeky
#!/bin/bash
up top, but that does not work when you are sourcing a file.For me, I fixed it by instead using
in my
/opt/nvidia/cudaq/set_env.sh
Which works well for zsh, but not for bash.
To be the most portable, perhaps the documentation should just say to run the command in a bash shell and mention other shells might be problematic.