Sophia became a friend and admirer of Gottfried Leibniz while he was librarian at the Court of Hanover. Their friendship lasted from 1676 until her death in 1714. This friendship resulted in a substantial correspondence, first published in the 19th century (Klopp 1973), that reveals Sophia to have been a woman of exceptional intellectual ability and curiosity. She was well-read in the works of René Descartes and Baruch Spinoza. Together with Ernest Augustus, she greatly improved the Herrenhausen Palace and she was the guiding spirit in the creation of the Herrenhausen Gardens surrounding the palace, where she died.