Circuit translations with shared context inputs #
A contextual translation implements every source operation by a target circuit that receives a fixed block of shared context inputs followed by the ordinary operation arguments. Compilation retains one copy of the context for the whole source circuit.
This is useful when a syntactically nullary source gate denotes an object that
depends on shared ambient variables—for example, a dictionary term in a
Waring decomposition. Ordinary Translation cannot express that dependency
because a nullary operation gadget has no inputs.
An implementation of every source operation by a target circuit with a
shared q-input context followed by its ordinary arguments.
Target circuit implementing a source operation from the shared context and the operation's local arguments.
Instances For
Number of target gates used to implement a source operation.
Instances For
Concatenate the shared context with the ordinary circuit inputs.
Equations
- Algebraic.ContextualTranslation.appendInputs context input i = Fin.addCases context input i
Instances For
Pull a target interpretation back after fixing the shared context.
Equations
- translation.pull interpretation context op input = (translation.operation op).eval interpretation (Algebraic.ContextualTranslation.appendInputs context input) 0
Instances For
Charge a source operation by the exact target cost of its contextual implementation.
Instances For
The compiled target program and the image of every source wire.
- gateCount : ℕ
Number of gates in the compiled target program.
Compiled program over the context followed by the source inputs.
Image of every source input or gate wire.
Instances For
Compile a source program while sharing one ambient context block across all operation gadgets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Number of target gates produced by contextual compilation.
Equations
- translation.compiledGateCount circuit = (translation.compileProgram circuit.program).gateCount
Instances For
Compile a circuit, prefixing its source inputs by the shared context.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Contextual program compilation preserves the value of every source wire.
Contextual circuit compilation preserves evaluation exactly.
Contextual program compilation preserves pulled-back weighted cost exactly.
Contextual circuit compilation preserves pulled-back weighted cost exactly.
The compiled size is source cost under contextual gadget sizes.
A uniform contextual gadget-size bound controls compilation size.