How much of the energy from 1 megaton H Bomb explosion could we capture to do useful work? The world is full of nuclear warheads being stockpiled.  Controlled fusion power seems a long way away.  Could we put these warheads to better use by exploding them in a controlled way and capturing the energy they produce?
By useful work I mean the power is then available for the national grid to boil kettles or have a shower!
Extra points for looking at the practicalities of building a facility to do this (although I guess that would get the question closed :-(... )
 A: I will give you an analogy.
Molotov bombs are made by filling a plastic bottle with gasoline, attaching a wick ingeniously, lighting it and throwing it on a target, usually a car or a policeman controlling a demonstration.
Now there are a number of BTUs of energy in this bottle of gasoline. I can ask paraphrasing you

Could we put these Molotov s  to better use by exploding them in a controlled way and capturing the energy they produce? 

You know the answer. It is the car engine. Controlled fusion research is trying to create the corresponding "car engine" to utilize the energy in the H bomb.
You could not control gasoline explosion in a better way than in a car engine. People would laugh if one proposed to explode a barrel of gasoline and devise a system to use the energy, no? 
The same is true for fusion, it has to be incremental.
Ponder on dynamite, or nitroglycerin or a number of other explosives, which are not used for energy production because the explosions cannot be incrementally useful and safe. 
A: During the 1970s, the Los Alamos National Laboratory carried out the PACER project, to explore the use of thermonuclear explosions as a way of generating electrical power and breeding nuclear materials. The general layout of the initially proposed fusion power plant can be seen in the following illustration:

The system parameters were under exploration, but one of the ideas was to explode about 800 50 kT thermonuclear devices per year. As the conversion efficiency was expected to be about 30%, the generated electrical power would have been
$\displaystyle 0.3 \cdot 800 \cdot 50\,{\rm kT \cdot yr^{-1}}\frac{4.2 \cdot 10^{12}\,{\rm J \cdot kT^{-1}}}{3.15 \cdot 10^7\,{\rm s \cdot yr^{-1}}} \approx 1.6\,{\rm GW}$,
about 80% of the nominal power, because that was the assumed capacity factor.
Heat loss wasn't much of a problem because of scaling properties. As the thermal conductivity of rock salt is about $10\,{\rm W \cdot m^{-1} \cdot K^{-1}}$, assuming a crudely simplified geometry consisting of a flat plate of about $1\,{\rm km^2}$ with $ 100\,{\rm m}$ of thickness and the whole $500\,{\rm K}$ thermal gradient applied, the resulting thermal flux is about
$\displaystyle 10\,{\rm W \cdot m^{-1} \cdot K^{-1}} \cdot \frac{10^6\,{\rm m^2}}{100\,{\rm m^{-1}}}500\,{\rm K} = 50\,{\rm MW}$,
less than 1% of the thermal power.
The technical limiting factors were the relatively low temperature achievable inside a rock salt cavity and the large cavity sizes required to avoid contact of the walls with the unmixed fireball.
Obviously, there were also safety and public perception problems.
See page 8 of this magazine for an overview and LA-5764-MS for the details (warning: 22 MB PDF file).
A: if 1 ton of TNT releases about 4.184 gigajoules, which is 1162.2 kWh, therefore 1 megaton is equal to 4.184 x 1000000 = 4184000 gigajoules which equals 1,162,222,222 kWh.  the average 2000 ft2 home in boston MA uses 820 kWh/month so 9840 kwh/year.  1162222222/9840 = 118,112 homes for a year.  Maybe not the best method to use the energy, but hey why not?
A: I'm sorry that there are no Recent posts on this. Well...The Devil...as Always...is in the Details. I have the following proposal-having studied the Design of Thermonuclear weapons online. Why could't we put a Dome over an abandoned strip mine, and then pump the air out to form a sealed partial Vacuum. It could Easily be 5-10 thousand square meters. Then, we suspend a one megaton device in Dead center. The Shell is made of Iron a few inches thick, maybe with a lead lining. We also can incorporate Boron to sop up all the free neutrons. My reasoning?? Heat is transferred from a nuke-or anything Else-through Conduction, Convection and Radiation. My idea may SEEM Very Reckless, but we would be talking about a sphere with a capacity of one trillion cubic meters. The heat and pressure from the expanding gas would peter out Long before striking the wall. I believe, Ironically, that this device would be safer than the many fission reactors in the World (you know, like Three Mile Island, Chernobyl, and Fugushima Dayachi in Japan?) as there is NO possibility of a "China Syndrome." AH-you ask-but what about the Radiation-both thermal and Gamma Ray?? Well, Nukes actually generate "soft" X Rays. These are important-as they would be used to do the work of steam generation. I propose to have a lightweight, relatively X Ray transparent shell a meter inside the inner wall. In Between the two walls, a water-based foam can be injected. Such a substance would be Very transparent to the X Rays. Hyrdogen bombs actually Use a layer of polystyrene foam on the inner casing, to "reflect" Gamma Radiation from the outer wall onto the Ulam-Teller capsule which contains all the "Goodies" (Lithium Deuteride, and the plutonium "spark plug" which goes critical and sets the thing Off after it's compressed just the right amount.) In our scenario, we don't Want a staged radiation implosion over and above what are one megaton device is providing for us. And styrofoam would be expensive and less "Green" than The Bomb. The thick Foam would simply vaporize into Live Steam, or-at worst, a low-temperature plasma. It could be tapped at multiple points to Run the Mother of All Steam Turbines.
