PEKING -- Unlike the legendary, red-walled Imperial Palace of the Ming Dynasty, which faces onto Tiananman Square, China's State Guest House is still a genuinely forbidden city, offering the height of luxurious treatment to a small but increasing percentage of Foreign tourist coming to the People's Republic.

It isn't just the boxy opulence of the rooms in the 18 individual villas, where heads of government and official visitors are usually lodged, or the antiques in the drawing rooms, the telephone by the toilet, the bidet and the twin washbowls in the marble bathrooms, or that it is the cleanest hotel in China.

It isn't even the uniformed and plain-clothes security personnel who ring the walled, 100-acre compound in the city's western suburbs, or that the colors and numbers on the laminated passes required for individual entry are changed from time to time. After all--even more so than the rich--the powerful and influential are different from you and me. For one thing, they have more bodyguards.

Last October, for example,Muammar Qaddafi brought with him from Libya a security detail composed entirely of fatigue-clad, machine gun-toting young women. (Qaddafi, decked out in dark glasses, a white uniform and cape and swagger stick, reportedly gave the management fits when he summoned Western reporters to a midnight press conference.)

And sometimes the traffic in leaders paying state visits to Peking taxes the resources of the facility: One night last fall, in addition to the few tourists on the grounds, both Britain's Prime Minister Margaret Thatcher and North Korea's President Kim II-Sung, and their respective entourages, slept at the State Guest House.

Tourist groups have been staying at the facility, sometimes called Angler's Rest, or by its Chinese name, Diaoyutai, only since 1980, when Lindblad Travel established an exclusive relationship with the State Guest House by renting three of the villas on a seasonal basis. In late 1981, both Hemphill-Harris and Maupintours, among other agencies, made similar arrangements. In addition to the quality of the accommodations, the hotel had the distinction of being one of only two hotels in China (the other is in Shanghai) offering confirmed reservations to Western tour groups; in most cases, groups do not know for certain what hotel they will be staying at until they get to a given city.

Old Diaoyutai, "The Emperor's Angling Terrace," dates back more than 800 years, to the Jin Dynasty (1115-1234 A.D.), when the Emperor Zhang Zhong laid out a terrace for fishing above a pond fed by spring water from the Western Hills. Later, a prime minister of the Yuan Dynasty (1271-1368), Lian Xian, built a villa on the site, which he called the Hall of Ten Thousand Willows. After a period in the Ming Dynasty (1368-1644) when it was used by eunuchs and imperial retainers and relatives, Manchu Emperor Qian Long turned the area into an imperial garden, dredged the pond and turned it into a lake.

More recently, in much the same way as the Forbidden City downtown was the personal preserve of the Dowager Empress Ci Xi, the mistress of the manor at the State Guest House in the 1960s was Jiang Jing, widow of MaoTse-tung.

Our stay, with a group from Olson-Travelworld, was sandwiched between visits by the prime minister of Thailand and a former high official of Pol Pot's Khmer Rouge government of Cambodia, now Kampuchea. Our young guide from China International Travel Service lost no time informing the group of its good fortune in staying at the State Guest House. ''You are soooo lucky to be staying at Diaoyutai!'' Sun XieXin said as the tour bus pulled out of thePeking Airport, ticking off the facilities available on the grounds and the famous visitors who have stayed there.

In the past year the State Guest House has played host to Richard Nixon and Henry Kissinger--both making return visits--Presidents Mohammed Zia ul-Haq of Pakistan and Hossain Mohammad Ershad of Bangladesh, President Karl Karstens of West Germany, President Mobutu Sese Seko of Zaire and former Master Sgt. Samuel K. Doe, now presiding over the Revolutionary Military Council of Liberia.

The only evidence I could find of diplomatic activity on several late night strolls of the grounds were two great, black sleeping Chryslers with small American flags on their hoods. By day, however, the scenery is outstanding. The lakes, bridges, pavillions, rock gardens and waterfalls provide a restful backdrop for contemplative strolls. Much of the exquisite landscaping is the responsiblity of a family from Suzhou, China's famed "garden city."

Oddly enough, while guides and tour managers for Western agencies like to have their groups stay at the State Guest House when it is their last stop in China, they are distinctly less enthusiastic about it being the first stop in the Middle Kingdom, mainly because it sets up unrealistic expectations for other hotels and guest houses in the country--none of which compares to Diaoyutai. Lindblad, for example, generally prefers to make Peking the last stop for its China tours. Another minor drawback is that, for some reason, it is almost impossible for those without limousines or motorcades at their disposal to get a taxi to make a pick-up at the State Guest House.

Position-conscious dignitaries have one problem tourists don't: which villas will their Chinese hosts decide to put them in? Villas number 4 through 10 are for tourists. Heads of state are usually lodged in Villa 18 (except when two are there at once, as was the case with Thatcher and Kim II-Sung), and lesser officials are housed in descending order of their importance to the government. For instance, Richard Nixon stayed in 18 while president, dropped to the mid-teens for his post-resignation visit and most recently was housed in 8. All of this involves the subtle gradation of status and face which the Chinese have always considered of great importance.

Secretary of State George P. Shultz was scheduled to begin a goodwill visit to China Feb. 2. A State Department spokeswoman said she did not know if Shultz will stay at the Guest House, but in any case such announcements are not made in advance for security reasons.

If you go as a tourist, you'll have to go with a group. Rates range from $125-$150 per night, including meals, which are prepared and served in each villa.