utils.algorithm_globals#

Common (global) properties used across qiskit_algorithms.

Includes:

  • Random number generator and random seed.

    Algorithms can use the generator for random values, as needed, and it can be seeded here for reproducible results when using such an algorithm. This is often important, for example in unit tests, where the same outcome is desired each time (reproducible) and not have it be variable due to randomness.

random_seed#

Random generator seed (read/write).

Type:

int | None

random#

Random generator (read-only)

Type:

np.random.Generator