Package Overview
QuOp_MPI provides an objected-oriented framework for the design and simulation of QVAs. It enables researchers with any level of parallel programming experience to design simulation workflows that are efficiently scalable on massively parallel systems.
QVA Simulation
Predefined Algorithms
For combinatorial optimisation problems:
qaoa
(see QAOA and the maxcut with QAOA)qwoa
(see QWOA and the portfolio rebalancing with QWOA example)
For the optimisation of continuous multivariable functions.
User-Defined Algorithms
Novel QVAs may be designed by working directly with the Ansatz
class and propagator
submodules. See,
Adaptive Operator and Optimisation Schemes
The QuOp_MPI Ansatz
and Unitary
classes are configured via QuOp Functions. These allow the implementation of arbitrarily parameterised operators and adaptive optimisation schemes. QuOp_MPI includes default QuOp Functions that support the interfacing of user-defined serial Python functions with its parallelisation scheme for QVA simulation. Users may also define MPI-compatible custom QuOp Functions with minimal parallel programming experience.
Parallelisation Schemes
QuOp_MPI implements several MPI-based parallelisation schemes, which are all mutually compatible. Of these, parallel Quantum simulation is relevant to QVA simulation on personal computers, workstations and clusters. While parallel gradient computation and Ansatz swarms support simulation workflows on clusters.
Quantum Simulation
For an MPI (sub)communicator with \(m\) processes with integer ID \(\text{rank} \in (0,...,m-1)\), the system state and observables of a simulated QVA are partitioned over an MPI (sub)communicator with,
elements per rank and a global index offset of,
These distributed arrays are acted on by instances of the Unitary
class, which provides an interface to efficient Python extensions which compute the action of the QVA unitaries in MPI parallel.
Gradient Evaluation
For optimisation methods that make use of gradient information, computation of the objective function gradient may be carried out in MPI parallel by duplicating an Ansatz
over multiple MPI subcommunicators (see set_parallel_jacobian()
).
Ansatz Swarms
Optimisation of QVA variational parameters over a large search domain, or other QVA meta-optimisation tasks can be accelerated through creation of an swarm
, which manages multiple QVA simulation instances.
Parallel Overview
The diagram below depicts a swarm
of two QVA simulation instances with parallel gradient evaluation (see set_parallel_jacobian()
). Each QVA simulation occurs over three MPI subcommunicators with two of the subcommunicators carrying out computation of the partial derivatives of the objective function and the remaining managing optimisation of the variational parameters and evaluation of the objective function. The six Ansatz
subcommunicators call the propagate()
method of Unitary
instances which compute the action of the QVA’s phase-shift and mixing unitaries in MPI parallel.
Example parallel structure for QuOp_MPI running on a cluster with 128 cores per node. Solid arrows indicate splitting of an MPI (sub)communicator and dashed lines sharing of an MPI (sub)communicator. Numbered edges indicate MPI subcommunicator size. Relevant QuOp_MPI classes are indicated in parenthesises.
Support for Clusters with Job-Scheduling
For clusters with time-limited job-scheduling, the benchmark()
, execute_swarm()
and benchmark_swarm()
methods support automated job-suspension and resumption.