In one of those leaps for which she's famous, Judith Jamison hit her hand on a pillar and had to finish out the rehearsal clutching a napkinful of ice. It was one of the hazards of entertaining at the White House - or at least it was yesterday.

Hostess Rosalynn Carter, who was watching and took Jamison's uninjured hand in her own, comforting the statuesque dancer. They stood on the sidelines watching others of the Alvin Ailey American Dance Theater company go through the program for last night's state dinner honoring King Hassan of Morocco.

The problem had been one of space. The 23-by-30 foot stage was the one Rebekah Harkness had given the White House during the Kennedy administration. It half filled the East Room and reduced last night's aduience capacity by 60 to 70 chairs.

"We really didn't realize how tight it was until we put it up," White House social secretary Gretchen Poston told Ailey and several members of his company.

"We've had it up before but never used it," Poston continued. "It was set up last May for the Nato party as part of the rain plan when the New York City Ballet danced on the South Lawn."

Ailey, 47 ("but it feels like 147," he told a reporter), looked up at one of the giant crystal chandeliers, 12 feet above the East Room floor but only 9 feet above the elevated stage.

"We spaced around it," he said of his 10-member corps for the White House performance. "We chose carefully what we would do here. We're not doing anything with big jumps."

The Ailey troupe, celebrating its 20th anniversary, will open its New York season at the end of this month at City Center there. Rosalynn Carter is the honorary chairperson for the season and a close friend of Sylvia Mazzola, a member of Ailey's board and wife of the president of Lincoln Center.

"Syivia made all the arrangements here," Ailey said, throwing his arm around the shoulder of the petite Sylvia Mazzola.

Ailey and Mazzola were ardent Carter campaign supporters who were last here for his Inaugural Gala at the Kennedy Center. Ailey's troupe last performed at the White House for Lyndon Johnson's Festival of the Arts.

Ailey said he started dancing in California when he was 18, building his dancing technique on his earlier atheletic experience in football, basketball and gymnastics.

The program last night was to include "Cry," a Jomison solo; and excerpts from "Revelations," chorographed to arrangements of Negro the traditional Hall Johnson arrangements to upbeat rock rhythms.

Despite the cramped stage conditions, the company seemed to move freely and unrestricted in numbers that include pure abstractions, deeply emotional interpretations of the sorrows and aspirations of a whole people and comedy routines.

At one point, women in the company flourished parasols, and at another they stood on pedestal-like stools while being courted by their male companions.

The White House, taking no chances, had removed the low-hanging crystal ball from the chandelier at stage rear. Even so there was some concern about the priceless East Wing fixture.

"I just hope," said one White House insider, "that nobody kicks it."