qat.qpus.AnalogQPU
- class qat.qpus.AnalogQPU(hardware_model=None, sim_method='deterministic', use_GPU=False, n_steps=100, error_control=True, abs_tol=1e-05, rel_tol=1e-05, norm_tol=0.1, n_samples=None, precision=2, **kwargs)
An analog QPU simulator based on the Boost.odeint library with C++/CUDA solvers. It can evolve time-dependent Hamiltonians specified inside a
Schedule
with or without Lindblad jump operators - see the ‘Analog’ Noise models section.Warning
If the number of steps n_steps is too low, the norm of the final state vector may be invalid (i.e. not within the range specified by norm_tol) in which case a
QPUException
will be raised.- Parameters
hardware_model (HardwareModel, optional) – a hardware model (containing e.g jump operators). Default is None for noiseless simulations.
sim_method (string, optional) – deterministic or stochastic mode, the latter used for noisy simulations and requiring a
HardwareModel
with jump operators. Default is deterministic.use_GPU (bool, opotional) – an option to off-load the computation to run on a GPU if one is available. Default is False.
n_steps (int, optional) – number of steps used for the time-evolution. The simulator uses Runge-Kutta Dormand-Prince 5 implementation provided in Boost.odeint to solve the underlying ODE. Default is 100, however, with error_control=True the simulator will adapt the number of steps to achieve the accuracy set by the relative and absolute tolerances.
nsteps (int, optional) – alias for n_steps (legacy)
error_control (bool, optional) – Defaults to True, as the stepper is controlled and the size of the integration step (and hence the number of steps) will be adjusted during the evolution. This means that if one works in stochastic mode with stochastic noise (different for each noise realization) and wants to evaluate an observable, the expectation values at each time step (also different for each realization) won’t be accessible. Only the final values are averaged and returned. For a constant step size and evaluation of an observable at the same n_steps time steps of each trajectory, set to False.
abs_tol (float, optional) – absolute tolerance used by the controlled stepper. Default is 1e-5.
rel_tol (float, optional) – relative tolerance used by the controlled stepper. Default is 1e-5.
norm_tol (float, optional) – The tolerance (above and below 1) of the norm of the state vector at the end of a simulation. Default is 0.1.
n_samples (int, optional) – number of trajectories used in stochastic mode. Default is 100.
precision (int, optional) – precision of the simulation, choose 1 for floating point precision and 2 for double precision. Default is 2.