Canonical auxiliary answer coding #
Pauli payloads are left as bytes for the separate field-aware parser. The other three answer shapes use full-register binary vectors and the existing canonical tuple syntax. Valid raw tuples re-encode exactly, so same-type byte consistency is exactly consistency of parsed answers.
Encode full register coordinates and preserve the original answer bytes.
Equations
- One or more equations did not get rendered due to their size.
- MIPRE.Introspection.AuxiliaryAnswer.bits (MIPRE.Introspection.ParsedAnswer.pauli a) = a
- MIPRE.Introspection.AuxiliaryAnswer.bits (MIPRE.Introspection.ParsedAnswer.pair y a) = MIPRE.Introspection.AnswerParser.pairBits (MIPRE.CL.toBits y) a
- MIPRE.Introspection.AuxiliaryAnswer.bits (MIPRE.Introspection.ParsedAnswer.read y yp a) = MIPRE.Introspection.AnswerParser.tripleBits (MIPRE.CL.toBits y) (MIPRE.CL.toBits yp) a
Instances For
Total type-directed decoding; the caller checks canonical format first.
Equations
- One or more equations did not get rendered due to their size.
- MIPRE.Introspection.AuxiliaryAnswer.decode Q (Sum.inl val) x✝ = MIPRE.Introspection.ParsedAnswer.pauli x✝
Instances For
Decoding chooses exactly the constructor required by the question.
Every correctly tagged parsed answer survives the byte round trip.
Canonical syntax and register lengths, with the separate original-answer cutoff.
Equations
- MIPRE.Introspection.AuxiliaryAnswer.Valid Q R (Sum.inl val) x✝ = True
- MIPRE.Introspection.AuxiliaryAnswer.Valid Q R (Sum.inr (MIPRE.Introspection.AuxType.introspect, snd)) x✝ = MIPRE.Introspection.AnswerParser.pairValid Q R x✝
- MIPRE.Introspection.AuxiliaryAnswer.Valid Q R (Sum.inr (MIPRE.Introspection.AuxType.sample, snd)) x✝ = MIPRE.Introspection.AnswerParser.pairValid Q R x✝
- MIPRE.Introspection.AuxiliaryAnswer.Valid Q R (Sum.inr (MIPRE.Introspection.AuxType.read, snd)) x✝ = MIPRE.Introspection.AnswerParser.tripleValid Q R false x✝
- MIPRE.Introspection.AuxiliaryAnswer.Valid Q R (Sum.inr (MIPRE.Introspection.AuxType.hide k, snd)) x✝ = MIPRE.Introspection.AnswerParser.tripleValid Q Q true x✝
Instances For
A parser-accepted auxiliary payload is the exact canonical encoding of its decoded answer, including the full third register of a Hide answer.
For a fixed type, byte equality and parsed equality coincide.