Native uniform quantum oracle circuits with explicit inputs #
encOracleGateCode uses the existing option encoding: a query is the empty word, and an
elementary instruction is true followed by its phase-gate encoding. The latter retains the
phase flag, Hadamard/inverse flag, unary target and list of unary controls. Lists of instructions
use the usual framed list encoding, so even a query contributes to the encoded program length.
A native polynomial-time generator receives the unary security parameter and classical input length separately. It returns every register size and instruction. Its exact encoded output length is the generated-description cost and also bounds active qubits and instruction count; restricting auxiliary lengths by any polynomial bound yields a computable polynomial resource schedule. No resource bound is assumed as a field of the family.
Execution places a supplied quantum state after the encoded classical input, initializes the
other wires to zero, and uses one fixed coherent oracle throughout. Terminal measurement returns
the declared output prefix. Supplied states need not be efficiently preparable. Oracle.Density
extends this execution to mixed states and inaccessible entangled references. Interactive classical
oracles, consistent random-oracle sampling across widths, and a gate-approximation theorem are
separate obligations.
The definitions and results are original infrastructure, not a QROM security claim.
Main definitions #
Cslib.Quantum.encOracleGateCode: a finite binary encoding of oracle instructions.Cslib.Quantum.OracleCircuitDescription: all register sizes and instructions.Cslib.Quantum.UniformOracleCircuitFamily: a native generator of valid descriptions.Cslib.Quantum.UniformOracleCircuitFamily.run,.output: isometric execution and measurement.
Main results #
Cslib.Quantum.UniformOracleCircuitFamily.exists_resource_bound: generation bounds exact encoded description length.Cslib.Quantum.UniformOracleCircuitFamily.exists_computable_resource_bound: a computable polynomial schedule bounds every allowed auxiliary length.
A query is encoded as the empty word; a gate is true followed by its phase-gate code,
including unary target/control indices. Instruction lists use encList encOracleGateCode.
Construct an elementary oracle instruction from a natively computed phase-gate code.
Inputs to the uniform circuit generator. The security parameter and classical input length are separate: distinct pairs with the same sum may generate different circuits.
Generator input encoding: the framed unary security parameter followed by the unary classical input length.
The tuple of the fields of encOracleInputSize.
A finite oracle-circuit description, including the input, output and query register sizes. The quantum input follows the encoded classical input; output and query registers are prefixes.
- width : ℕ
Total number of active qubits.
- queryWidth : ℕ
Number of qubits in the oracle argument.
- responseWidth : ℕ
Number of qubits in the XOR response accumulator.
- quantumInputWidth : ℕ
Number of supplied quantum input qubits.
- outputWidth : ℕ
Number of prefix qubits returned by terminal measurement.
- instructions : OracleCircuit
Elementary gates and oracle calls, in execution order.
Description encoding: width, query width, response width, quantum-input width and output width, each in framed unary, followed by the framed list encoding of the instructions.
The encoded description pays for all active qubits and every instruction, including a query whose own code is empty.
All declared registers fit and every instruction is valid. The classical input is
encPair encUnary encBits (n, x), of length 2 * n + 1 + x.length.
The encoded classical input and supplied quantum input fit without overlap.
The adjacent argument and response registers fit.
Every output bit is an active qubit.
- instructions (g : OracleGateCode) : g ∈ D.instructions → OracleGateCode.WellFormed D.queryWidth D.responseWidth D.width g
The total interpreter does not skip any instruction.
A native polynomial-time generator of valid oracle circuits. Its polynomial bound is in the unary security parameter and classical input length. Quantum inputs are supplied states; this structure does not certify their preparation, gate universality or interactive QROM access.
The complete circuit description for the security parameter and classical input length.
- computableInPolyTime_description : Turing.MultiTapeTM.ComputableInPolyTime (fun (s : OracleInputSize) => self.description s.securityParameter s.classicalInputLength) encOracleInputSize encOracleCircuitDescription
One native generator computes every size and every instruction.
- wellFormed (n ℓ : ℕ) : (self.description n ℓ).WellFormed { securityParameter := n, classicalInputLength := ℓ }
Validity for every input size.
Native generation bounds the exact encoded description length by one polynomial in the two input sizes. Register width and separate elementary/query counts are bounded by that length.
A polynomial bound on classical auxiliary lengths gives a native-computable polynomial schedule for the exact encoded description length of every shorter word. The length bound itself need not be computable.
Place a supplied quantum state after the encoded classical input (n, x), with zero
ancillas elsewhere. This is an isometric embedding, not an efficient preparation of that state.
Initialization embeds an arbitrary supplied state after the encoded classical input.
A basis quantum input is appended to the encoded classical input before the zero ancillas.
Execute the generated circuit with the same fixed oracle throughout. The resulting map
retains every active qubit; terminal measurement is specified separately by output.
Running the family uses the existing finite-circuit interpretation on its initialized state.
Running a generated family on a basis quantum input starts from the basis word formed by the encoded classical input followed by that quantum input.
Terminal computational-basis measurement of the generated output prefix, returned as a bit word. The supplied quantum input must be normalized.
The output law is exactly the existing computational-basis measurement and prefix readout.
On a basis quantum input, terminal output is the declared prefix measurement of the circuit started from the encoded classical word followed by that basis input.
Every supported output word has the declared output length.