nextMeasureMask(inputMeasureMask, disabledReasons) {
        let state = {measureMask: inputMeasureMask, earlierRowWithSwapGate: undefined};
        for (let row = 0; row < this.gates.length; row++) {
            this._updateMeasureMask_gateStep(state, row, disabledReasons);
        }
        return state.measureMask;
    }
@param {!int} inputMeasureMask
@param {!Array.<undefined|!string>} disabledReasons
@returns {!int}