Can we swear by Quran or by such and such ayah?
The Quran is the words of Allah, so you can swear by the Quran as we are allowed to only swear by Allah and His attributes. But we do no swear by the Mushaf while meaning the papers of the Mushaf, like some people hold the Mushaf to swear by it.
As for swearing by an ayah, no, one swears by the Quran or by the words of Allah: (أقسم بالقرآن أو بكلام الله)
But you should minimize your swearing in general and better to say, I swear by Allah (أقسم بالله)