Engine lopes or idling roughly
Number one cause is vacuum leaks so check the intake manifold mounting bolts for tightness make sure vacuum hose are connected and in good condition. then go over all the other possible causes because it was a head gasket just done . plus I do not know the exact mileage or how the car was taken care of like weather stuff that should have been replace was. So take a look at the following.
2 leaking egr valve plugged pcv valve= posible
3air filter clogged but do not think so
4 fuel pump not supplying enough fuel =possible
5 leaking head gasket check compression = possible
6 timming chain worn = possible
7 cam shaft lobes worn = possible
8 valves burned or leaking on new or the old head depending on if you installed new valve seals etc.. = possible
9 ignition system not function right =possible
10fuel injection or engine control system malfunction =possible