Extended Quantum Computing Patterns
Intent
Distinguish the important aspects of a state in an efficient manner
Context
In an iterative algorithm wherein each iteration the solution shall be improved, the parts of the computational basis improving the solution should be indicated. One possible indication is a phase shift.
Forces
–
Solution
According to (Rieffel and Polak 2014) the subsequent operator \(S_G^\phi\) can be implemented efficiently regarding the number of applied gates:
This operator marks the qubits which are improving the solution (and, thus, are in the ``good'' subset \(G \subseteq \{0, ..., N - 1\})\) by a phase shift with a phase \(\phi\), while leaving the remaining qubits untouched.
Result
A phase shift of some states in \(G\) cannot be detected by measurement, since the amplitudes of the states do not change.
But the phase-shifted states can be used for further computations to increase the probability to measure a "good" solution. Since only the phase and not the measurable amplitude of the states is changed, this operation has no classical equivalent.
Examples
–
Related Patterns
For a specific indicator function \(f\) specifying a set of "good" states in \(G\), a Function Table based on this indicator function is a phase shift. To perform an Amplitude Amplification, two phase shifts are needed. A phase shift can be used as an Oracle.
Known Uses
For example, in the prominent algorithms of Grover and Deutsch-Jozsa, a phase shift is used.
Grover's Algorithm (PlanQK) Dürr-Høyer Quantum Minimization Algorithm (PlanQK) Quantum approximate optimization algorithm (PlanQK)
Variants
Another variant of this solution is to modify the operator such that it applies a phase shift on the qubits in \(G\) with a different phase, i.e. \(\phi = \phi (x)\).