Skip to main content

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: exp(i(π4X(i)X(j)+π4Y(i)Y(j)+JzZ(i)Z(j)))\exp(i(\frac{\pi}{4} X(i) X(j) + \frac{\pi}{4} Y(i) Y(j) + J_z Z(i) Z(j))) where i,ji, j 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(Jx,Jy,Jz)=exp(i(JxX(i)+JyY(i)+JzZ(i))Z(j))(J_x, J_y, J_z) = \exp(-i(J_x X(i) + J_y Y(i) + J_z Z(i)) Z(j)) where i,ji, j 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 P(ϕ)=eiϕP(\phi) = e^{-i\phi}.

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(ϕ,θ,ω)=RZ(ω)RX(θ)RZ(ϕ)=e(iωZ/2)e(iθX/2)e(iϕZ/2)(\phi,\theta,\omega) = RZ(\omega)RX(\theta)RZ(\phi) = e^{(-i \omega Z/2)} e^{(-i \theta X/2)} e^{(-i \phi Z/2)}.

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(ϕ)=eiϕX/2(\phi) = e^{-i\phi X/2} 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(ϕ)=eiϕY/2(\phi) = e^{-i\phi Y/2} 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(ϕ)=eiϕZ/2(\phi) = e^{-i\phi Z/2} 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(Jx,Jy,Jz)(J_x, J_y, J_z) operator: exp(i(JxX(i)X(j)+JyY(i)Y(j)+JzZ(i)Z(j)))\exp(-i(J_x X(i) X(j) + J_y Y(i) Y(j) + J_z Z(i) Z(j))) where i,ji, j 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

NameDescription
=Assignment operator for OperatorParam.