qp.labs.estimator_beta.qrom_state_preparation_resource_decomp¶
- qrom_state_preparation_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.
- 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. Controlled-RY (and phase shifts) gates are used to apply all of the rotations coherently.
- 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]