Grover's algorithm is optimal for solving NP-complete problems, but NP-hard problems cannot be efficiently solved in BQP.