The ĥametz that is prohibited by the Torah on Pesaĥ is any one of the five species of cereal grains that came into contact with water and fermented. The five species are wheat (ĥitta), barley (se’ora), oats (shibolet shu’al), rye (shifon), and spelt (kusmin). These species are used to make bread, the staple food of mankind. The Sages ordained a special blessing to be recited before eating bread – “Who brings forth bread from the earth” (“ha-motzi leĥem min ha-aretz”). After eating bread, the Torah commanded us to recite Birkat Ha-mazon. So that bread will be tasty and easy to digest, its dough is fermented and made to rise.
There are two types of leaven products: ĥametz and se’or. Both are produced by mixing flour and water. Ĥametz is the regular leavening of dough to bake bread and cakes. The fermentation is accomplished by leaving the dough at rest without handling it. If one wants the leavening to be faster and of higher quality, one mixes se’or (sourdough) into the dough. Se’or is the second type of leavening. It is produced by leaving ĥametz for a long time, so that it continues to effervesce and ferment, until it tastes so sour that people cannot eat it. As noted, the purpose of se’or is to hasten and improve the quality of the leavening process of various types of dough, for the preparation of breads and cakes. More specifically, ĥametz is intended for eating while se’or is a leavening agent in preparing ĥametz foods. The Torah prohibited both, and the law is the same regarding both. One who leaves a kezayit of either of them in his possession during Pesaĥ violates bal yera’eh and bal yimatzei (Beitza 7b).
But if flour of the five cereal grains is mixed with water, kneaded rapidly, and put it into an oven immediately, then the dough will not have enough time to rise. This is the matza that we are commanded to eat on the first night of Pesaĥ, as a remembrance of the Exodus from Egypt, as is written, “And the people picked up their dough before it fermented” (Shemot 12:34). Thus, specifically those species of grain that may become ĥametz are the species from which one makes matza for the mitzva (Pesaĥim 35a).
Although rice and millet are similar to the five species of cereal grain, and although they rise, they do not undergo a complete fermentation process as the five cereal species do. Therefore, the prohibition against ĥametz does not apply to them, and if one made matza out of one of them, one does not fulfill any mitzva with it on Pesaĥ.
Note that kusmin (spelt) is not the same as kusemet (buckwheat). The former is one of the five species of cereal grain, whereas the latter is a type of legume and may be eaten on Pesaĥ by those who eat kitniyot; even among those who do not eat kitniyot, it is permitted for sick people (MB 453:4, 7. Note that some mix up the names and call spelt kusemet).