Semidefinite programming characterization and spectral adversary method for quantum complexity with noncommuting unitary queries