Today several navies are operating AIP [air independent propulsion] submarines, with the U.S. Navy having "borrowed" the Swedish AIP submarine Gotland in 2005-2007 to serve as an anti-submarine target for U.S. carrier task forces. The Gotland, according to Swedish officers, could not be located by U.S. naval forces in exercises until the submarine "wanted to be found."
From here (the larger article talks about an experimental diesel-nuclear hybrid submarine that the Russians are developing).
AIP submarines are David and Goliath weapons where the U.S. Navy is Goliath and not David. A country with a population on the order of Colorado can afford to take on a dreadfully expensive U.S. carrier battle group with one and win, despite the fact that the submarine costs something on the order of 0.5% of the cost of the carrier group.