  We present a quantum algorithm for simulating a family of Markovian master
equations that can be realized through a probabilistic application of unitary
channels and state preparation. Our approach employs a second-order product
formula for the Lindblad master equation, achieved by decomposing the dynamics
into dissipative and Hamiltonian components and replacing the dissipative
segments with randomly compiled, easily implementable elements. The sampling
approach eliminates the need for ancillary qubits to simulate the dissipation
process and reduces the gate complexity in terms of the number of jump
operators. We provide a rigorous performance analysis of the algorithm. We also
extend the algorithm to time-dependent Lindblad equations, generalize the noise
model when there is access to limited ancillary systems, and explore
applications beyond the Markovian noise model. A new error bound, in terms of
the diamond norm, for second-order product formulas for time-dependent
Liouvillians is provided that might be of independent interest.
