This year, I learned a lot from you. I learned things I didn’t know before. I appreciate how you helped me improve as a writer. I just wanted to thank you.
People who dislike each other will rarely write thank you notes to each other. Perhaps you are taking the high road here and thanking this person because they taught you something despite your differences.
Maybe your parents are just making you…
No matter how you feel about someone, if you’re going to write a thank-you note, you should make it seem sincere and gracious. Therefore, you should drop phrases like “had a learning experience”. That just doesn’t sound too grateful…
Try this instead:
While we may have disagreed over the past year, I would like to thank you for the time and effort you put into teaching us. I learned a lot from you, and I couldn't have done it without you. Thanks a lot.
Keep in mind that teachers communicate with each other. Even if you won’t be in this teacher’s class again, she might talk about you to your next teacher.
You should smooth things over as much as possible.
Hope this helps.