OperatorParam<real>
Represents a parametrized spin-1/2 operator with rotation angles or phase parameters. Create instances using factory functions like Phase(), RotX(), RotY(), RotZ(), RotEuler(), etc.
Factories
DualUnitary(real J, const List<integer> sites) -> OperatorParam<real>
Returns a spin-1/2 dual unitary operator: where are the site indices.
Parameters
- J: The Jz constant parameter.
- sites: Vector of two site indices where the operator acts.
Example
var dual_u = DualUnitary(0.25, [0, 1]) // Dual unitary with Jz=0.25
Floquet(const List<real> Js, const List<integer> sites) -> OperatorParam<real>
Returns a spin-1/2 Floquet where are the site indices corresponding to the first and second elements of sites.
Parameters
- Js: Vector of exactly three parameters
[Jx, Jy, Jz]. - sites: Vector of two site indices where the operator acts.
Example
var flqt = Floquet([0.2, 0.3, 0.8], [1, 2]) // Floquet operator
Phase(real phi) -> OperatorParam<real>
Returns a global phase spin-1/2 operator .
Parameters
- phi: The phase angle.
Example
var ps = Phase(3.14159) // π phase
RotEuler(real phi, real theta, real omega, integer site) -> OperatorParam<real>
Returns a general spin-1/2 rotation operator RotEuler.
Parameters
- phi: The first rotation angle.
- theta: The second rotation angle.
- omega: The third rotation angle.
- site: The site index where the operator acts.
Example
var rot0 = RotEuler(1.57, 0.78, 3.14, 0) // General rotation on site 0
RotX(real phi, integer site) -> OperatorParam<real>
Returns a spin-1/2 RotX rotation operator around the X-axis.
Parameters
- phi: The rotation angle.
- site: The site index where the operator acts.
Example
var rx_half = RotX(1.5708, 0) // π/2 rotation on site 0
RotY(real phi, integer site) -> OperatorParam<real>
Returns a spin-1/2 RotY rotation operator around the Y-axis.
Parameters
- phi: The rotation angle.
- site: The site index where the operator acts.
Example
var ry_quarter = RotY(0.7854, 1) // π/4 rotation on site 1
RotZ(real phi, integer site) -> OperatorParam<real>
Returns a spin-1/2 RotZ rotation operator around the Z-axis.
Parameters
- phi: The rotation angle.
- site: The site index where the operator acts.
Example
var rz_full = RotZ(6.28318, 2) // 2π rotation on site 2
UnitaryXYZ(const List<real> Js, const List<integer> sites) -> OperatorParam<real>
Returns a spin-1/2 UnitaryXYZ operator: where are the site indices.
Parameters
- Js: Vector of exactly three parameters: [Jx, Jy, Jz].
- sites: Vector of exactly two site indices where the operator acts.
Example
var xyz01 = UnitaryXYZ([0.5, 1.0, 1.5], [0, 1]) // coupling between sites 0 and 1
Symbols
| Name | Description |
|---|---|
= | Assignment operator for OperatorParam. |