Catalyzes the oxidation of glucose 6-phosphate to 6-phosphogluconolactone. D-glucose 6-phosphate + NADP(+) = 6-phospho-D-glucono-1,5-lactone + H(+) + NADPH kcat is 44.1 sec(-1). Can use NAD or NADP in vitro, but primarily functions in a NADP-dependent manner in vivo. Carbohydrate degradation; pentose phosphate pathway; D-ribulose 5-phosphate from D-glucose 6-phosphate (oxidative stage): step 1/3. Homodimer. Belongs to the glucose-6-phosphate dehydrogenase family.