ReflectAboutInteger operation
Warning
This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.
Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.
Namespace: Microsoft.Quantum.Arithmetic
Package: Microsoft.Quantum.Standard
Reflects a quantum register about a given classical integer.
operation ReflectAboutInteger (index : Int, reg : Microsoft.Quantum.Arithmetic.LittleEndian) : Unit is Adj + Ctl
Description
Given a quantum register initially in the state $\sum_i \alpha_i \ket{i}$, where each $\ket{i}$ is a basis state representing an integer $i$, reflects the state of the register about the basis state for a given integer $\ket{j}$, $$ \sum_i (-1)^{ \delta_{ij} } \alpha_i \ket{i} $$
Input
index : Int
The classical integer indexing the basis state about which to reflect.
reg : LittleEndian
Output : Unit
Remarks
This operation is implemented in-place, without explicit allocation of additional auxiliary qubits.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for