  We introduce a unitary almost-Mathieu operator, which is obtained from a
two-dimensional quantum walk in a uniform magnetic field. We exhibit a version
of Aubry--Andr\'{e} duality for this model, which partitions the parameter
space into three regions: a supercritical region and a subcritical region that
are dual to one another, and a critical regime that is self-dual. In each
parameter region, we characterize the cocycle dynamics of the transfer matrix
cocycle generated by the associated generalized eigenvalue equation. In
particular, we show that supercritical, critical, and subcritical behavior all
occur in this model. Using Avila's global theory of one-frequency cocycles, we
exactly compute the Lyapunov exponent on the spectrum in terms of the given
parameters. We also characterize the spectral type for each value of the
coupling constant, almost every frequency, and almost every phase. Namely, we
show that for almost every frequency and every phase the spectral type is
purely absolutely continuous in the subcritical region, pure point in the
supercritical region, and purely singular continuous in the critical region. In
some parameter regions, we refine the almost-sure results. In the critical case
for instance, we show that the spectrum is a Cantor set of zero Lebesgue
measure for arbitrary irrational frequency and that the spectrum is purely
singular continuous for all but countably many phases.
