A device for searching a compound, comprising: a defining unit configured to define a lattice space that is a collection of lattice points where a plurality of compound groups are sequentially arranged; a limiting unit configured to, in a case where any of the compound groups is arranged in any of the lattice points of the lattice space, followed by arranging a next compound group in any of the rest of the lattice points, generate a limited lattice space that is a space created by eliminating, from the lattice space, regions for the next compound group to be arranged, by setting the maximum number of compound groups aligned in a straight chain and eliminating regions where the compound groups are not disposed; an assigning unit configured to assign a bit to each of the lattice points, to which the compound groups can be arranged, in the limited lattice space; an arithmetic unit configured to perform a ground state search on an Ising model obtained through conversion based on restriction conditions related to each of the lattice points according to simulated annealing, to thereby calculate minimum energy of the Ising model; a judging unit configured to judge whether any of the compound groups assigned to the lattice points is arranged on outermost lattice points of the limited lattice space or not; and a controlling unit configured to cause the limiting unit to execute expansion of the limited lattice space by further adding a lattice point to the outside of the outermost lattice points, cause the assigning unit to execute assignment of the bits to the lattice points included in the limited lattice space after the expansion, and cause the arithmetic unit to execute calculation of the minimum energy of the Ising model, in a case where the judging unit judges that any of the compound groups assigned to the lattice points is arranged on the outermost lattice points of the limited lattice space, wherein the device is a device for searching the compound, in which the plurality of the compound groups are linked with one another. a defining unit configured to define a lattice space that is a collection of lattice points where a plurality of compound groups are sequentially arranged; a limiting unit configured to, in a case where any of the compound groups is arranged in any of the lattice points of the lattice space, followed by arranging a next compound group in any of the rest of the lattice points, generate a limited lattice space that is a space created by eliminating, from the lattice space, regions for the next compound group to be arranged, by setting the maximum number of compound groups aligned in a straight chain and eliminating regions where the compound groups are not disposed; an assigning unit configured to assign a bit to each of the lattice points, to which the compound groups can be arranged, in the limited lattice space; an arithmetic unit configured to perform a ground state search on an Ising model obtained through conversion based on restriction conditions related to each of the lattice points according to simulated annealing, to thereby calculate minimum energy of the Ising model; a judging unit configured to judge whether any of the compound groups assigned to the lattice points is arranged on outermost lattice points of the limited lattice space or not; and a controlling unit configured to cause the limiting unit to execute expansion of the limited lattice space by further adding a lattice point to the outside of the outermost lattice points, cause the assigning unit to execute assignment of the bits to the lattice points included in the limited lattice space after the expansion, and cause the arithmetic unit to execute calculation of the minimum energy of the Ising model, in a case where the judging unit judges that any of the compound groups assigned to the lattice points is arranged on the outermost lattice points of the limited lattice space, wherein the device is a device for searching the compound, in which the plurality of the compound groups are linked with one another.