  We experimentally demonstrate a programmable single-qubit quantum gate. This
device applies a unitary phase shift operation to a data qubit with the value
of the phase shift being fully determined by the state of a program qubit. Our
linear optical implementation is based on the encoding of qubits into
polarization states of single photons, two-photon interference on a polarizing
beam splitter, and measurement on the output program qubit. We fully
characterize the programmable gate by quantum process tomography. The achieved
average quantum process fidelity exceeding 97% illustrates very good
performance of the gate for all values of the encoded phase shift. We also show
that by using a different set of program states the device can operate as a
programmable partial polarization filter.
