A method for operating a memory cell, a resistance of the memory cell drifting over a period of time and a memory state of the memory cell being represented by a configuration of amorphous material in the memory cell; and the memory cell being a phase change memory cell, the method comprising: applying a plurality of electrical input signals to the memory cell; and measuring a plurality of electrical output signals from the memory cell resulting from the plurality of electrical input signals; characterised in that the method further comprises the steps of: calculating an invariant component of the plurality of electrical output signals by mapping the plurality of measurements of electrical output signals to a single valued quantity, the single valued quantity being one of the thickness of the amorphous material and thickness of polycrystalline material in the memory cell or one of the surface of the amorphous material cross section and the surface of the polycrystalline material cross section in the memory cell, each single valued quantity corresponding to one of the possible memory cell states, the invariant component being equal to the single valued quantity and being substantially independent of a resistance drift characteristic of the memory cell over the period of time; and determining a memory state of the memory cell based on the invariant component. applying a plurality of electrical input signals to the memory cell; and measuring a plurality of electrical output signals from the memory cell resulting from the plurality of electrical input signals; characterised in that the method further comprises the steps of: calculating an invariant component of the plurality of electrical output signals by mapping the plurality of measurements of electrical output signals to a single valued quantity, the single valued quantity being one of the thickness of the amorphous material and thickness of polycrystalline material in the memory cell or one of the surface of the amorphous material cross section and the surface of the polycrystalline material cross section in the memory cell, each single valued quantity corresponding to one of the possible memory cell states, the invariant component being equal to the single valued quantity and being substantially independent of a resistance drift characteristic of the memory cell over the period of time; and determining a memory state of the memory cell based on the invariant component. calculating an invariant component of the plurality of electrical output signals by mapping the plurality of measurements of electrical output signals to a single valued quantity, the single valued quantity being one of the thickness of the amorphous material and thickness of polycrystalline material in the memory cell or one of the surface of the amorphous material cross section and the surface of the polycrystalline material cross section in the memory cell, each single valued quantity corresponding to one of the possible memory cell states, the invariant component being equal to the single valued quantity and being substantially independent of a resistance drift characteristic of the memory cell over the period of time; and determining a memory state of the memory cell based on the invariant component.