Ok now from the anime series... I thought the ending was that Ayato was able to 'tune the world' and create the reality he wanted. He chose to create one where him and Haruka were always together so they grow up together, get married and had a child named Quon who looks like Quon.
Now from the RahXephon movie which was basically just re-using animation from the show with a different ending