Riccati equation for simulation of leads in quantum transport