QODE 组装接口¶
oracq.algorithms.input_model.ode
Composable generator and physical vector inputs for autonomous linear ODEs.
- class oracq.algorithms.input_model.ode.ODELayout(size, components=(), max_words=4096)[源代码]¶
基类:
objectPhysical components at consecutive addresses, with optional names and zero padding.
- size¶
- components = ()¶
- max_words = 4096¶
- property width¶
The target register width, including the scalar case.
- class oracq.algorithms.input_model.ode.PreparedGenerator(encoding, qrams=())[源代码]¶
基类:
objectA generator block encoding and its immutable execution memory banks.
- encoding¶
- qrams = ()¶
- class oracq.algorithms.input_model.ode.GeneratorInput(*args, **kwargs)[源代码]¶
基类:
ProtocolAn operator source resolved against the physical ODE vector layout.
- property size¶
Declared physical dimension of the generator's target vector.
- class oracq.algorithms.input_model.ode.OracleGeneratorInput(encoding, size, qrams=())[源代码]¶
基类:
objectAn existing block-encoding provider with a declared physical dimension.
- encoding¶
- size¶
- qrams = ()¶
- class oracq.algorithms.input_model.ode.QRAMMatrixConfig(size, value_scale=1.0, offset=0)[源代码]¶
基类:
objectReal matrix angles at
offset + row*2**width + column.A word represents
value_scale*cos(pi*word/2**word_length). Absent words are zero words, representing positivevalue_scalerather than zero matrix entries.encode_matrixexplicitly fills all padding.- size¶
- value_scale = 1.0¶
- offset = 0¶
- class oracq.algorithms.input_model.ode.QRAMMatrixInput(qram, config)[源代码]¶
基类:
objectCoherent real generator matrix access through a registered angle bank.
- qram¶
- config¶
- property size¶
Physical generator dimension.
- class oracq.algorithms.input_model.ode.MatrixInput(values, encoding='gates', angle_width=16, value_scale=1.0)[源代码]¶
基类:
objectFinite generator matrix, encoded with small Pauli gates or real QRAM angles.
Gate expansion supports at most five target bits. QRAM preparation still stores the supplied dense matrix; it does not imply a sparse-access speedup.
- values¶
- encoding = 'gates'¶
- angle_width = 16¶
- value_scale = 1.0¶
- property size¶
Physical matrix dimension before register padding.
- oracq.algorithms.input_model.ode.physical_generator(encoding, layout)[源代码]¶
Project padding on both sides, preventing paths through unused components.
- class oracq.algorithms.input_model.ode.ODEProblem(generator, initial=<factory>, final_time=1.0, components=(), dissipative=None, evidence='caller_declared_unverified')[源代码]¶
基类:
objectAutonomous homogeneous system u'=Gu with replaceable generator and initial inputs.
Dissipativity is an explicit caller declaration, checked by methods that require it. Source terms, time-dependent generators, and nonlinear systems require separate adaptations and are not implicitly frozen or discarded.
- generator¶
- initial¶
- final_time = 1.0¶
- components = ()¶
- dissipative = None¶
- evidence = 'caller_declared_unverified'¶
- property size¶
Physical vector dimension shared by generator, initial state, and readout.