  Annealing Mg-implanted homoepitaxial GaN at temperatures at or above 1400
{\deg}C eliminates the formation of inversion domains and leads to improved
dopant activation efficiency. Extended defects in the form of inversion domains
contain electrically inactive Mg after post-implantation annealing at
temperatures as high as 1300 {\deg}C (one GPa N2 overpressure), which results
in a low dopant activation efficiency. Triple axis X-ray data show that the
implant-induced strain is fully relieved after annealing at 1300 {\deg}C for 10
min, indicating that the strain-inducing point defects formed during
implantation have reconfigured. However, annealing at temperatures of 1400
{\deg}C to 1500 {\deg}C (also one GPa N2 overpressure) eliminates the presence
of the inversion domains. Annealing at these higher temperatures and for a
longer time does not have any further impact on the strain state. While
residual defects, such as dislocation loops, still exist after annealing at and
above 1400 {\deg}C, chemical analysis at the dislocation loops shows no sign of
Mg segregation. Meanwhile, an overall decreasing trend in the dislocation loop
size and density is observed after annealing at higher temperatures and longer
times. Earlier work [1] addressing electrical measurements of these types of
samples showed that annealing at 1400 {\deg}C leads to a dopant activation
efficiency that is an order of magnitude higher than that observed at 1300
{\deg}C. This work complements the earlier work by identifying the microscopic
defects (inversion domains) which incorporate Mg, and points to the benefits,
in terms of defect density and p-type dopant activation, of using higher
temperatures annealing cycles to activate Mg in GaN.
