  We propose a scheme to realize quantum controlled-Z (CZ) gates through single
gradient metasurface. Using its unique parallel beam-splitting feature, i.e., a
series of connected beam splitters with the same splitting ratio, one
metasurface can support a CZ gate, several independent CZ gates, or a cascaded
CZ gates. Taking advantage of the input polarization determined output
path-locking feature, both polarization-encoded and path-encoded CZ gates can
be demonstrated on the same metasurface, which further improves the integration
level of quantum devices. Our research paves the way for integrating quantum
logical function through the metasurface.
