Mixers

JuliQAOA.MixerType
Mixer{T<:MixerType}

Stores information related to the mixing Hamiltonian $H_M$. Fields include:

  • feasible_states: A collection of states over which the mixer is defined and operates.
  • v, d, vinv: Eigendecomposition of the matrix representation of $H_M$.
  • label: Metadata for the mixer.
  • N: The number of feasible states, automatically determined by the length of the feasible_states array.
  • period: Period of the matrix (calculated from the eigenvalues d).
source
JuliQAOA.MixerTypeType
MixerType

Characterizes the type of mixer, used to determine the optimal statevector simulation algorithm.

Currently accepted types are:

  • X: Represents any mixer composed of a symmetric sum of Pauli $X$ operators, including (but not limited to) the standard transverse field mixer.
  • Grover: Corresponds to the Grover mixer, which projects onto the feasible subspace of states.
  • General: A placeholder for user-defined custom mixers, allowing for experimentation and extension of the QAOA framework.
source

Pauli X Mixers

The mixer $H_M = \sum_i X_i$ is often referred to as the transverse field mixer, and was the original mixer introduced by Farhi et al.. JuliQAOA allows for the extension to arbitrary powers of X.

JuliQAOA.mixer_xFunction
mixer_x(n, prods=[1])

Create a mixer composed of a symmetric sum of products of Pauli X operators.

prods determines which powers of X are included, and must be a list of $k$ distinct integers ${w_1,...,w_k}$, $0\le w_i \le n$. Then mixer(n, prods) returns a mixer of the form

\[\sum_{j=1}^k \sum_{i_1 < i_2 <\ldots < i_{w_j}} X_{i_1}X_{i_2}\cdots X_{i_{w_j}}.\]

This is a slightly unwieldy definition, and is much easier to understand by looking at examples

julia> mixer_x(6) # = sum_i X_i
X mixer on 6-qubit states

julia> mixer_x(6, [2,3]) # = sum_{i<j} X_i X_j + sum_{i<j<k} X_i X_j X_k
X mixer on 6-qubit states with powers [2, 3]

Note that X mixer objects can be added together and given arbitrary coefficients:

julia> mixer_x(6,[1]) + 0.2*mixer_x(6,[2]) + mixer_x(6, [5])/π
X mixer on 6-qubit states with powers [1, 2, 5]
source

Grover Mixer

The Grover mixer, originally introduced here, works for both constrained and unconstrained problems and is represented by the projector onto the feasible states: mixer_grover = $|F\rangle\langle F|$.

The Grover mixer has the property that all states with the same objective value have the same amplitude after mixing. This property can be exploited to dramatically speed up simulating QAOA with the Grover mixer.

Note

For unconstrained problems, mixer_grover(n) is equivalent to mixer_x(n,0:n)/2^n. However, the underlying implementation for simulating Grover mixers is much faster than that for X mixers.

XY Mixers

There are two common mixers of the form $XX + YY$, which we refer to as the Clique and Ring mixers. Both of these preserve Hamming weight and are therefore suited for constrained problems.

JuliQAOA.mixer_cliqueMethod
mixer_clique(n,k; file=nothing)

Create the Clique mixer $\frac{1}{2}\sum_{i<j}X_i X_j + Y_i Y_j$ specifically for dicke_states(n,k).

Works by calculating the full $2^n \times 2^n$ Clique mixer and then deleting rows and columns corresponding to states with Hamming weight $\ne k$. The eigendecomposition of the resulting $\binom{n}{k} \times \binom{n}{k}$ matrix is then calculated and stored.

Creating these mixers can take some time for larger n and k, in this case a saving+loading location file can be provided. If file already exists, mixer_clique will simply load the existing mixer in that location. If file does not exist, mixer_clique will calculate the mixer and store the results at file.

JuliQAOA uses JLD2 for file storage, so it is recommended (though not necessary) that filenames passed to file end in .jld2.

source

Novel Mixers

JuliQAOA.mixer_generalMethod
mixer_general(feasible_states, m; file=nothing, name="")

Create a Mixer object from a list of feasible_states and a matrix m.

Optional arguments include:

  • file: Location for saving the mixer
  • name: A name for the mixer
source