setKnownEffectToPhaser(phaseTurnsFunc) {
        this.gate._hasNoEffect = false;
        this.gate._effectPermutesStates = false;
        this.gate._effectCreatesSuperpositions = false;
        this.gate._isDefinitelyUnitary = true;
        this.gate._stableDuration = Infinity;
        this.gate.knownPhaseTurnsFunc = phaseTurnsFunc;
        this.gate._knownMatrixFunc = () => Matrix.generateDiagonal(
            1 << this.gate.height,
            k => Complex.polar(1, Math.PI * 2 * phaseTurnsFunc(k)));
        return this;
    }
Provides a phase-factor function asserted to be equivalent to the gate's effect.

Determines various properties of the gate (e.g. unitarity) and also used by tests to check if the gate's shader's
behavior is correct.

@param {!function(state: !int) : !number} phaseTurnsFunc
     Determines how many turns each basis state should be phased by, in full-turn units.
@returns {!GateBuilder}