  Accreting neutron stars can power a wide range of astrophysical phenomena
including short- and long-duration gamma-ray bursts, ultra-luminous X-ray
sources, and X-ray binaries. Numerical simulations are a valuable tool for
studying the accretion-disk--magnetosphere interaction that is central to these
problems, most clearly for the recently discovered transitional millisecond
pulsars. However, magnetohydrodynamic (MHD) methods, widely used for simulating
accretion, have difficulty in highly magnetized stellar magnetospheres, while
force-free methods, suitable for such regions, cannot include the accreting
gas. We present an MHD method that can stably evolve essentially force-free,
highly magnetized regions, and describe the first time-dependent relativistic
simulations of magnetized accretion onto millisecond pulsars. Our axisymmetric
general-relativistic MHD simulations for the first time demonstrate how the
interaction of a turbulent accretion flow with a pulsar's electromagnetic wind
can lead to the transition of an isolated pulsar to the accreting state. This
transition naturally leads to the formation of relativistic jets, whose power
can greatly exceed the power of the isolated pulsar's wind. If the accretion
rate is below a critical value, the pulsar instead expels the accretion stream.
More generally, our simulations produce for the first time the four possible
accretion regimes, in order of decreasing mass accretion rate: (a) crushed
magnetosphere and direct accretion; (b) magnetically channeled accretion onto
the stellar poles; (c) the propeller state, where material enters through the
light cylinder but is prevented from accreting by the centrifugal barrier; (d)
almost perfect exclusion of the accretion flow from the light cylinder by the
pulsar wind.
