Your bifold doors may have worked perfectly before you installed the new carpet, but thick carpet will rub against the bottoms of the doors and make them difficult to open and close. Fortunately, the hardware that you use to hang bifold doors is easy to adjust. You probably had to remove the bottom brackets when you laid the carpet, and setting them a little higher when you replace them is part of that adjustment. In some cases, the door may be too long for the new space. If so, trimming it will make it work better.
Remove each door, if the doors are too long, by lifting it until the bottom pivot clears the bracket, then angling the bottom of the door toward you. Unscrew the hinges holding each pair of doors together with a screwdriver and trim the bottom of each door with a circular saw. If you aren't comfortable doing this yourself, take the doors to a home improvement center for trimming.
Reassemble the doors by screwing the hinges back on. Replace the bottom pivot by tapping it into the hole in the bottom corner of the door with a mallet or hammer.
Set the top pivot into the bracket on the top track and push down on the spring-loaded guide on the opposite corner of the door to set the guide into the overhanging track. Push up on the door while you straighten it and guide the bottom pivot into the bracket.
Adjust the length of the bottom pivot by turning the notched wheel attached to it with your fingers. Turn the wheel counterclockwise to lengthen the pivot and raise the door and clockwise to lower the door.
Level the door by lifting it and moving the bottom pivot into the appropriate notch on the bracket. If you have to move the door too close to the jamb to level it, unscrew the top bracket with a screwdriver, slide the bracket away from the jamb and tighten the screw. The edge of the door should be about 1/2 inch from the jamb when the door is level.
Adjust the other door in the same way, making sure it's at the same height as the first door and that the doors close tightly. You may have to move the top brackets a little more and adjust the bottoms accordingly to get the doors to close properly.