qat.qpus.CLinalg
For a general description of linear-algebra-based simulators, please refer to the PyLinalg documentation page.
High-level Quantum Processing Unit
- class qat.qpus.CLinalg(use_nbthreads_heuristic: bool = True, precision: int = 2, sparse: bool | None = None, light_circuit: bool = False, tqdm: bool = False, fusion: bool = True, readonly_statevector: bool = False, individual_terms_values: bool = False, seed: int = None, **kwargs)
CLinalg simulator
- Parameters:
use_nbthreads_heuristic (bool) – use heuristic for choosing the number of threads setting this parameter to False will result in using OMP_NUM_THREADS Default: True
precision (int) – precision used for the simulation, either 1(single) or 2(double) Default: 2
sparse (bool) – whether or not to return a sparse result Default: False
light_circuit (bool) – deprecated, only works for some named gates Default: False
tqdm (bool) – use tqdm to display progress in simulating the circuit Default: False
fusion (bool) – use the FusionPlugin as a pre-processing step, merging gates together (only for at least 23 qubits) Default: True
readonly_statevector (bool) – the statevector included in the result is returned directly in memory from the C++ array. This statevector will then be in convention lsb first. This option only makes sense for perfect sampling where all qubits are measured. Default: False
individual_terms_values (bool) – if True, each observable term exceptation value will be individually filled into value_data and error_data maps. Slight performance decrease. Default: False
seed (int) – seed of the random number generator Default: None (will use a random seed)
- submit(batch: Batch, meta_data: dict = None) BatchResult
Executes a batch of jobs and returns the corresponding list of Results.
- Parameters:
batch (
Batch) – a batch of jobs. If a single job is provided, the job is embedded into a Batch, executed, and the first result is returned.- Returns:
a batch result
- Return type:
This high-level class wrapping the simulator follows the convention
of the qat.qpus.QPUHandler structure.
Note
CLinAlg is an alias of CLinalg.