  We demonstrate complete control over dynamics of a single superconducting
vortex in a nanostructure which we coin the Single Vortex Box (SVB). Our device
allows us to trap the vortex in a field-cooled aluminum nanosquare and expel it
on demand with a nanosecond pulse of electrical current. We read-out the vortex
state of the box by testing the switching current of the adjacent Dayem
nanobridge. Using the time-resolving nanothermometry we measure
4$\cdot$10$^{-19}\,$J as the amount of the dissipated heat (which is the energy
of a single red photon) in the elementary process of the vortex expulsion, and
monitor the following thermal relaxation of the device. The measured heat is
equal to the energy required to annihilate all Cooper pairs on the way of the
moving vortex. Our design and measuring protocol are convenient for studying
the stochastic mechanism of the vortex escape from current-driven
superconducting nanowires, which has its roots either in thermal or quantum
fluctuations, similar to ones widely studied in Josephson junctions or magnetic
nanoclusters and molecules. Our experiment enlightens the thermodynamics of the
absorption process in the superconducting nanowire single-photon detectors, in
which vortices are perceived to be essential for a formation of a detectable
hot spot. The demonstrated opportunity to manipulate a single superconducting
vortex reliably in a confined geometry comprises in fact a proof-of-concept of
a nanoscale non-volatile memory cell with sub-nanosecond write and read
operations, which offers compatibility with quantum processors based either on
superconducting qubits or rapid single flux quantum circuits.
