Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 8, 2024
1 parent 77600ef commit 7cb95e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/qibo/hamiltonians/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
from qibo.hamiltonians.hamiltonians import Hamiltonian, SymbolicHamiltonian, TrotterHamiltonian
from qibo.hamiltonians.hamiltonians import (
Hamiltonian,
SymbolicHamiltonian,
TrotterHamiltonian,
)
from qibo.hamiltonians.models import TFIM, XXX, XXZ, Heisenberg, MaxCut, X, Y, Z
6 changes: 3 additions & 3 deletions src/qibo/hamiltonians/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from functools import reduce
from typing import List, Tuple, Union
from typing import Union

import numpy as np

Expand Down Expand Up @@ -157,15 +157,15 @@ def Heisenberg(
\\end{align}
where :math:`\\{J_{x}, \\, J_{y}, \\, J_{z}\\}` are called the ``coupling constants``,
:math:`\\{h_{x}, \\, h_{y}, \\, h_{z}\\}` are called the ``external field strengths``,
:math:`\\{h_{x}, \\, h_{y}, \\, h_{z}\\}` are called the ``external field strengths``,
and :math:`\\{X, \\, Y, \\, Z\\}` are the usual Pauli operators.
Args:
nqubits (int): number of qubits.
coupling_constants (list or tuple or float or int): list or tuple with the
three coupling constants :math:`\\{J_{x}, J_{y}, J{z}\\}`.
If ``int`` or ``float``, then :math:`J_{x} = J_{y} = J_{z}`.
external_field_strength (list or tuple or float or int): list or tuple with the
external_field_strength (list or tuple or float or int): list or tuple with the
external magnetic field strengths :math:`\\{h_{x}, \\, h_{y}, \\, h_{z}\\}`.
If ``int`` or ``float``, then :math:`h_{x} = h_{y} = h_{z}`.
dense (bool, optional): If ``True``, creates the Hamiltonian as a
Expand Down

0 comments on commit 7cb95e2

Please sign in to comment.