Scientists have built the first quantum battery that can charge, store energy, and release electricity in one device.