Quantum simulation with ultracold atoms and trapped ions