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,
propagatecontains a call to a method (typically a contained in a complied Python extension module) that takes the class attributesinitial_state,final_stateandMPI_COMM, together with attributes describing the parallel partitioning scheme and variational parametersx, as input. The action of the unitary is computed in MPI parallel, with the computed result written tofinal_state.Warning
Not implemented by the base
Unitaryclass.- Parameters:
- xndarray[float64]
a 1-D real array of
n_paramsvariational 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:
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 thei-th circulant suboperator. The first dimension ismax(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:
Forward multi-dimensional FFT transforms the state to the joint eigenbasis
Multiply by \(e^{-it(\lambda^{(1)}_{k_1} + \lambda^{(2)}_{k_2} + \cdots)}\) where \(\lambda^{(d)}_{k_d}\) are eigenvalues for each dimension
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. TheCskeyword argument may be defined via a corresponding FunctionDict on initialisation of the receivingunitaryinstance.- Parameters:
- Nslist[int]
the number of grid points in each dimension of the Cartesian grid,
quop_mpi.propagator.composite.unitaryattribute- 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_ieigenvalues of the QMOA mixing unitary with global index offsetlocal_i_offset
See also
quop_mpi.propagate.circulant.operator.graph()Generate the eigenvalues of the i-th symmetric circulant graph with edge weights
1.