Last night's state dinner at the White House for President Jose Lopez Portilo of Mexico was full of a commodity prominent in the current relations between the two countries -- oil.

There was a flavor of oil (cast, perhaps on troubled waters) in President Jimmy Carter's remark that Lopez Portillo's recent speech at the United Nations was "the most profound and beautiful I have ever read."

And there was a reference to oil in the Mexican president's toast, which present an apocalyptic vision of mankind standing on "a bridge that spans one era to another" and predicted that "we can survive and cross" it if the United States will become more moderate in its consumption of energy.

President Carter's introduction to his toast recalled his recent, partially unsuccessful trip to Mexico. "Tonight," he said, "we are determined to make the results of our toasts better than they were when I was in Mexico City."

The results of last night's toasts were, in fact, mixed. The toasts were shifted to the beginning of the dinner from their usual place at the end, and because of this, the wine had not yet been poured when Carter began. He gave his toast with water, and later followed it up with a short toast with wine, "just to make sure that the toast is authenticated." The White House press office explained it was the president's wish to shift the toast to its new time slot. And later, the president said he had decided to do it that way from now on.

"We tried it overseas a couple of times and I like it," Carter told reporters. "When the toast comes first you don't have to sit through the dinner worrying about the speech you have to give afterward."

At the end of the four-course dinner that included smoked trout and filet mignon and while the strolling violins were still playing, President Carter whisked the first lady of Mexico out onto the floor for a quick dance while the rest of the 140 guests sat watching.

In the Blue Room, where the Carters and their guests of honor gathered before the entertainment, Carter was asked whether he had heard about Fidel Castro's attack on him yesterday in Cuba.

'I saw it on TV,' Carter said. "I'll deal with it Monday night" in his address to the nation.

Secretary of State Cyrus Vance waved a reporter away, saying he wasn't going to comment. And National Security Affairs Assistant Zbigniew Brezezinski, who had been chatting with a young woman with the Mexican president'sparty, indicated he was more interested in his friendship with her.

And what about the friendship between President Carter and Castro?

"My friendship with the Mexican girl is warmer and more hopeful, too." Brzezinski said, laughing, and, taking his wife by the arm, headed for the door.

More outspoken on the crisis was Rep. Jim Wright (D-Tex.), who said that "it wouldn't be serious if it were just a question of those Soviet troops. It's not anything in the nature of the Cuban missile crisis, but it is an affront to us, coupled with the fact that Cuba is exporting revolution."

Sen. Lloyd Bentsen (D-Tex.) said that the present meeting between Carter and Lopez Portillo was "considerably wbarmer and more relaxed" than last February's meeting in Mexico City, at which Bentsen was present.

"The gas deal doesn't amount to a lot," he said, "but it's a start; it's symbolic."

The guest list included a number of prominent Hispanic Americans from government and from private business. Among them were Carter's nominee for secretary of the Navy, Edward Hidalgo, outoing Commissioner of Immigration and Naturalization Leonel J. Castillo and the new chief of protocol, Abelardo Lopez Valdez, making his debut as the State Department's top introducer.

After the Carters saw the Mexican president and his wife to their limousine, one guest confronted Carter on the north portico of the White House. "When are you going to meet with Chicano leaders?" asked Frank B. Shaffer-Corona, a member of the D.C. Board of Education.

The president looked a little startled and replied, "Whenever you want."

"We've been wanting to ever since January 1978," Shaffer-Corona said. When Carter told him that he had been meeting with Chicano leaders, Shaffer-Corona said, "We're the elected ones, not the ones with federally funded agencies."

Carter told him to meet with his special assistant for Hispanic affairs, Esteban Torres, to arrange a meeting. Later, Shaffer-Corona said he had been invited last night after "reminding" the White House that it would be an oversight not to invite "the first and only elected Chicano/Latino/Hispanic in the history of D.C." to last night's party.

In many ways, the most exciting event of the evening was the Andante con moto from the Brahms Quartet in G Minor for piano and strings, as performed by members of The Chamber Music Society of Lincoln Center, who also played selections from Mozart and Mendelssohn. It was one of the most distinguished musical evenings at the White House in an administration that has witnessed many great performances.

