Defect density dependence of thermal conductivity and temperature control of quasi-phase matching devices