Going by timestamp 1:22:56 on the Netflix version you can see both Q and Picard standing side-by-side and their ranks are identical. I was going to say captain off the top of my head, but I'm pretty sure that confirms it.
Edit: see Wikis' screen cap for the actual frame.