  We report a full self-consistent ab initio calculation of the conductance of
a diarylethene-based molecular switch with two graphene electrodes. Our result
show the contributions of the resonant states of the molecule, of the electrode
density of states, and of graphene unique features such as edge states. The
conductivities are found to be significantly different for the two photochromic
isomers at zero and finite applied bias. Further we point out the possibility
of causing the switching by the application of a large potential difference
between the two electrodes.
