My 6 year old would not be comfortable with it, so no unless it was an emergency (in which case I do think she's mature enough to follow directions and not get herself into trouble, but I would not do it unless there were no better options). To me it's really relevant whether the kid would be like "no problem, see you when you get back" or be super stressed by it.
I think by 8 for sure, this would be fine. 7 is borderline, we'll see how she feels.
I definitely would not leave kids at any of these ages at home alone with a younger sibling, and potentially not with a pet either.