Q is the seventeenth letter of the alphabet. It stands for Quartermaster. I’m not sure if that is why Ian Fleming chose it for the amazing character who invented all of the gadgets used by his deft hero, James Bond, and certainly the movies would not be as entertaining without them.
According to Wikipedia it was announced at the 2017 “Women in IT Awards” by M16 chief Alex Younger, that the real-life Q is a woman.
The most recognizable “Q” was portrayed by Desmond Llewelyn, from 1963-1999. He was the fictional character, head of research and development, Q branch of the British Secret Service.