# Solving higher-order (unconstrained) binary optimization problems with QAOA without quadratization

I am aware that it's possible to use QAOA to solve QUBO problems. However, I've recently seen some sources mentioning the possibility of solving HOBO/HUBO problems using QAOA as well .

While I understand that quadratization from HOBO/HUBO to QUBO could be done , I'm trying to understand if it's actually possible to solve problems with higher-order polynomials using QAOA without quadratizing them. Unfortunately, I haven't been able to find too many sources discussing this subject.

 Adam Glos, Aleksandra Krawiec, Zoltán Zimborás, "Space-efficient binary optimization for variational computing"

 Avradip Mandal, Arnab Roy, Sarvagya Upadhyay, Hayato Ushijima-Mwesigwa, "Compressed Quadratization of Higher Order Binary Optimization Problems"

 Yuichiro Minato, "Variational Quantum Factoring using QAOA and VQE on Blueqat"

• +1 but I removed the second question since there's a "one question per post" policy. You can ask the second question in a different post. Feb 15, 2021 at 22:18
• @user1271772 Huh, I feel like the two things I brought up are related ("X is not doable in Qiskit. I'm curious whether this is a Qiskit limitation or a theoretical limitation"), but okay, rules are rules - although "Qiskit" is still in the title of the post and in the tags, which I guess makes no sense after your edit... And I'm a bit puzzled by having my wording changed from "conversion" to "quadratization", since I didn't know this was the only way of achieving that, but hey, at least I got that part of my question answered by looking at the diff between edits ;) Feb 16, 2021 at 11:46
• Qiskit and the IBM hardware can treat super-quadratics, but if you can make it a quadratic with similar number of qubits and similar coefficients, the quadratic is usually better (lower error rates). Feb 16, 2021 at 15:20
• @user1271772 I need to research the term "super-quadratics", because I've never heard of it. If it means polynomials with a higher degree, then I'm still pretty puzzled, because I didn't find anything related to that in the docs and all my attempts have ended in Qiskit throwing exceptions related to the degree being too high. I guess I'll try to ask this question separately - but first I need to understand if this is possible theoretically :) Feb 16, 2021 at 17:03
• IBM can do cubics. Kristan Temme from IBM told me that. Maybe you should ask a separate question about why it's not working in qiskit: show the code and the error. Feb 16, 2021 at 18:05

Ok so this is pretty late, but let me still try to answer it as an author of  :)

When you want to implement QUBO, what you're actually doing is implementing the corresponding Ising model. The steps are following:

• prepare the QUBO
• replace each bit $$b_i$$ with $$\frac{1}{2}(1-Z_i)$$ where $$Z_i$$ is Pauli $$Z$$ operator acting on $$i$$-th qubit
• implement the resulted Ising model as follows
• implement each $$Z$$ and $$ZZ$$ independently (one by one)
• implement $$Z$$ by $$R_z$$ rotation
• implement $$Z_iZ_j$$ by applying CNOT with control on $$i$$ and target on $$j$$, $$R_z$$ rotation on $$j$$ and CNOT as before
• the rotations angle should be the weight of the Pauli operator times the angle coming from the QAOA

There is almost no difference with HOBO, however, you need to know how to implement general $$Z_{i_1}Z_{i_2}\cdots Z_{i_k}$$. For this you can use decompositions given in , Fig 3(a) (no ancilla) or Fig 3(b) (one ancilla qubits). In  we also use some tricks to slightly reduce the number of gates, but you can safely ignore them, but these are optional.

P.S.: In  we don't do any quadratization.

• Yeah, thanks! I figured it out in the end :) This was purely a Qiskit issue. The default QuadraticProgram class does not allow for converting HOBO's into Hamiltonians (it throws errors about the order being too high), so I had to write my own PolynomialProgram class in order to be able to create the needed Hamiltonians easily :) Aug 15, 2021 at 20:23
• This may be worth pull requesting. I would be happy to check the code 😉 Aug 16, 2021 at 22:36