Question: I know this could be a strange question. But was there any algorithm ever found to compute an NP-problem, whether it be hard or complete, in polynomial time. I know this dabbles into the "does P=NP" problem, but I was wondering whether there were any particular instances when people were close to it. I've also heard about the factoring number problem being solved by a quantum computer by Shor's algorithm. Would this count as an algorithm which solved an NP-problem in polynomial time please ? Please do ask if you want me to clarify any parts in my questions. Thanks in advance.

Answer: 
If the answer to the first question were to be yes, then $P=NP$, as stated in [nir shahar](https://cs.stackexchange.com/a/139832/61663)'s answer. This has not been done.

### "The easiest NP hard problem"

However you next asked if any NP-hard problems have been solved in ***close*** to polynomial time, for which you might love to learn about what has been called "[The easiest NP hard problem](http://bit-player.org/wp-content/extras/bph-publications/AmSci-2002-03-Hayes-NPP.pdf)" because there's a [pseudo-polynomial time](https://en.wikipedia.org/wiki/Pseudo-polynomial_time) solution using [dynamic programming](https://en.wikipedia.org/wiki/Dynamic_programming), and there are [heuristics](https://en.wikipedia.org/wiki/Heuristic) that solve the problem in many cases, sometimes optimally. The problem is the [partitioning problem](https://en.wikipedia.org/wiki/Partition_problem): Decide whether a set of positive integers can be partitioned into two sets such that the sum of the numbers in one set equal the sum of the numbers in the first set. Despite it being an NP-complete problem, it can be solved quite efficiently, as for example described in [this PDF](https://www.ijcai.org/Proceedings/09/Papers/096.pdf).
The other answers are correct, but f I may add an observation: it seems like you are conflating classes of problems and particular instances. There are a number of instances that can be solved in polynomial time in classes that are NP-hard in general. For instance, Boolean satisfiability is NP-hard in general, since it reduces to 3SAT. However, there are a bunch of instances called Horn clauses which can actually be solved in linear time. Notice that these instances are a subset of all instances of SAT. If you do not know whether the instance you have to solve is a Horn clause, the problem is NP-hard. If you do know that your instances are restricted that way, you have HORNSAT, which is in P. It all depends what your input potentially could be, and complexity goes by the worst-case instance.