The invention discloses a method and related device for solving a molecular docking problem, and the method comprises the steps: constructing a
topological graph of
pharmacophore pairs, the vertex of the
topological graph being used for representing the
pharmacophore pair formed by docking a ligand
pharmacophore and a
receptor pharmacophore, and the edge of the
topological graph being used for representing the combination between the pharmacophore pairs; the topological graph is represented as a quadratic unconstrained binary
optimization problem, vertexes of the topological graph form single items of Hamiltonian of the quadratic unconstrained binary
optimization problem, and edges of the topological graph form double items of Hamiltonian of the quadratic unconstrained binary
optimization problem; a QAOA
quantum circuit is constructed according to the Hamiltonian value of the secondary unconstrained binary optimization problem, and the QAOA
quantum circuit is operated based on a
quantum chip of a real
quantum computer to solve the molecular docking problem; according to the method, a punishment mechanism is introduced for the molecular docking problem, the universality of the molecular docking model is improved, the molecular docking model is made to be suitable for more diversified ligand and
receptor compounds, and then the optimal molecular docking configuration is solved.