Back in WW II, aircraft carriers were converted hulls, meaning the hull designs were for cruisers or even oilers, then during construction, the plans changed to make the hulls into aircraft carriers.
Take the USS Langley, for example...
https://en.wikipedia.org/wiki/USS_Langley_(CV-1)
After WW II, the full impact of naval airpower was indisputable, so the aircraft carrier became a distinct hull design. Naval airpower became so critical that not only does the hull design must be different, the ship itself has to be made as difficult as possible for any enemy to sink it. Internally, the ship is highly compartmentalize to prevent water from running all over.
To see how difficult it is to actually sink an aircraft carrier, look at the USS Oriskany...
https://en.wikipedia.org/wiki/USS_Oriskany_(CV-34)
The ship was gutted and explosives placed internally. Still, it took nearly 40 minutes for the ship to sink under cooperative conditions.
An aircraft carrier under general quarters will not be so cooperative. Everything and everyone will be prepared at their assigned duty stations. The Oriskany was a WW II designed hull. The modern US aircraft carriers like the Enterprise or Nimitz are completely different in everything except the flat decks they shares with their WW II ancestors.
Even with the most generous speculation, no one believes it would be possible to sink an aircraft carrier with one torpedo, even if the ship just sit there and take the hit.
This...
...Is
NOT how an aircraft carrier strike group normally arrays its ships. This is a public relations (PR) formation for photographic purposes.
To give you a real world perspective, we have to use a map...
In battle formation, the entire fleet would array its ships to span several US states in sea surface area.
All these articles that said how a sub from this country or that country managed to 'defeat' a US carrier fleet are essentially sensationalizing an event that has limitations on the carrier itself.
So if a US aircraft carrier fleet is really after the Swedes, the fleet would be so far off at sea that this Swedish littoral sub would not make it to the area, let alone lay silent and long enough under water to escape detection. All this time, the carrier would be conducting air operations to attack the Swedes.
Can a sub fire enough torpedoes to actually sink a modern aircraft carrier? Hypothetically -- yes.
But no one have the guts to declare war on US and try to test the hypothesis into solid theory.