ketShaderPhase = (head, body, span=null) => ketShader(
    `${head}
        float _ketgen_phase_for(float out_id) {
            ${body}
        }
    `,
    `
        float angle = _ketgen_phase_for(out_id);
        return cmul(amp, vec2(cos(angle), sin(angle)));
    `,
    span)
Returns a shader that multiplies each of the amplitudes in a superposition by computed phase factors.

@param {!String} head Header code defining shader methods, uniforms, etc.
@param {!String} body The body of a shader method returning the number of radians to phase by.
@param {null|!int=null} span The number of qubits this operation applies to, if known ahead of time.
@return {!{withArgs: !function(args: ...!WglArg|!WglTexture) : !WglConfiguredShader}}