:orphan: .. _example28-label: Kitaev's honeycomb Hamiltonian in vortex sectors given by the plaquette operators ---------------------------------------------------------------------------------------------------- This example shows how one can employ QuSpin's `user_basis` class to construct the Kitaev honeycomb model Hamiltonian in the spectral sectors generated by the Wilson loop operators W. The transformation generated by W cannot be defined using QuSpin's `basis_general` classes. Consider the `Kitaev honeycomb model `_ (see reference for details of the definition): .. math:: H_\mathrm{Kitaev} = \sum_{\langle i,j\rangle_\alpha}J^\alpha_{ij} \sigma^\alpha_i \sigma^\alpha_j. where :math:`\sigma` are the Pauli matrices, and we consider 4 unit cells (8 sites) with periodic boundary conditions. It can be shown that this Hamiltonian commutes with all Wilson loop plauqette operators, e.g., :math:`W=\sigma^x_0\sigma^y_1\sigma^z_2\sigma^x_3\sigma^y_4\sigma^z_5`, etc. Hence, the :math:`W`-operators generate a transformation according to which :math:`H_\mathrm{Kitaev}` can be block diagonalized; the corresponding sectors can be labelled by the eigenvalues of :math:`W` which take the values :math:`\pm 1`, and determine the vortex configuration of the states in a given sector. Here, we want to construct the Hamiltonian :math:`H_\mathrm{Kitaev}` in a given vortex configuration sector using QuSpin. It turns out, this cannot be achieved using the `basis_general` classes, because the operation induced by :math:`W` on the computational basis states cannot be represented by a combination of lattice sites permutations and spin inversion operations. Indeed, the operators :math:`\sigma^z_2, \sigma^z_5` multiply the resulting state by a state-dependent sign, while the operators :math:`\sigma^y_1, \sigma^y_4` multiply the resulting state by a state-dependent factor :math:`\pm i`. Notes: * the procedure described below is generic, and can be applied to any symmetry, provided that (in the basis chosen) the symmetry is represented by a **real-valued** operator. * the code below works only for 8 lattice sites with periodic boundary conditions; however, it should be clear how to generalize it to other system sizes. * this code shows an interesting example of using the `sign` pointer variable, inherent to the symmetry map function template of the `user_basis`, for **spin systems** [typically, `sign` is used to accomodate fermionic signs in fermionic models]. * there are two more Wilson loops that wrap around the two directions of the torus; we leave it to the reader to code them up. Please consult this tutorial post -- :ref:`user_basis-label` -- for more detailed explanations on using the `user_basis` class. Script ------ :download:`download script <../../../examples/scripts/example28.py>` .. literalinclude:: ../../../examples/scripts/example28.py :linenos: :language: python :lines: 1-