Config

class Config(*, cutoff: int = 4, dtype: type = <class 'numpy.float64'>, measurement_cutoff: int = 5, hbar: float = 2.0, seed_sequence: ~typing.Any | None = None, use_torontonian: bool = False, cache_size: int = 32, validate: bool = True)

The configuration for the simulation.

Variables:
  • cutoff – The Fock space cutoff. Defaults to 4.

  • dtype – The underlying datatype of the simulation. Possible values: np.float32 and np.float64. Defaults to np.float64.

  • measurement_cutoff – The maximum number of particles to be allowed for ParticleNumberMeasurement using GaussianSimulator. Defaults to 5.

  • hbar – The value of the Planck constant. Defaults to 2.0.

  • seed_sequence – The seed for reproducability of sampling algorithms.

  • use_torontonian – Uses torontonian for ThresholdMeasurement. Defaults to False.

  • cache_size – The maximum size of the cache for certain algorithms. Defaults to 2.0.

  • validate – Validates computations during simulation. Defaults to True. If set to False, it is not guaranteed that the calculations will be correct, and it is advised to only turn it off when necessary. Moreover, it is also not guaranteed that all validations are turned off by setting validate=False (e.g., specifying invalid modes will still yield an error).

property seed_sequence

The seed sequence used to generate random numbers during the simulation.

property complex_dtype

Returns the complex precision depending on the dtype of the Config class

copy() Config

Returns an exact copy of this config object.

Returns:

An exact copy of this config object.

Return type:

Config