Skip to main content

heisenberg_2qubit_unitary

heisenberg_2qubit_unitary(const Function<real(real)> J_x, const Function<real(real)> J_y, const Function<real(real)> J_z, real t_start, real t_end, integer substeps) -> ComplexMatrix

Compute the 2-qubit Heisenberg unitary evolution.

Solves the time-dependent Schrödinger equation for two coupled spins under an isotropic Heisenberg Hamiltonian H(t) = J_x(t) σ_0^x σ_1^x + J_y(t) σ_0^y σ_1^y + J_z(t) σ_0^z σ_1^z. Uses piecewise-constant Trotter decomposition with the specified number of substeps. Each substep applies exp(-i H dt) using matrix exponential.

Parameters

  • J_x: Function J_x(t) giving the x-coupling strength at time t
  • J_y: Function J_y(t) giving the y-coupling strength at time t
  • J_z: Function J_z(t) giving the z-coupling strength at time t
  • t_start: Start time for the evolution
  • t_end: End time for the evolution
  • substeps: Number of time steps (substeps)

Returns

4×4 unitary matrix in complex doubles