InputEncoder function

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.MachineLearning

Package: Microsoft.Quantum.MachineLearning

Given a set of coefficients and a tolerance, returns a state preparation operation that prepares each coefficient as the corresponding amplitude of a computational basis state.

function InputEncoder (coefficients : Double[]) : Microsoft.Quantum.MachineLearning.StateGenerator

Input

coefficients : Double[]

The coefficients to be encoded into an input state.

Output : StateGenerator

A state preparation operation that prepares the given coefficients as an input state on a given register.