  We study finite quantum wires and rings in the presence of a charge density
wave gap induced by a periodic modulation of the chemical potential. We show
that the Tamm-Shockley bound states emerging at the ends of the wire are stable
against weak disorder and interactions, for discrete open chains and for
continuum systems. The low-energy physics can be mapped onto the Jackiw-Rebbi
equations describing massive Dirac fermions and bound end states. We treat
interactions via the continuum model and show that they increase the charge gap
and further localize the end states. In an Aharonov-Bohm ring with weak link,
the bound states give rise to an unusual $4\pi$-peridodicity in the spectrum
and persistent current as function of an external flux. The electrons placed in
the two localized states on the opposite ends of the wire can interact via
exchange interactions and this setup can be used as a double quantum dot
hosting spin-qubits.
