hybridlane.ops.qumode.QuadP¶
- class hybridlane.ops.qumode.QuadP(wires)¶
Bases:
pennylane.QuadP,hybridlane.ops.mixins.SpectralThe momentum quadrature observable \(\hat{p}\).
When used with the
expval()function, the momentum expectation value \(\braket{\hat{p}}\) is returned. This corresponds to the mean displacement in the phase space along the \(p\) axis.Details:
Number of wires: 1
Number of parameters: 0
Observable order: 1st order in the quadrature operators
Heisenberg representation:
\[d = [0, 0, 1]\]
- Parameters:
wires (Sequence[Any] or Any) – the wire the operation acts on
- natural_basis¶
- static compute_diagonalizing_gates(wires)¶
Sequence of gates that diagonalize the operator in the computational basis (static method).
Given the eigendecomposition \(O = U \Sigma U^{\dagger}\) where \(\Sigma\) is a diagonal matrix containing the eigenvalues, the sequence of diagonalizing gates implements the unitary \(U^{\dagger}\).
The diagonalizing gates rotate the state into the eigenbasis of the operator.
See also
diagonalizing_gates().- Parameters:
- Returns:
list of diagonalizing gates
- Return type:
list[.Operator]
- static compute_decomposition(*params, wires=None, **hyperparameters)¶
Representation of the operator as a product of other operators (static method).
\[O = O_1 O_2 \dots O_n.\]Note
Operations making up the decomposition should be queued within the
compute_decompositionmethod.See also
decomposition().- Parameters:
- Returns:
decomposition of the operator
- Return type:
list[Operator]
- __repr__()¶
Constructor-call-like representation.