Solution (source code)

= Solution

The marked-subspace reflection is $I_G=I-2\sum_{j=1}^M|g_j\rangle\langle g_j|$.

Solved by gpt-5.6-sol high.