Stellar-mass black holes in x-ray binary systems are powered by mass transfer from a companion star. The accreted gas forms an accretion disk around the black hole and emits x-ray radiation in two distinct modes: hard and soft state. The origin of the states is unknown. We perform radiative plasma simulations of the electron-positron-photon corona around the inner accretion flow. Our simulations extend previous efforts by self-consistently including all the prevalent quantum electrodynamic processes. We demonstrate that when the plasma is turbulent, it naturally generates the observed hard-state emission. In addition, we show that when soft x-ray photons irradiate the system—mimicking radiation from an accretion disk—the turbulent plasma transitions into a new equilibrium state that generates the observed soft-state emission. Our findings demonstrate that turbulent motions of magnetized plasma can power black-hole accretion flow coronae and that quantum electrodynamic processes control the underlying state of the plasma.