The guest list: Mexican President Lopez Portillo, and Mrs. Portillo Jose Ramon Lopez Portillo, director-general of documentation and analysis, secretariat of programming and budget Miss Carmen Lopez Beatriz Lopez Portillo Romano Miss Paulina Lopez Portillo Romano Miss Maria Antonieta Garcia Lopez Loaeza Augustin Tellez Cruces, president of Supereme Court of Mexico Joaquin Gamboa Pascoe, president of the senate of Mexico Jorge Castaneda de la Rosa, secretary of Foreign Relations of Mexico and Mrs. Neoma Goodman de Castaneda Ambassador of Mexico and Mrs. Margain Jose de la Vega Dominguez, secretary of commerce of Mexico Jose Andres de Oteyza, secretary of patrimony and industrial development General Miguel Angel Godinez Bravo, chief of staff of the presidential general staff and Mrs. Myriam Sotres de Godinez Rafael Tovar de Teresa, director general for cultural affairs Secretary of State Cyrus Vance and Mrs. Vance Attorney General Benjamin Civiletti and Mrs. Civiletti Secretary of Agriculture Bob Bergland and Mrs. Bergland Secretary of Energy Charles Duncan and Mrs. Duncan Zbigniew Brzezinski, assistant to the president for national security affairs Senator and Mrs. Frank Church (D-Iaho) Senator and Mrs. Lloyd Bentsen (D-Tex.) Senator and Mrs. Edward Zorinsky (D-Neb.) Rep. and Mrs. Jim Wright (D-Tex.) Rep. and Mrs. James C. Corman (D-Calif.) Rep. Henry B. Gonzalez (D-Tex.) Rep. and Mrs. Lionel Van Deerlin (D-Calif.) Rep. Eliglio de la Garza (D-Tex.) Alonzo McDonald assistant to the president and White House staff director and Mrs. McDonald Esteban E. Torres, special assistant to the president for hispanic affairs and Mrs. Torres Graciela Oliverez, dir., community services administration and Richard

Bowman Patrick J. Lucey, American ambassador to Mexico and Mrs. Lucey Abelardo Lopez Valdez, chief of protcol and Mrs. Valdez Viron Po. Vaky, assistant secretary of state for Inter-American

Affairs and Mrs. Vaky Jordan J. Baruch, assistant secretary of commerce for science and technology and Mrs. Baruch Guy Erb, national security council staff member and Mrs. Erb Richard Hernandez, deputy assistant for political liaison, White

House, and Mrs. Hernandez Edward Hidalgo, assistant secretary of the Navy (Secretary of the Navy-designate) and Mrs. Hidalgo Joseph J. Jova, former ambassador and Mrs. Jova Marvin L. Warner, former ambassador and Mrs. Warner Leonel J. Castillo, Commr., immigration and naturalization

service, dept. of Justice and David Crosland Eddie Albert, actor, Los Angeles, Calif. Polly Baca-Barracan, Colorado state senator Elliot H. Cole, attorney, Washington, D.C., and Mrs. Cole Thomas Espinoza, Chicanos por la Causa, Phoenix, Ariz., and Mrs. Espinoza James H. Evans, chmn., Union Pacific Corporation, New York, N.Y., and Mrs. Evans Mr. and Mrs. Manuel Flerro, Alexandria, Va. William D. Grant, pres., Businessmen's Assurance, Kansas City, Mo., and Mrs. Grant Armand Hammer, chmn., Occidental Petroleum Corp., Los

Angeles, Calif., and Mrs. Hammer Don Irwin, Los Angeles Times, Washington, DC., and Mrs. Irwin Morris D. Jaffe, San Antonio, Tex., and Mrs. Jaffe Mr. and Mrs. Harold Kapelovitz., Beverly Hills, Calif. Arthur F. Kelly, chmn., Western Airlines, Los Angeles, Calif., and Mrs. Kelly Fred J. Kroll, International Pres., Brotherhood of Railway, Airline & Steamship Clerks, Freight Handlers, Express & Station Employees, and Mrs. Kroll Robert Krueger, Ambassador at Large and Coordinator for Mexican Affairs-designate; and Morgan Peyton George H. Lawrence, pres., American Gas Association, Arlington, Va., and Mrs. Lawrence David Lizarraga, co-chmn., National Black-Hispanic Democratic Coalition, Covina, Calif., and Mrs. Lizarraga Vilma Martinez, pres. and gen. counsel, Mexican American Legal Defense and Educational Fund; and Abelardo I. Perez David Morales, pres., California Association of Mexican-American Contractors, Cerritos, Calif. Jeremiah O'Leary, The Washington Star, and Mrs. O'Leary Jack Otero, vice chmn., Labor Council for Latin American Development, and Mrs. Otero Mr. and Mrs. Juan Patlan, San Antonio, Tex. John C. Portman, Jr., architect, Atlanta, Ga., and Mrs. Portman Albert Ramirez, Fresna, Calif., and Raquel Palacios Ben Reves, Texas state representative, and Guillermo Villareal Bernard J. Ridder, St. Paul Pioneer Press and Dispatch St. Paul, Minn., and Mrs. Ridder Ed. L. Romero, pres., Solar America, Albuquerque, N.M. and Mrs. Romero Carl Ross, Mexico City, Mexico, and Mrs. Debbie Purcell, daughter Frank Sepulveda, pres., West Coast Produce, San Antonio, Tex., and Mrs. Sepulveda Dr. and Mrs. Jose Serrato, Columbus, Ga. Norman Singer, The Chamber Music Society of Lincoln Center, New York, N.Y. The Rev. Leon Sullivan, chmn., Opportunities Industrialization

Centers, Philadelphia, Pa., and Mrs. Sullivan Lee Swift, attorney, Washington, D.C., and Constance G. Jones Charles Wadsworth, The Chamber Music Society of Lincoln

Center, New York, N.Y. and Mrs. Wadsworth