Open kevinsung opened 1 month ago
@kevinsung Could you tell the situation that application specifies a random number generator of numpy as a seed instead of int value? I know Qiskit takes a random number generator of numpy as a seed. Do you need to reuse the same instance?
Yes, exactly, if you already have a random Generator instance, it's best to use it everywhere to ensure that the results are as "random" as possible.
@kevinsung The issue with this request is the seed option is only used in the C++ code which has no idea about numpy objects and can only handle int values to initialize the C++ rng generator. You would need to convert the Python object into an int for the C++ code to be able to use.
To work around this issue I've been passing seed_simulator=rng.integers(2**32)
. I'm not sure if this is totally valid, but if something like this is valid, then the AerSimulator can do it itself.
What is the expected behavior?
This should work: