Integrated hamiltonian walk into the linear optimize code