qml.templates.embeddings¶

This module provides quantum circuit architectures that can embed classical data into a quantum state.

CV embeddings¶

 SqueezingEmbedding(features, wires[, method, c]) Encodes $$N$$ features into the squeezing amplitudes $$r \geq 0$$ or phases $$\phi \in [0, 2\pi)$$ of $$M$$ modes, where $$N\leq M$$. DisplacementEmbedding(features, wires[, …]) Encodes $$N$$ features into the displacement amplitudes $$r$$ or phases $$\phi$$ of $$M$$ modes,

Qubit embeddings¶

 AmplitudeEmbedding(features, wires[, pad, …]) Encodes $$2^n$$ features into the amplitude vector of $$n$$ qubits. AngleEmbedding(features, wires[, rotation]) Encodes $$N$$ features into the rotation angles of $$n$$ qubits, where $$N \leq n$$. BasisEmbedding(features, wires) Encodes $$n$$ binary features into a basis state of $$n$$ qubits.

Note

To make the signature of templates resemble other quantum operations used in quantum circuits, we treat them as classes here, even though technically they are functions.