The Kepler satellite has detected over 2000 extrasolar planets. Many of them are gas giants and some are larger than Jupiter. This talk will introduce ab initio simulation methods and then discuss the state of matter at high temperature and pressure conditions that prevail in the interiors of giant planets. We describe how data from the Galileo mission to Jupiter has been combined with first-principles simulations to demonstrate that there is helium rain on this planet . Then we characterize water ice at megabar pressures and describe the structural transitions that were recently predicted . After formation of a giant planet, its core is exposed to metallic hydrogen extreme T and P conditions and different core materials may dissolve into hydrogen. To investigate this possibility, we determined the thermodynamic stability of the ice and the magnesium oxide layers that assumed among the primary materials in giant planet cores. We were able to show that the cores of Jupiter and Saturn have been eroded .We conclude by discussing future directions in the field of ab initio computer simulations with applications in Earth and exoplanet science.
 H. F. Wilson and B. Militzer, “Sequestration of noble gases in giant planet interiors," Phys. Rev. Lett. 104 (2010) 121101
 B. Militzer, H. F. Wilson, “New Phases of Water Ice Predicted at Megabar Pressures," Phys. Rev. Lett. 105 (2010) 195701.
 H. F. Wilson, B. Militzer, “Solubility of water ice in metallic hydrogen: consequences for core erosion in gas giant planets," Astrophys. J. Lett. 745 (2011) 54; “Rocky core solubility in Jupiter and giant exoplanets”, Phys. Rev. Lett. 108 (2012) 111101