According to paper Ising formulations of many NP problems an unconstrained quadratic programming problem $$ f(x_1, x_2,\dots, x_n) = \sum_{i}^N h_ix_i + \sum_{i < j} J_ix_ix_j $$ can be expressed as Hamiltonian $$ H(x_1, x_2,\dots, x_n) = -\sum_{i}^N h_i\sigma^z_i - \sum_{i < j} J_i\sigma^z_i\sigma^z_j, $$ where $\sigma^z_i$ is Pauli $Z$ gate applied on $i$th qubit whereas other qubits are left without change.
I tried to prepare Hamiltonian for simple function $$ f(x_1,x_2) = 5x_1+x_2-2x_1x_2 $$
as $$ H = -(5 Z \otimes I + I \otimes Z - 2 Z \otimes Z) = \text{diag}(-4,-6,2,8). $$
So the minimal eigenvalue is -6 and associated ground state is $|01\rangle = (0, 1, 0, 0)^T$ which is correct as $f(x_1,x_2)$ minimal value is 1 for $x_1 = 0$ and $x_2 = 1$.
However, when I changed $-2x_1x_2$ to $-7x_1x_2$ and the Hamiltonian changed to $\text{diag}(1,-11,-3,13)$, the ground state remainded $|01\rangle$, however, in this case the function has minimum in $x_1 = 1$ and $x_2 = 1$ (i.e. the ground state should be $|11\rangle = (0,0,0,1)^T$).
What did I do (or understand) wrong?