Magikarp is an incredibly hard Pokemon to sweep with, and in competitive battles it will be walled almost regardless of the boosts it has. Base 10 and 15 offensive stats in Attack and Special Attack are simply unusable, and even with a +6 boost, they reach just over 500 which is stupid considering the boosts it has acquired.
However, there are ways. Firstly is Baton Passing boosts to Magikarp, which is easily done with Venomoth and Ninjask for special and physical-attack boosting things respectively. Even then, there isn't much it can do with its pitiful stats and near useless move pool.
The only way Magikarp is going to sweep is if it receives max Attack and Speed via Baton Pass, holds a Focus Sash, gets hit by a move that knocks it down to 1HP, is in the Rain and has Swift Swim, and then proceeds to repeatedly use Flail.
Even then, Magikarp can still be walled, and it's Sash is easily broken by entry hazards. It is also prone to priority, as it has nothing to hit back with. Its horrible defences mean it won't take a decent neutral attack without a crazy amount of setup.
It is also possible to use Hydro Pump + Swift Swim in the Rain and maxed out Speed and Special Attack, but one miss with Hydro Pump and Magikarp will meet its end.
It is incredibly hard to set this up in the first place too; Taunt ruins any Baton Passing, and most experienced players would be able to prevent a sweep with such a weak Pokemon.