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

Add support for random seed in tensornet and tensornet-mps backends #895

Closed
1tnguyen opened this issue Nov 9, 2023 · 1 comment · Fixed by #2398
Closed

Add support for random seed in tensornet and tensornet-mps backends #895

1tnguyen opened this issue Nov 9, 2023 · 1 comment · Fixed by #2398
Assignees
Labels
maintenance Work items to update and improve the code base

Comments

@1tnguyen
Copy link
Collaborator

1tnguyen commented Nov 9, 2023

Currently, these 2 backends don't support random seed since cutensornetsamplersample is using a random default seed.

When cutensornetsamplersample allows resetting the seed to a user-defined value, we need to update the backends to support cudaq::set_random_seed.

Enable these tests once this issue is fixed (PR #863):

#ifndef CUDAQ_BACKEND_TENSORNET

@1tnguyen 1tnguyen added the maintenance Work items to update and improve the code base label Nov 9, 2023
@1tnguyen 1tnguyen self-assigned this Nov 9, 2023
@bmhowe23
Copy link
Collaborator

bmhowe23 commented Jul 26, 2024

Related: https://github.com/NVIDIA/cuda-quantum/actions/runs/10104408125 failed with this error while processing docs/sphinx/examples/cpp/other/random_walk_qpe.cpp on the tensornet-mps backend:

Exited with code 134
a.out: /workspaces/cuda-quantum/runtime/nvqir/cutensornet/simulator_cutensornet.cpp:162: virtual bool nvqir::SimulatorTensorNetBase::measureQubit(std::size_t): Assertion `std::abs(1.0 - (prob0 + prob1)) < 1e-9' failed.

The docs link provided above still says the ability to reset the seed to a user-defined value may be provided in the future.

The problem in the Publishing run cannot easily be debugged without the ability to set the random seed.

CUDA-Q version used in the publishing run above: bac06f8 (main)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Work items to update and improve the code base
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants