  We derived the Berry connection of vector vortex states (VVSs) from the
"true" Hamiltonian obtained through the Maxwell--Schr\"odinger equation for an
inhomogeneous anisotropic (IA) medium, and we experimentally demonstrated
measurement of the corresponding Pancharatnam--Berry (PB) geometrical phase of
VVSs. The PB phase (PBP) of VVSs can be divided into two phases: homogeneous
and inhomogeneous PBPs. Homogeneous and inhomogeneous PBPs are related to the
conventional PBP and the spatially-dependent geometric phase given by an IA
medium such as a polarization converter, respectively. We theoretically
detected that inhomogeneous PBP accumulation originates from the gauge
dependence of the index of the hybrid-order Poincar\'e sphere, which provides
an alternate method for understanding optical spin--orbital angular momentum
conversion. The homogeneous PBP, which is explicitly observed for the first
time, has implications for quantum state manipulation and information
processing.
