As a trivial example, if the goal is to produce a vector of uniform entries we simply need to apply n Hadamard gates – a qubit-efficient state preparation time. This is in fact possible in some cases that exhibit a lot of structure. And indeed, the promises only hold if state preparation can also be done qubit-efficiently. Promises of exponential speedups from qubit-efficient quantum machine learning algorithms sound strange to machine learning practitioners because simply loading the NM features from the memory hardware takes time that is of course linear in NM. If the quantum machine learning algorithm is polynomial in n (or qubit-efficient), it has a logarithmic runtime dependency on the data set size. The main advantage of amplitude encoding is that we only need n=logNM qubits to encode a dataset of M inputs with N features each.
By expressing that the wavefunction is used to encode data, it is therefore implied that amplitudes of the quantum system are used to represent data values.Īmplitude encoding is required by many quantum machine learning algorithms. In the amplitude-embedding technique, every quantum system is described by its wavefunction ψ which also defines the measurement probabilities. The vector corresponds to a binary sequence b = 00001 11011 01111 and can be represented by the quantum state. To encode a vector x = (0.1, −0.7, 1.0) in basis encoding, we have to first translate it into a binary sequence, where we choose a binary fraction representation with precision τ = 4 and the first bit encoding the sign,
In principle, each operation on bits that we can execute on a classical computer can be done on a quantum computer as well.Įxample: Let us choose a binary fraction representation, where each number in the interval [0, 1) is represented by a τ -bit string according to. Acting on binary features encoded as qubits gives us the most computational freedom to design quantum algorithms. Hence, one bit of classical information is represented by one quantum subsystem. The embedded quantum state is the bit-wise translation of a binary string to the corresponding states of the quantum subsystems. Such an encoding represents real numbers as binary numbers and then transforms them into a quantum state in the computational basis. Basis Encodingīasis encoding is primarily used when real numbers have to be mathematically manipulated in the course of quantum algorithms. Some of the embedding techniques used are basis embedding, amplitude embedding, and many more. The power of a quantum classifier translates into the ability to find embeddings that maximize the distance between data clusters in Hilbert space. Quantum embedding represents classical data as quantum states in a Hilbert space via a quantum feature map. One of the ways data is encoded is by using quantum embedding. Also, quantum encoding is notoriously difficult because the laws of quantum mechanics impose severe constraints - for example, a single quantum object cannot be copied, which hinders simple encoding schemes Each encoding is essentially a trade-off between two major forces: (i) the number of required qubits and (ii) the runtime complexity for the loading process. To encode even a large number of data values efficiently, a logarithmic or linear runtime is ideal. The number of operations to prepare the quantum state must be small as qubits decay fast and quantum gates are error-prone.
Current devices contain a limited amount of qubits that are stable for a short amount of time. This is critical because quantum algorithms that promise a speed-up assume that loading data can be done faster, in logarithmic or linear time.Įncoding data in qubits is not trivial. In the worst case, loading requires exponential time. Both the data itself and the chosen encoding influence the runtime of the loading process. Each algorithm expects that a certain data encoding is used, and then processes the data by performing calculations. To load data, it must be encoded in qubits. One must load data for execution for any algorithm that processes input data. Empowered by superposition, quantum entanglement and interference quantum computers have capabilities to solve certain problems faster than conventional computers through various quantum algorithms. Qubits can be 0, 1, or in both of these two states at once(superposition). However, advances in quantum computing have led to the development of quantum computers that use qubits(quantum bits) instead of bits. For decades, the bit has been the fundamental unit for information science. Encoding information for storage or transmission is one of the fundamental tasks of information theory.