![]() Returns the frequencies for each operator parameter with respect to an expectation value of the form \(\langle \psi | U(\mathbf > op2. Number of trainable parameters that the operator depends on. Number of dimensions per trainable parameter of the operator. This property determines if an operator is hermitian. Integer hash that uniquely represents the operator.ĭictionary of non-trainable variables that this operation depends on.Ĭustom string to label a specific operator instance. Gradient recipe for the parameter-shift method. The basis of an operation, or for controlled gates, of the target operation.īatch size of the operator if it is used with broadcasted parameters. Holdover from when in-place inversion changed then name. ![]() ![]() Likewise, using the default pattern, the entangler block applies the product of the first and secondįeature to the wire pair, the product of the second and third feature to, and so The second feature to wire 0, and the third feature to wire 1. In principle, the user can also pass a non-consecutive wire list to the template.įor single qubit gates, the i’th feature is applied to the i’th wire index (which may not be the i’th wire).įor the entanglers, the product of i’th and j’th features is applied to the wire indices at the i’th and j’thįor example, for wires= the RZ block applies the first feature to wire 2, IQPEmbedding ( features, wires = range ( 3 ), pattern = pattern, n_repeats = 3 ) return res1 = circuit (, pattern = pattern1 ) res2 = circuit (, pattern = pattern2 ) assert np. qnode ( dev ) def circuit ( features, pattern ): qml. From pennylane import numpy as np pattern1 =, , ] pattern2 =, , ] # a reshuffling of pattern1.
0 Comments
Leave a Reply. |