qat.qpus.QPEG

class qat.qpus.QPEG(gates_per_layer=None, layers_per_dmrg=None, do_svd: bool = False, single_amplitude_mode: bool = False, qudit_grouping: Sequence = None, groupings=None, bond_dimension: int = 1, dmrg_sweeps: int = 1, seed: int = 222, optimize: str = 'random-greedy', remember_optimization_path: bool = False, no_memory_reservation: bool = False, disable_resource_management: bool = False, plugins: list = None, **kwargs)

MPS-based simulator.

Primer on some parameters (see the documentation for more information):

Explanation about the parameters gates_per_layer and groupings: these parameters can either take a value of type T or tuple<T> or list<T>.

  • If a value of type T is submitted, then the given value is used for each layer when possible.

  • If a value of type tuple<T> or list<T> is submitted, then each value of the tuple is used for a layer, and the length of the sequence must equal the number of layers.

layers_per_dmrg and qudit_grouping work similarly but their sum must respectively equal the total number of layers and the total number of qubits.

Parameters
  • gates_per_layer (int or tuple<int>) – number of gates in each layer. Default: 30 gates per layer

  • layers_per_dmrg (int or tuple<int>) – number of layers for each DMRG step. Default: 1 layer per DMRG step

  • do_svd (bool) – if True, the first approximation for the MPS result in the optimization step is obtained by doing a ‘split & merge’ algorithm. If False, this first approximation is random.

  • single_amplitude_mode (bool) – Warning: This parameter is set to False by default. Setting this parameter to True will change the behaviour of the parameters gates_per_layer, layers_per_dmrg and groupings. More information in the documentation. If True, performs a single amplitude simulation.

  • qudit_grouping (int or tuple<int>) – list of the number of qubits per qudit. Default: 1 qubit per qudit

  • groupings (tuple<tuple<int>> or tuple<int>) – parameter describing the way that qudits are grouped in MPS. Default: the qudits are grouped by 10 if no value is provided for qudit_grouping, one-by-one otherwise

  • bond_dimension (int) – the bond dimension that joins the tensors.

  • dmrg_sweeps (int) – number of DMRG sweeps to be performed during a DMRG step.

  • seed (int) – seed value

  • optimize (str) – name of an opt_einsum optimize for computing the path during the tensor_network contraction (setting it to None use a custom contraction intended for simulating the Sycamore experiment) Default: “random-greedy”

  • remember_optimization_path (bool) – only use this feature for variational simulations! Once the simulation is complete, create new QPEG object for the next one. Only works when submitting a Job or a Batch containing a single object. If True, will use the last simulation contraction paths for gaining time

  • no_memory_reservation (bool) – if True, no memory reservation is asked to the Resource Manager

  • disable_resource_management (bool) – if True, no resource is asked to the Resource Manager

  • plugins (list<AbstractPlugin>) – plugins to be attached to the QPU instance

Simulation modes currently available are:

  • Sampling with nbshots = 0 (same memory requirement as LinAlg, since the full statevector is returned)

  • Sampling with nbshots > 0 (currently same memory requirement as LinAlg, though this requirement will be lifted in a further update)

  • Observable with nbshots = 0

  • Single amplitude mode: returns the amplitude of a given bitstring, with higher fidelity than other simulation modes

More detailed information on this simulator is available in the following sections:

Bibliography

Schollwock2011
  1. Schollwoeck, https://arxiv.org/abs/1008.3477

Zhou2020

Zhou, Stoudenmire, Waintal, https://journals.aps.org/prx/abstract/10.1103/PhysRevX.10.041038