Entanglement-assisted quantum error correction with linear optics