  Polarization induced spin switching of atoms in magnetic materials opens for
possibilities to design and develop advanced spintronic devices, in particular,
storage devices where the magnetic state can be controlled by an electric
field. We employ density-functional theory calculations to study the magnetic
properties of a perovskite strontium cobalt oxyfluoride Sr$_2$CoO$_3$F (SCOF)
in a hybrid perovskite heterostructure, where SCOF is sandwiched between two
ferroelectic BaTiO$_3$ (BTO) layers. Our calculations show that the spin state
of the central Co atom in SCOF can be controlled by altering the polarization
direction of the BTO, specifically, to switch from high-spin state to low-spin
state by changing the relative orientation of the ferroelectric polarization of
BTO with respect to SCOF, leading to an unexpected, giant magnetoelectric
coupling, $\alpha_s \approx 21 \times 10 ^{-10}$ Gcm$^2$/V.
