Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

New operation: AmplitudeTransduction #515

Open
vivienlonde opened this issue Jan 27, 2022 · 0 comments
Open

New operation: AmplitudeTransduction #515

vivienlonde opened this issue Jan 27, 2022 · 0 comments
Labels
Area-API Issue concerns the API design of a library, such as style guide or design principles adherence. Kind-Enhancement New feature or request Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package. tracking This label will trigger gh-sync to create or update a mirror internal ADO issue.

Comments

@vivienlonde
Copy link

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.

@vivienlonde vivienlonde added Kind-Enhancement New feature or request Status-NeedsApiReview This PR requires an API review before merging in. labels Jan 27, 2022
@msoeken msoeken added Area-API Issue concerns the API design of a library, such as style guide or design principles adherence. Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package. labels Jan 27, 2022
@msoeken msoeken added this to Ready to be reviewed in API Review Scheduling Feb 23, 2022
@msoeken msoeken added the tracking This label will trigger gh-sync to create or update a mirror internal ADO issue. label Apr 4, 2022
@msoeken msoeken moved this from Ready to be reviewed to Reviewed: approved in API Review Scheduling Apr 4, 2022
@msoeken msoeken removed the Status-NeedsApiReview This PR requires an API review before merging in. label Apr 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-API Issue concerns the API design of a library, such as style guide or design principles adherence. Kind-Enhancement New feature or request Pkg-Standard Issue relates to the Microsoft.Quantum.Standard package. tracking This label will trigger gh-sync to create or update a mirror internal ADO issue.
Projects
API Review Scheduling
Reviewed: approved
Development

No branches or pull requests

2 participants