previous() {
        const autosaveData = localStorage.getItem('autosave');
        if (autosaveData) {
            const data = JSON.parse(autosaveData);
            load(data);
            localStorage.removeItem('autosave');
        }
    }
Function to retrieve the previous stable state of the circuit