Searches for the exclusive decays of the Higgs and Z bosons into a J/psi, psi(2S), or Upsilon(nS) (n = 1, 2, 3) meson and a photon are performed with a pp collision data sample corresponding to an integrated luminosity of 36.1 fb(-1) collected at root s = 13 TeV with the ATLAS detector at the CERN Large Hadron Collider. No significant excess of events is observed above the expected backgrounds, and 95% confidence- level upper limits on the branching fractions of the Higgs boson decays to J/psi gamma, psi(2S) gamma and Upsilon(nS) gamma of 3.5 x 10(-4), 2.0 x 10(-3), and (4.9, 5.9, 5.7) x 10(-4), respectively, are obtained assuming Standard Model production.
The corresponding 95% confidence-level upper limits for the branching fractions of the Z boson decays are 2.3 x 10(-6), 4.5 x 10(-6) and (2.8, 1.7, 4.8) 10(-6), respectively.