Documentation

Complexitylib.Circuits.Encoding.Machine.RawGate.Defs

Machine emission of raw circuit gates — definitions #

A serialized raw gate consists of a fixed three-bit header followed by two terminated-unary wire references. The header is baked into finite control; the references are read from preserved canonical binary work tapes. One reusable zero scratch tape drives both natural-code emitters.

def Complexity.CircuitCode.Machine.rawGateHeader (op : AndOrOp) (negated₀ negated₁ : Bool) :

The fixed operation-and-negation prefix of a serialized raw gate.

Equations
Instances For
    def Complexity.CircuitCode.Machine.emitRawGateTM {n : } (op : AndOrOp) (negated₀ negated₁ : Bool) (counterIdx input₀Idx input₁Idx : Fin n) :
    TM n

    Emit one raw gate from two canonical binary wire-reference tapes.

    The scratch tape is restored to zero by each emitNatCodeTM call, so it can be reused for the second reference and by the surrounding stream generator.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Concrete time bound for one serialized raw gate.

      Equations
      Instances For
        def Complexity.CircuitCode.Machine.emitRawGateSpace (initialSpace input₀ input₁ : ) :

        All-prefix auxiliary-space bound for one serialized raw gate.

        Equations
        Instances For