New operation: AmplitudeTransduction
Amplitude Transduction
Conceptual overview
Amplitude transduction applies an operation that encodes in amplitude the (square root of) values that a DigitalOracle computes in superposition in a register. DigitalOracle is an input to amplitude transduction. See Black-box quantum state preparation without arithmetic. As a state preparation technique from a quantum digital oracle, amplitude transduction is useful in many use cases such as quantum walks, LCU, linear systems solving, ...
Current status
This primitive is not implemented in Q# yet.
User feedback
I need amplitude transduction for a quantum walk project and therefore tried to implement it. See AmplitudeTransduction.qs.
Proposal
New and modified functions, operations, and UDTs
See AmplitudeTransduction.qs for the Q# code. Here are signatures of operations and comments:
namespace AmplitudeTransduction {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Arithmetic;
open Microsoft.Quantum.AmplitudeAmplification;
open Microsoft.Quantum.Oracles;
open Microsoft.Quantum.Convert;
open Microsoft.Quantum.Math;
/// # Summary
/// Amplitude transduction from a digital oracle.
/// This version of amplitude transduction outputs amplitudes equal to the square root of the values that the digital oracle computes.
///
/// # Input
/// ## outRegister
/// The digital oracle computes $2^{Length(outRegister)}$ real positive numbers $\alpha_i$ in superposition and writes them in the dataRegister.
/// ## lengthDataRegister
/// Precision of amplitudes is $2^{-\text{lengthDataRegister}}$.
/// ## DigitalOracle
/// For state |i> of outRegister, adds $\alpha_i$ to the dataRegister.
///
/// # References
/// See [ *Y.R. Sanders, G.H. Low, A. Scherer, D.W. Berry* ](https://arxiv.org/pdf/1807.03206v2.pdf)
operation AmplitudeTransduction (
outRegister : Qubit[],
lengthDataRegister : Int,
DigitalOracle : (Qubit[], Qubit[]) => Unit is Ctl + Adj
) : Unit is Ctl + Adj {
// ..
}
/// # Summary
/// Partially applies amplitude transduction in the subspace flagged by $\ket{1}_{\text{flag}}$.
///
internal operation PartialStatePreparation (
flagIndex : Int,
register : Qubit[],
lengthOutRegister : Int,
lengthDataRegister : Int,
DigitalOracle : (Qubit[], Qubit[]) => Unit is Ctl + Adj
) : Unit is Ctl + Adj {
// ..
}
/// # Summary
/// When dataRegister is in state $\ket{L}$,
/// $\text{Unif}^{\dagger}$ sends the amplitude of $\ket{i}_{\text{referenceRegister}}$ for $i \in \{0, \cdots, L-1$ on $\ket{0}_{\text{referenceRegister}}$.
///
internal operation Unif(
dataRegister : Qubit[],
referenceRegister : Qubit[]
) : Unit is Ctl + Adj {
// ..
}
/// # Summary
/// Partially applies $\text{Unif}$ in the subspace flagged by $\ket{1}_{\text{auxiliary}}$.
///
internal operation UnifPrime(
auxiliaryIndex : Int,
register : Qubit[],
lengthDataRegister : Int
) : Unit is Adj + Ctl {
// ..
}
}
Modifications to style guide
n / a
Impact of breaking changes
n / a
Examples
See QuantumWalkBurgers.
Relationship to Q# language feature proposals
n / a
Alternatives considered
n / a
Open design questions and considerations
At the end of some operations, some auxiliary qubits are epsilon close to |0> but different from |0>. Resetting these qubits to |0> would make the operation not adjointable and not controllable. Manually writing the adjoint and the controlled version of such operations could solve this issue.