function parityGatherScatter(ctx, order) {
    let c = ctx.rawControls;
    let isLast = 2 << ctx.row > c.parityMask;
    let isFirst = 1 << ctx.row === (c.parityMask & ~(c.parityMask - 1));
    if (order ? isLast : isFirst) {
        ctx.applyOperation(PARITY_SHADER.withArgs(
            ...ketArgs(ctx.withRow(Util.ceilLg2(c.parityMask & c.inclusionMask))),
            WglArg.float('parityMask', c.parityMask)
        ));
    }
}
Applies a multi-target CNOT operation, merging the parities onto a single qubit (or reversing that process).

Note that this method is invoked for each parity control, but only the last one in the column is supposed to
perform the operation (or, when uncomputing, the first one).

@param {!CircuitEvalContext} ctx
@param {!boolean} order