Boarding a Xenon Q with 0 casualty was easy in TC since one can save load at each deck. Need a little more SL in AP, but was easier than P IIRC. Now it's very hard, but I finally made it after 717 attempts.
So I lower the Q's shield, launch 21 marines, initiate the jump sequence, keep shields low, and save right before boarding pods hit Q. After each reload, once the jump is completed, I open the property menu to watch the marine status, take a screenshot at the hacking stage, save the game, and copy the save to somewhere else.
I wrote a .ahk script to automate the above process, gathering a lot of saves and corresponding screenshots. The screenshots are later processed and clustered using python.
Of all the 793 scenarios recorded, 101 times Q launched a Firestorm Torpedo against me but ironically destroyed itself due to close-range detonation by my anti-missile system.
Of the remaining 692 scenarios, 447 times the marines did not survive till hacking the core. The other 245 (almost) successful scenarios have a distribution of remaining crews as follows at the hacking stage. Note there are occasions when less than 16 marines made it to this stage but were not eliminated.
Only in one scenario, at the 717th attempt, did all 21 crews survive the operation.