initial¶
oracq.algorithms.input_model.initial
Shared physical initial-state inputs for ODE and PDE methods.
- class oracq.algorithms.input_model.initial.InitialStateLayout(*args, **kwargs)[source]¶
Bases:
ProtocolPhysical vector size, register width, and bounded sample encoding.
- property size¶
Number of physical samples in the layout’s vector.
- property width¶
Address width in qubits indexing the physical samples.
- property max_words¶
Largest number of QRAM words the layout may use for padded samples.
- class oracq.algorithms.input_model.initial.PreparedInitial(preparation, norm, qrams=())[source]¶
Bases:
objectReversible amplitude preparation, physical norm, and memory snapshots.
- preparation¶
- norm¶
- qrams = ()¶
- class oracq.algorithms.input_model.initial.InitialInput(*args, **kwargs)[source]¶
Bases:
ProtocolAn initial-state source resolved against a method’s physical layout.
- class oracq.algorithms.input_model.initial.UniformInput(value=1.0)[source]¶
Bases:
objectA constant physical vector, independently of its layout implementation.
- value = 1.0¶
- class oracq.algorithms.input_model.initial.ArrayInput(values, encoding='gates', angle_width=16)[source]¶
Bases:
objectPhysical initial samples, using gates or nonnegative QRAM angle preparation.
- values¶
- encoding = 'gates'¶
- angle_width = 16¶
- class oracq.algorithms.input_model.initial.OracleInput(preparation, norm, qrams=())[source]¶
Bases:
objectAn existing preparation oracle with an explicit physical vector norm.
Signed/complex preparations and application-specific loaders can use this interface. Memory snapshots must use the oracle’s leaf resource names.
- preparation¶
- norm¶
- qrams = ()¶
- class oracq.algorithms.input_model.initial.QRAMInputConfig(state_width, norm, offset=0)[source]¶
Bases:
objectRotation-tree layout: node
2**depth-1+prefixplus a base offset.Words encode Ry angles in units of
2*pi/2**word_length. The physical norm is supplied separately; this is amplitude access, not raw value access.- state_width¶
- norm¶
- offset = 0¶