  Spatial modes of light have become highly attractive to increase the
dimension and, thereby, security and information capacity in quantum key
distribution (QKD). So far, only transverse electric field components have been
considered, while longitudinal polarization components have remained neglected.
Here, we present an approach to include all three spatial dimensions of
electric field oscillation in QKD by implementing our tunable, on-a-chip vector
beam decoder (VBD). This inversely designed device pioneers the "preparation"
and "measurement" of three-dimensionally polarized mutually unbiased basis
states for high-dimensional (HD) QKD and paves the way for the integration of
HD QKD with spatial modes in multifunctional on-a-chip photonics platforms.
