qp.labs.estimator_beta.qrom_state_preparation_phase_grad_resource_decomp¶
- qrom_state_preparation_phase_grad_resource_decomp(num_state_qubits, positive_and_real, precision=None, selswap_depths=1)[source]¶
Returns a list representing the resources of the operator. Each object in the list represents a gate and the number of times it occurs in the circuit.
Note
This decomposition assumes an appropriately sized phase gradient state is available. Users should ensure the cost of constructing such a state has been accounted for. See also
PhaseGradient.- Parameters:
num_state_qubits (int) – number of qubits required to represent the state-vector
positive_and_real (bool) – Flag that the coefficients of the statevector are all real and positive.
precision (float) – The precision threshold for loading in the binary representation of the rotation angles.
selswap_depths (int | Iterable(int) | None) – A parameter of
QROMused to trade-off extra qubits for reduced circuit depth.
- Resources:
The resources for QROMStatePreparation are according to the decomposition as described in arXiv:0208112, using
LabsQROMto dynamically load the rotation angles. These rotations gates are implemented using an inplace controlled-adder operation (see Figure 4. of arXiv:2409.07332) to phase gradient.
- Returns:
A list of
GateCountobjects, where each object represents a specific quantum gate and the number of times it appears in the decomposition.- Return type:
list[
GateCount]