Composite

Propagators for operators that are Cartesian sums of circulant operators, where each component mixes over a subregister. Used for optimisation of discretised continuous multivariable functions and combinatorial problems with decision variables of arity three or higher.

Propagator Class

class quop_mpi.propagator.composite.unitary(Ns, *args, **kwargs)

Bases: Unitary

propagate(t)

Simulation of the action of a :term`unitary`.

When implemented, propagate contains a call to a method (typically a contained in a complied Python extension module) that takes the class attributes initial_state, final_state and MPI_COMM, together with attributes describing the parallel partitioning scheme and variational parameters x, as input. The action of the unitary is computed in MPI parallel, with the computed result written to final_state.

Warning

Not implemented by the base Unitary class.

Parameters:
xndarray[float64]

a 1-D real array of n_params variational parameters

Examples

def propagate(self, x):

    external_propagator(
        x, self.partition_table, self.initial_state,
        self.final_state, self.MPI_COMM )

Operators

Pre-defined operator functions for composite propagators.

Predefined Operator Functions for quop_mpi.propagator.composite.unitary.

The composite propagator handles operators that are Cartesian sums of circulant operators acting on subregisters. This is used for multivariable optimization problems where the mixing operator decomposes as:

\[H = H_1 \otimes I \otimes \cdots + I \otimes H_2 \otimes \cdots + \cdots\]

where each \(H_i\) is a circulant matrix acting on a subregister.

Return Format

The Operator Function must return:

eigenvaluesndarray[float64, shape=(max(Ns), n_dims)]

A 2-D real array where eigenvalues[:N_i, i] contains the eigenvalues of the i-th circulant suboperator. The first dimension is max(Ns) (padded with zeros for smaller grids), and the second dimension corresponds to the number of grid dimensions.

Propagation Method

The composite propagator exploits the Cartesian sum structure using multi-dimensional FFT:

  1. Forward multi-dimensional FFT transforms the state to the joint eigenbasis

  2. Multiply by \(e^{-it(\lambda^{(1)}_{k_1} + \lambda^{(2)}_{k_2} + \cdots)}\) where \(\lambda^{(d)}_{k_d}\) are eigenvalues for each dimension

  3. Inverse multi-dimensional FFT transforms back to the computational basis

This avoids constructing the full \(\prod_i N_i\) sized operator by exploiting the separable structure of Cartesian sums. The implementation uses FFTW with MPI for parallel multi-dimensional transforms.

quop_mpi.propagator.composite.operator.ith(Ns: list[int], Cs: list[int] = None) np.ndarray[np.float64]

Generate the eigenvalues of a QMOA mixing unitary operator.

An Operator Function for quop_mpi.propagator.composite.unitary. The Cs keyword argument may be defined via a corresponding FunctionDict on initialisation of the receiving unitary instance.

Parameters:
Nslist[int]

the number of grid points in each dimension of the Cartesian grid, quop_mpi.propagator.composite.unitary attribute

Cslist[int], optional

specifies the i-th index of the circulant operators associated with each dimension of the Cartesian grid, complete graphs by default

Returns:
ndarray[complex128]

a 2-D complex array containing local_i eigenvalues of the QMOA mixing unitary with global index offset local_i_offset

See also

quop_mpi.propagate.circulant.operator.graph()

Generate the eigenvalues of the i-th symmetric circulant graph with edge weights 1.