We describe a new technique (published in Phys. Rev. D89 114501) to determine the contribution to the anomalous magnetic moment of the muon coming from the hadronic vacuum polarisation using lattice QCD. Our method uses Pade approximants to reconstruct the Adler function from its derivatives at $q^2=0$. These are obtained simply and accurately from time-moments of the vector current-current correlator at zero spatial momentum. We test the method using strange quark correlators calculated on MILC Collaborations $n_f = 2+1+1$ HISQ ensembles at multiple values of the lattice spacing, multiple volumes and multiple light sea quark masses (including physical pion mass configurations). We find the (connected) contribution to the anomalous moment from the strange quark vacuum polarisation to be $a^s_mu=53.41(59)times 10^{-10}$, and the contribution from charm quarks to be $a^c_mu=14.42(39)times 10^{-10}$ - 1% accuracy is achieved for the strange quark contribution. The extension of our method to the light quark contribution and to that from the quark-line disconnected diagram is straightforward.