A pulse magnetic-field generator for terahertz gyrodevices