  We suggest a nanoelectromechanical setup that generates properly entangled
ancillary ("ancilla") qubits for error correction algorithms in quantum
computing, demonstrated as an encoder for the three-qubit bit flip code. The
setup is based on mesoscopic terminal utilizing the AC Josephson effect between
voltage biased superconducting electrodes and mechanically vibrating mesoscopic
superconducting grain in the regime of the Cooper pair box, controlled by the
gate voltage. Required functionality is achieved by specifically tailored
time-protocol of operating two external parameters: bias voltage and gate
voltage. The superconducting grain is fixed on the free end of a cantilever,
performing controlled in-plane mechanical vibrations, generating the
nanomechanical coherent states organised in a pair of entangled cat-states in
two perpendicular spatial directions. Cooper pair box and nanomechanical
coherent states become three entangled qubits in a particular way: quantum
information, initially encoded in superposition of the Cooper pair box states,
is transduced into quantum superposition of two special 3-qubit entangled
states, $\vert \uparrow + \, + \rangle$ and $\vert \downarrow - \, - \rangle$.
It constitutes the basic input state for the three-qubit bit flip code, used in
quantum computation mainly for error correction, "installed" on a single
physical object in which the last two ancilla qubits are generated by the
nanoelectromechanical setup.
