Would this lead to a reactor that produced more energy than you put in?
This has actually been proposed! Project PACER at Los Alamos explored the possibility of detonating hydrogen bombs in underground cavities (e.g. in salt domes) to produce "geothermal" energy. Exploding a 2 kton device once every 20 minutes in a steel lined underground cavity using molten salt droplets to cushion the effects of the explosive would produce about 1000 MWe of power. This is a fusion reactor since most energy comes from the fusion reaction, started by a nuclear detonation.
I think this confuses what is hard about getting fusion reactors to work.
I assume you are thinking of using a thermonuclear device to start a fusion reactor rather than to use one or more as a fusion reactor. In other words I assume you are not thinking of harnessing the energy released from one or more such devices as in the various mad schemes people involved with nuclear weapons thought up to harness them for peaceful power generation. That approach is addressed in another answer.
The problem with getting a fusion reactor to work is not getting fusion started (anyone can do that): it is keeping the stuff you are fusing stable and contained for long enough that you can get more power out than you put in. There are various approaches to doing this of which we know of only one really successful one: that approach – gravitational confinement – unfortunately doesn't scale down to scales we can use directly.
Given that the problem is not starting fusion but containing it and keeping it stable, it seems unlikely that detonating a thermonuclear weapon inside your fusion reactor is going to help!