Can i eat an edible and be high in front of my child while my husband is home sober?

Weed just became legal in my state (az) and I'm not totally sure how it all works now. Am I allowed to do it around my 1 year old child as long as I don't smoke anything around them our as long as they don't know, and as long as there is a capable and sober adult there in case of emergency? For example, my high school friend is coming to visit and we wanted to eat an edible together at my home. My husband and child will be there. Is there anything illegal about that?

For those commenting about being careful with how it affects me, don't worry I am an experienced smoker lol. Just not legally or with a child. I smoked for 10 years but haven't since I got pregnant