Nature Materials 16, 1216–1224 (2017); published online 23 October 2017; corrected after print 4 December 2017.

In the version of this Article originally published, the x-axis units of Fig. 3a were incorrectly given as ms, and should have read μs. This has now been corrected. Two places in the text also needed amending to reflect this change: the penultimate sentence of Fig. 3c,d caption now starts 'Microsecond pulses are used', and the penultimate sentence of the second paragraph of 'Device performance' has been changed to begin 'Device A was measured continuously over 230 days with microsecond write–read pulses'. All have now been corrected in the online versions of the Article.