The terms of your appointment are quiet and perhaps unnecessarily complex
(I hope the mistakes in the letter are typing errors on your part)
1. They have a notice period of 2 months. But only after you are confirmed (you have a letter that your probation is over and confirmed with the company)
2. They can still terminate without notice for a number of reasons listed.
Termination on account of non-performance without notice is a rare clause. I am not sure if it will stand scrutiny in a court. However, if it does, then ofcourse, the management must have performance parameters and reasons why they consider you have failed. Simply because you have worked for 1.6 years is not a proof that your performance was good. If you joined as a fresher, they would not consider you as productive for the first 6 months anyway. Thereafter, they would try to get you to fall in line with company standards. If you fail, then they will give up somewhere after a year, which seem to fit the pattern here.
I dont know whether your supervisor has been prompting you to improve, or to correct mistakes, or meet coding standards, etc. Further, you have not said whether they have given anything in writing on that front, or whether it was all oral. If there is evidence that they were happy with the work.
Now, whether they were fair or unfair is of little consequence in the larger picture of your career.
1. If evidence is there, you can approach labour officer and file a compliant
2. If evidence is in your official email, its tougher but can still be done (labour officer can ask for copy of emails in your account)
3. If no evidence exists, you can still complain and then the company will have to give their side of the story and evidence (which they can easily create)
More Important, can you spend time fighting the company ?
Also equally important, do you want to fight, considering that any job you take up may do a reference check with the employer ?
Third, at best you are going to get 2 months salary. Are you willing to accept a "Termination" letter in exchange ? That is considered as a major negative by most HR Departments
Considering all that, it would make sense to resign and get a clean exit. However, do negotiate with them to see if they will give you part of the notice pay. Which path to follow you need to decide depending on various circumstances and weighing probabilities that we can not do for you as we will not have the full details. However, I would not favour giving a resignation letter without being clear that the company will give you a clean exit. (definately offer to complete 2 months notice period)