anti_crossing_clique(num_variables: int) BinaryQuadraticModel[source]#

Generate an anti-crossing problem with a single clique.

Let N = num_variables // 2. This function returns a binary quadratic model where half the variables, [0, N), form a ferromagnetic clique, with each variable, v, also ferromagnetically interacting with one variable, v+N, of the remaining half of the variables, [N, 2*N).

All of the variables in the clique except variable 1 have a linear bias of +1, and all of the variables attached to the clique have a linear bias of -1.

The ground state of this problem is therefore +1 for all variables.


num_variables – Number of variables used to generate the problem. Must be an even number greater than or equal to 6.


A binary quadratic model.