The photovoltaic effect in non-uniform quantum wires