Doctors at George Washington University Hospital replaced the defibrillator, a sealed unit that includes a battery. If the device were to sense an abnormal heart rhythm, it would deliver an electronic shock to reset the vice president's heart to a normal beat.
"The device was successfully replaced without complication," said Megan McGinn, the vice president's deputy press secretary.
Doctors did not replace the wiring attached to the defibrillator. Replacing these defibrillator wires, which thread through Cheney's heart, would have required a much more extensive operation.
Cheney, wearing a sports jacket and open-collared shirt, smiled and waved as he left the hospital about four hours after he arrived in the morning with his wife, Lynne.
"The vice president feels fine," McGinn said.
She said the Cheneys returned to their residence at the Naval Observatory, just a few miles away, and the vice president would resume his normal schedule.
Dr. Stephen Siegel, a cardiologist at New York University Medical Center, said the device like the one doctors replaced in Cheney is about the size of a large sports watch.
"It's slipped between muscle and skin in the upper part of the chest," he said. "The area of the wound will be a little sore for a couple of days."
Siegel said he was not familiar with Cheney's surgery, but that it was standard procedure to induce an abnormal or fast heart rhythm to test that the new device is working.
Patients who have the same procedure usually do not need anything more than over-the-counter pain relievers afterward. Typically these patients are told to avoid major exercise for a week or two, he said.
Cheney has had four heart attacks, quadruple bypass surgery, two artery-clearing angioplasties and an operation to implant the defibrillator six years ago.
During Cheney's annual physical last month, doctors tested his implanted cardioverter-defibrillator and learned that the battery had reached a level where replacement is recommended.
During that checkup, Cheney had a stress test and doctors also checked out the defibrillator, which was implanted in June 2001. The stress test showed no blockages in his heart. Doctors also said then that his defibrillator was functioning properly and that they had not had to treat any irregular beating of the vice president's heart.
In 2005, Cheney had six hours of surgery on his legs to repair a kind of aneurysm, a ballooning weak spot in an artery that can burst if left untreated. In March, doctors discovered that he had a deep venous thrombosis in his left lower leg. After an ultrasound in late April, doctors said the clot was slowly getting smaller.
Dr. John Kassotis, director of electrophysiology at State University of New York's Downstate Medical Center, said that during procedures like the one Cheney had, doctors typically use a local anesthetic on the chest and shoulder area below the collar bone.
They make an incision and remove the defibrillator unit, known as the generator, and detach it from wires that are connected inside the patient's heart, he said. They reconnect the unit to the wires and test to make sure it is operating properly.