do_phased_classical_simulation#
View source on GitHub
|
Do a phased classical simulation of the bloq.
qualtran.simulation.classical_sim.do_phased_classical_simulation(
bloq: 'Bloq',
vals: Mapping[str, 'ClassicalValT'],
rng: Optional['np.random.Generator'] = None,
fixed_random_vals: Optional[Dict[int, Any]] = None
)
This provides a simple interface to PhasedClassicalSimState. Advanced users
may wish to use that class directly.
Args
bloqThe bloq to simulate
valsA mapping from input register name to initial classical values. The initial phase is assumed to be 1.0.
rngA numpy random generator (e.g. from
np.random.default_rng()). This function will use this generator to supply random values from certain phased-classical operations likeMeasX. If not supplied, classical measurements will use a random value.fixed_random_valsA dictionary of instance to values to perform fixed calculation for classical values.
View source on GitHub