  It has recently been understood that the complete global symmetry of finite
group topological gauge theories contains the structure of a higher-group. Here
we study the higher-group structure in (3+1)D $\mathbb{Z}_2$ gauge theory with
an emergent fermion, and point out that pumping chiral $p+ip$ topological
states gives rise to a $\mathbb{Z}_{8}$ 0-form symmetry with mixed
gravitational anomaly. This ordinary symmetry mixes with the other higher
symmetries to form a 3-group structure, which we examine in detail. We then
show that in the context of stabilizer quantum codes, one can obtain logical
CCZ and CS gates by placing the code on a discretization of $T^3$ (3-torus) and
$T^2 \rtimes_{C_2} S^1$ (2-torus bundle over the circle) respectively, and
pumping $p+ip$ states. Our considerations also imply the possibility of a
logical $T$ gate by placing the code on $\mathbb{RP}^3$ and pumping a $p+ip$
topological state.
