A mask-programmable logic device that implements a pre-existing circuit design and that includes programmable smart switches is provided. The feed gas is separated to provide the H2-enriched product and a stream of sour gas. In some examples, the Negative Group Velocity Dispersion Fiber is a Dispersion Compensating Fiber.