French President Valery Giscard d'Estaing said today that France has successfully tested the neutron bomb and could produce it by 1982 or 1983.

Giscard said that a decision on whether France would become the first and perhaps the only nation to deploy the controversial weapon would depend on the military situation in Europe at that time.

Speaking at his semiannual press conference, the French president also said that Israel must withdraw from the West Bank and Gaza Strip before France will recognize Israel's frontiers, and he said he opposes President Carter's proposal for an interim arrangement in Afghanistan to achieve Soviet troop withdrawal.

Although the French leader did not say when or where the neutron bomb was tested, informed sources said the testing took place last year at France's South Pacific test site.The weapon is essentially an atomic antitank shell whose intensified radiation kills living things but spares buildings, military equipment and physical installations because of its drastically reduced heat and blast effects.

President Carter first earned West European distrust, especially that of West German Chancellor Helmet Schmidt, with his unilateral decision two years ago to shelve production and deployment of the weapon as a good-will gesture toward the Soviets.

Giscard said that the decision to produce the neutron bomb could be made in 1982 or 1983 if the weapon's present "configuration" is used or two years later if the weapon is desired in a different form. Informed sources said this was a reference to the additional time that would be needed to miniaturize the enhanced radiation shell, as it is technically known.

The sources scoffed at two other ideas that have been suggested in French public debate for how to use the neutron bomb principle. One would be to set up a string of neutron bombs along France's eastern frontiers as a kind of atomic minefield against an invader. The other would be to use it as a strategic weapon that could destroy urban populations while leaving cities intact.

Giscard made it clear by the context in which he placed his statements about the neutron bomb that he links whatever decision is made to deploy it to the defense of West Germany, France's closest partner in Europe.

"In our reflections about the use of atomic weapons," he said, "we will take into account the fact that France is directly concerned by the security of neighboring European states."

The neutron bomb debate in France has become a major domestic political football in which Giscard's Gaullist rivals within the governing majority have accused him of not having the nerve to push the nuclear button in case of war with the Soviet Union. Many Gaullists have offered Giscard's interest in the neutron bomb as proof of his abandonment of the official French doctrine of massive nuclear retaliation.

The neutron bomb, those Gaullists note, is a battlefield weapon whose existence implies that France is ready to abandon its stated intention of meeting any form of atomic attack with a strategic strike against the major cities of European Russia.

Socialist leader Francois Mitterrand said this week in a press conference that Giscard lacks the "character" to press the button. The Gaullists and Socialist parties both said they favored continuing research on the techniques of the neutron bomb without actually making it. The Communist Party opposes it altogether.

In a statement clearly meant to answer the accusations about his lack of nerve, Giscard said, "Any nuclear attack against French soil would automatically elicit a strategic nuclear response."

Coming in an election year, the accusations that Giscard lacks the determination to defend the country are particularly damaging, especially since they have been backed by public opinion polls showing that half of those polled think Giscard would back down in a crisis.

He also countered the arguments about the dangers of depending on the neutron bomb by saying that "the defense effort of a country cannot be delegated to a new weapon" as was the case with France's Maginot Line fortifications that the German army simply bypassed in 1940. A nation's defense, he said, involves "the soul of a people" rather than weaponry alone.

He said, however, that France has also decided to develop a mobil strategic missile. No decision seems to have been made, however, whether to place such missiles on railroad track like the American MX system or on trucks.

Objections have been raised to both approaches that France's territory is too small and too densely populated for effective dispersal of land-based missiles. The mobile missiles would replace the fixed launchers in silos on the Albion Plateau in the south of France.

Answering Gaullist demands that the draft be reduced from 12 months to four and Socialist demands that it be reduced to six, Giscard said that this would be seen as "abandonment and resignation" and that his decision against such a move is "irrevocable." The French President said, "I will not allow the French army to be demolished."

On other points, Giscard:

Said that Israel must withdraw from occupied territories before there can be any recognition of Israel's frontiers. French diplomats indicated that insistence on Israeli withdrawal from the West Bank and Gaza Strip, territories conquered in the 1967 war, would be the central element in a new French diplomatic offensive on the Middle East since France recently got the other members of the European Community to accept the French position that there should be "full self-determination" for the Palestinian people.

Giscard called for the negotiation of a "calendar" for Israel withdrawal, just as Israel agreed to such a schedule in the Sinai negotiations with Egypt. This new French position is considered likely to be met with hostility in Israel.

French diplomats say that their idea is that such a commitment to withdrawal by Israel should be the quid pro quo for the Palestine Liberation Organization's abandonment of the call in its charter for the destruction of Israel. Just as withdrawal would be step-by-step, recognition of Israel by the Palestinians could come in stages, French sources say.

Giscard ducked a question on whether he would be willing to follow up his recent tour of the Arab world with a visit to Israel. But he made a point of reassuring French Jews, who have been threatening to vote against him in his reelection bid next spring.

Admitted that, while the limited Soviet withdrawal from Afghanistan is "a gesture in the right direction," there is "no calendar" for a Soviet withdrawal. Giscard said that he opposes President Carter's call in Belgrade for an interim arrangement in Afghanistan.

The French leader said he favors a "final," overall settlement -- an approach that recalls the French insistence that Washington's piecemeal approach to a Middle East settlement is disastrously mistaken and should be replaced by the search for a global solution of all of the region's problems at once.