  We investigate nonequilibrium entanglement generation in a chain of harmonic
oscillators with time-dependent linear coupling. We use optimal control theory
to determine the coupling modulation that leads to maximum logarithmic
negativity for a pair of opposite oscillators and show that it corresponds to a
synchronization of the eigenmodes of the chain. We further analytically relate
the maximum attainable entanglement to the irreversible work done to produce
it, thus bridging nonequilibrium entanglement production and nonequilibrium
thermodynamics.
