As promised the official US site has released the QR code that lets you receive Magearna in Pokémon Sun & Moon!
To receive your Magearna, first scan the below QR code using the QR Scanner located in the menu. Then head to the Antiquities of the Ages shop located at the top right of the second floor within Hau’oli City’s Shopping Mall and talk to the delivery man. Note that you won’t be given the Mythical Pokémon unless you have completed the main storyline and become the Champion of the Alola Region.
This Magearna is level 50, comes with a Bottle Cap, and knows the moves Fleur Cannon, Flash Cannon, Lucky Chant and Helping Hand. This QR code can only be scanned once per game and does not expire.