AngleEmbedding(features, wires, rotation='X')[source]

Encodes \(N\) features into the rotation angles of \(n\) qubits, where \(N \leq n\).

The rotations can be chosen as either RX, RY or RZ gates, as defined by the rotation parameter:

  • rotation='X' uses the features as angles of RX rotations

  • rotation='Y' uses the features as angles of RY rotations

  • rotation='Z' uses the features as angles of RZ rotations

The length of features has to be smaller or equal to the number of qubits. If there are fewer entries in features than rotations, the circuit does not apply the remaining rotation gates.

  • features (array) – input array of shape (N,), where N is the number of input features to embed, with \(N\leq n\)

  • wires (Iterable or Wires) – Wires that the template acts on. Accepts an iterable of numbers or strings, or a Wires object.

  • rotation (str) – Type of rotations used


ValueError – if inputs do not have the correct format