Rinse the rice thoroughly and add it to the inner pot of the Instant Pot. Add two cups of milk and half of the sugar. Mix well.
Ensure the sealing ring is in place and set the vent to the sealing position. Cook the kheer in "porridge mode." (alternatively 20 minutes at high-pressure manual mode) When the cooking is complete, wait for five minutes and release the remaining pressure by moving the vent to the sealing position. Here is the cooked rice.
Soak the walnuts and grind (parallel task)
While the rice is cooking, you can soak the walnuts for 15 to 20 minutes.
Drain the water and grind it into a paste by adding ½ cup of water.
Add the other ingredients and simmer.
Mash the rice well with a spoon. Set the Instant Pot in saute mode. Add the remaining 3 cups of milk, ground walnut mix, and ground cardamom.
Mix them all without any lumps.
Now add the sugar and mix well.
Let the kheer simmer for 3 to 5 minutes. Do not leave the kheer unattended and mix in between to prevent the kheer from sticking to the pot. When it simmers, turn off the Instant Pot.
Adjust sugar as per your preference. You can reduce the sugar measure and use sweet condensed milk.
You can adjust the amount of flavoring (cardamom) to taste. You can also add saffron or rose petals.
I did not add roasted nuts or raisins, but nothing wrong with adding them. You can roast some cashews and raisins in 1 tbsp of ghee and add to the kheer.
Basmati rice is preferred, but you can use other rice varieties.