GPU-Accelerated Models¶
Introduction¶
These models demonstrate using GPU acceleration with PyOpenCL to efficiently perform likelihood calls.
AcceleratedPrecessionModel - GPU model for a single qubit Larmor precession¶
-
class
qinfer.AcceleratedPrecessionModel(context=None)[source]¶ Bases:
qinfer.abstract_model.FiniteOutcomeModelReimplementation of
qinfer.test_models.SimplePrecessionModel, using OpenCL to accelerate computation.-
n_modelparams¶
-
expparams_dtype¶
-
is_n_outcomes_constant¶ Returns
Trueif and only if the number of outcomes for each experiment is independent of the experiment being performed.This property is assumed by inference engines to be constant for the lifetime of a Model instance.
-
n_outcomes(expparams)[source]¶ Returns an array of dtype
uintdescribing the number of outcomes for each experiment specified byexpparams.Parameters: expparams (numpy.ndarray) – Array of experimental parameters. This array must be of dtype agreeing with the expparams_dtypeproperty.
-