Since you seem not to be concerned about the usability of this hypothetical electric aircraft, let's make some simplifications:
- The aerodynamics are so good that it does not create any drag. This is completely unrealistic but helps a lot to simplify things.
- Structure, controls and propulsion are so advanced that they leave one third of the take-off mass for batteries. Who needs payload anyway?
- Efficiency is 80%. Not even electric propulsion can be lossless.
- Energy storage is the best current technology has to offer. This would be about 1.8 MJ per kg of battery for non-rechargeable lithium cells.
To accelerate a battery of the mass m to a speed v needs an amount of energy $$E_\text{kin} = \frac{m}{2}\cdot v^2$$
Flying Mach 2 at sea level is impractical; it helps to climb to at least 6.000 m (20.000 ft) to do so. This adds potential energy: $$E_\text{pot} = m\cdot g\cdot h$$
Conveniently, the result is independent of mass, so the potential maximum speed is $$v_\text{max} = \sqrt{2\cdot\frac{1}{3}\cdot0.8\cdot1{,}800{,}000\ \mathrm{m^2\ s^{-2}} - g\cdot h}$$
If we solve this for 6000 m, the speed at the end of the acceleration is 949.3 m/s, which is already Mach 2.966. If you prefer to use rechargeable batteries (1 MJ/kg), the maximum speed drops to Mach 2.15.
If you start to add a reasonable figure for drag, you won't even make it to the speed of sound before the batteries are empty. Currently, propellers are the most sensible way to convert electric energy into thrust, and large, low-speed propellers are the most efficient type. If you think to drive a conventional compressor with an electric motor, its subsonic efficiency is already far worse than the assumed 80%. Even its mass is not yet competitive with conventional gas turbines.