Engineering of Fermi level by nin diamond junction for control of charge states of NV centers