Hybrid superconductor–ferromagnet transistor-like device