qml.operation.CV¶
- class CV[source]¶
Bases:
object
A mixin base class denoting a continuous-variable operation.
Attributes
- supports_heisenberg = False¶
Methods
heisenberg_expand
(U, wire_order)Expand the given local Heisenberg-picture array into a full-system one.
- heisenberg_expand(U, wire_order)[source]¶
Expand the given local Heisenberg-picture array into a full-system one.
- Parameters
U (array[float]) – array to expand (expected to be of the dimension
1+2*self.num_wires
)wire_order (Wires) – global wire order defining which subspace the operator acts on
- Raises
ValueError – if the size of the input matrix is invalid or num_wires is incorrect
- Returns
expanded array, dimension
1+2*num_wires
- Return type
array[float]
code/api/pennylane.operation.CV
Download Python script
Download Notebook
View on GitHub