qat.qpus.CppMPS
- class qat.qpus.CppMPS(*, nb_nodes: int | None = None, nb_processes_per_node: int | None = None, chi: int = 1024, eps: float = 1e-07, nb_threads: int = 20, threading_strategy: str = 'parallel', seed: int | None = None, save_state_path: str | None = None, working_directory: str = '/var/lib/jenkins/workspace/al-doc_release_qaptiva-hpc-0.6_4/qat-tutorial', fusion=True, epochizer=True, min_seq_cost: int = 1024, nnize=True, nnizer_kwargs: dict | None = None, plugins=None, **kwargs)
Matrix Product State emulator for noiseless quantum circuits, capable of running on multiple HPC nodes. Please refer to the mathematical description of MPS for more information on the formalism of Matrix Product State. For now, only the fixed bond dimension mode is supported.
This emulator can either run on one HPC node, or run on multiple HPC nodes using MPI. Please refer to the distributed section to execute this QPU on multiple nodes, using either MPI or Slurm.
Note
qat.qpus.CppMPSdoes not supportnbshots != 0for observable jobs. For a sampling job,nbshots = 0will be updated intonbshots = 8096.- Keyword Arguments:
nb_nodes (int, optional) – number of HPC nodes (default None)
nb_processes_per_node (int, optional) – number of processes per node to be used in the MPI or SLURM environment (default 1)
chi (int, optional) – maximal bond dimension (default 1024)
eps (float, optional) – threshold under which values are considered equal to 0. (default 1e-7)
nb_threads (int, optional) – maximum number of threads that will be used for the emulation (default 20)
threading_strategy (str, optional) –
threading strategy, this option is useless if the epochizer option is set to True. Possible values are:
"parallel": gates are applied on parallel (default)"sequential": gates are applied one by one, but applying a gate will use multiple threads
seed (int, optional) – seed
save_state_path (str, optional) – path to the state that will be dumped into a binary file (default None)
nb_cpus_per_task (int, optional) – number of threads per SLURM process (ignored in the MPI environment)
args (list, optional) – additional arguments to be passed to the “srun” or “mpirun” command (default [])
mpi_lib_name (str, optional) – mpi library name: “openmpi” (default) or “mpich”
working_directory (str, optional) – path to a temporary folder where a .batch and a .res file can be written (default cwd())
fusion (bool, optional) – whether to use the fusion plugin or not (default: True)
epochizer (bool, optional) – whether to use the epochizer plugin or not (default: True)
min_seq_cost (int, optional) – minimum threshold cost for a layer of gates to be executed in parallel or not. If the max cost of a layer is under this threshold, the whole layer will be executed in parallel (default: 1024)
nnize (bool, optional) – whether to use the nnizer plugin or not (default: True)
nnizer_kwargs (dict, optional) – nnizer plugin arguments (default: None)
plugins (list, optional) – plugins to be applied to the job (default: None)
- 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: