qat.plugins.EpochizerPlugin
The EpochizerPlugin is designed to be used in front of the CppMPS simulator.
This plugin will compute a strategy to spawn threads, in order to optimize the emulation.
Warning
This plugin is used automatically in front of CppMPS, this plugin is not designed to be used
explicitly in your code.
- class qat.plugins.EpochizerPlugin(max_gates_per_layer: int, max_chi: int, min_gates_at_max_cost: int = 2, min_seq_cost: int = 512)
A plugin that schedules gates according to their earliest and latest execution levels in the circuit. It sorts the gates of the circuit into multiple layers of gates, according to the maximum number of gates per layer specified as parameters.
It is designed to homogenize the number of gates that will be executed in parallel in the context of the CppMPS qpu. Within this context, the maximum number of gate per layer corresponds to the number of workers (threads) allocated.
- Parameters:
max_gates_per_layer (int) – maximum number of gates that will contain each layer. Should be positive and non null.
max_chi (int) – maximum bond dimension for tracking the entanglement evolution from the MPS.
min_gates_at_max_cost (int) – minimum amount of gates at max cost. If the amount of max cost gate is below this threshold, they will be executed sequentially. Otherwise in parallel. (default: 2)
min_seq_cost (int) – minimum cost for a gate to be considered “not free” to be executed in sequential. If the max cost of a sequence is below this threshold, the whole slice will be executed in parallel. (default: 512)
- compile(batch, _specs: HardwareSpecs) Batch
Compiles a batch of jobs