# Q1Q2Q3Q4 coupling in qubo file

According to the question Q1Q2Q3 coupling in qubo file we can couple 3 qbits. When it comes with 4 qbits like q1q2q3q4, how should set this 4-qbit element to qubo file?

You can use a technique of reduction by substitution. Here we represent using ancilla representing a Boolean constraint $$z\Leftrightarrow x_1\wedge x_2$$ as a quadratic penalty function : $$P(x_1,x_2;z) = x_1 x_2 - 2(x_1+x_2)z + 3z$$
For a triplet interaction, you use it to reduce to pairwise : $$x_1 x_2 x_3 = \min_z \bigl\{ z x_3 + M P(x_1,x_2;z) \bigr\}, M>1$$