I had a miscarriage 1 week ago, is it bad to have sex right now?

Yes. Your tissues and vaginal area are still healing and need another week or two to fully heal . Good luckj.