qrisp.quantum_backtracking.QuantumBacktrackingTree.estimate_phase#
- QuantumBacktrackingTree.estimate_phase(precision)[source]#
Performs
quantum phase estimation
on thequantum step operator
.If executed with sufficient precision, the phase estimation will yield a QuantumFloat, where the probability of the 0 component indicates the presence of a node where the
accept
function yieldedTrue
.If the probability is higher than 3/8 \(\Rightarrow\) A solution exists.
If the probability is less than 1/4 \(\Rightarrow\) No solution exists.
Otherwise \(\Rightarrow\) Increase precision.
In general, the required precision is proportional to
\[\frac{\text{log}_2(Tn)}{2} + \beta\]Where \(T\) is the amount of nodes, that would be visited by a classical algorithm, \(n\) is the maximum depth and \(\beta\) is a universal constant.
- Parameters:
- precisionint
The precision to perform the quantum phase estimation with.
- Returns:
- qpe_resQuantumFloat
The QuantumFloat containing the result of the phase estimation.