  Quantum information processing at scale will require sufficiently stable and
long-lived qubits, likely enabled by error-correction codes. Several recent
superconducting-qubit experiments, however, reported observing intermittent
spatiotemporally correlated errors that would be problematic for conventional
codes, with ionizing radiation being a likely cause. Here, we directly measured
the cosmic-ray contribution to spatiotemporally correlated qubit errors. We
accomplished this by synchronously monitoring cosmic-ray detectors and qubit
energy-relaxation dynamics of 10 transmon qubits distributed across a 5x5x0.35
mm$^3$ silicon chip. Cosmic rays caused correlated errors at a rate of 1/(10
min), accounting for 17$\pm$1% of all such events. Our qubits responded to
essentially all of the cosmic rays and their secondary particles incident on
the chip, consistent with the independently measured arrival flux. Moreover, we
observed that the landscape of the superconducting gap in proximity to the
Josephson junctions dramatically impacts the qubit response to cosmic rays.
Given the practical difficulties associated with shielding cosmic rays, our
results indicate the importance of radiation hardening -- for example,
superconducting gap engineering -- to the realization of robust quantum error
correction.
