Relativistic Landau quantization in non-uniform magnetic field and its applications to white dwarfs and quantum information