Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the cuTensor version and fix state retrieval logic for tensornet #2353

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion runtime/cudaq/qis/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ std::complex<double> state::operator[](std::size_t idx) const {
// network state.
std::vector<int> basisState(numQubits, 0);
// Are we dealing with qudits or qubits?
if (std::log2(numElements) / numQubits > 1) {
/// NOTE: Following check makes assumption that only qubit simulation uses
/// GPU(s)
if (!internal->isDeviceData() && std::log2(numElements) / numQubits > 1) {
for (std::size_t i = 0; i < numQubits; ++i) {
basisState[i] = 1; // TODO: This is a placeholder. We need to figure out
// how to handle qudits.
Expand Down
2 changes: 1 addition & 1 deletion scripts/configure_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if [ "$1" == "install-cutensor" ]; then
CUDA_ARCH_FOLDER=$([ "$(uname -m)" == "aarch64" ] && echo sbsa || echo x86_64)

# [>cuTensorInstall]
CUTENSOR_VERSION=2.0.1.2
CUTENSOR_VERSION=2.0.2.5
CUTENSOR_DOWNLOAD_URL=https://developer.download.nvidia.com/compute/cutensor/redist/libcutensor

cutensor_archive=libcutensor-linux-${CUDA_ARCH_FOLDER}-${CUTENSOR_VERSION}-archive.tar.xz
Expand Down
Loading