I am not sure about the notice period being in law, but the best thing for you to do is contact your local Mieterverband who will be able to provide you with the advice you need specific to your situation.
When friends have left apartments in Zurich area before the dates specified on the contract they have simply had to provide the landlord with a list of people who would be willing to take it over and who can pay etc. As far as my wife knows you only have to bring one such applicant to the landlord who is suitable, i.e. is capable of paying etc, and if the landlord turns them down it is not your problem. As I said though the Mieterverband in your area will give you the best advice.
Based upon the German Mieterverband website, I think this is the equivilent website for the Swiss French region -
http://www.asloca.ch/section.php?id=5