VQE for Solving QUBO's

\begin{equation} \tag{QUBO: general formula} H(q) = \sum_i a_i q_i + \sum_{i<j} b_{ij}q_iq_j \end{equation}

The q's are in this case triplets of consecutive hits through the detector (e.g hit on plane 1, 2, 3 or 2, 3, 4) So the objective transforms to:

\begin{equation} \tag{QUBO: triplets} H(T) = \sum_i a_i T_i + \sum_{i<j} b_{ij}T_iT_j \end{equation}

How to calculate: Let $P_i$ = {1, 2, 3} and $P_j$ = {2, 3, 4} be the sets of planes where the $T_i$ and $T_j$ come from.