State-dependent linear-optical qubit amplifier