Bases: sage.structure.list_clone.ClonableArray
A configuration in the six vertex model.
Check if self is a valid 6 vertex configuration.
EXAMPLES:
sage: M = SixVertexModel(3, boundary_conditions='ice')
sage: M[0].check()
Return the energy of the configuration.
The energy of a configuration is defined as
where is the number of vertices of type
and
is the
-th energy constant.
Note
We number our configurations as:
which differs from Wikipedia article Ice-type_model.
EXAMPLES:
sage: M = SixVertexModel(3, boundary_conditions='ice')
sage: nu = M[2]; nu
^ ^ ^
| | |
--> # -> # <- # <--
^ | ^
| V |
--> # <- # -> # <--
| ^ |
V | V
--> # -> # <- # <--
| | |
V V V
sage: nu.energy([1,2,1,2,1,2])
15
A KDP energy:
sage: nu.energy([1,1,0,1,0,1])
7
A Rys energy:
sage: nu.energy([0,1,1,0,1,1])
4
The zero field assumption:
sage: nu.energy([1,2,3,1,3,2])
15
Return a plot of self.
INPUT:
EXAMPLES:
sage: M = SixVertexModel(2, boundary_conditions='ice')
sage: print M[0].plot().description()
Arrow from (-1.0,0.0) to (0.0,0.0)
Arrow from (-1.0,1.0) to (0.0,1.0)
Arrow from (0.0,0.0) to (0.0,-1.0)
Arrow from (0.0,0.0) to (1.0,0.0)
Arrow from (0.0,1.0) to (0.0,0.0)
Arrow from (0.0,1.0) to (0.0,2.0)
Arrow from (1.0,0.0) to (1.0,-1.0)
Arrow from (1.0,0.0) to (1.0,1.0)
Arrow from (1.0,1.0) to (0.0,1.0)
Arrow from (1.0,1.0) to (1.0,2.0)
Arrow from (2.0,0.0) to (1.0,0.0)
Arrow from (2.0,1.0) to (1.0,1.0)
Return the signed matrix of self.
The signed matrix corresponding to a six vertex configuration is
given by if there is a cross flow, a
if the outward arrows
are vertical and
if the outward arrows are horizonal.
EXAMPLES:
sage: M = SixVertexModel(3, boundary_conditions='ice')
sage: map(lambda x: x.to_signed_matrix(), M)
[
[1 0 0] [1 0 0] [ 0 1 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
[0 1 0] [0 0 1] [ 1 -1 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
[0 0 1], [0 1 0], [ 0 1 0], [0 0 1], [1 0 0], [0 1 0], [1 0 0]
]
Bases: sage.structure.parent.Parent, sage.structure.unique_representation.UniqueRepresentation
The six vertex model.
We model a configuration by indicating which configuration by the following six configurations which are determined by the two outgoing arrows in the Up, Right, Down, Left directions:
LR:
|
V
<-- # -->
^
|
LU:
^
|
<-- # <--
^
|
LD:
|
V
<-- # <--
|
V
UD:
^
|
--> # <--
|
V
UR:
^
|
--> # -->
^
|
RD:
|
V
--> # -->
|
V
INPUT:
n – the number of rows
m – (optional) the number of columns, if not specified, then the number of columns is the number of rows
boundary_conditions – (optional) a quadruple of tuples whose entries are either:
There are also the following predefined boundary conditions:
EXAMPLES:
Here are the six types of vertices that can be created:
sage: M = SixVertexModel(1)
sage: list(M)
[
| ^ | ^ ^ |
V | V | | V
<-- # --> <-- # <-- <-- # <-- --> # <-- --> # --> --> # -->
^ ^ | | ^ |
| , | , V , V , | , V
]
When using the square ice model, it is known that the number of configurations is equal to the number of alternating sign matrices:
sage: M = SixVertexModel(1, boundary_conditions='ice')
sage: len(M)
1
sage: M = SixVertexModel(4, boundary_conditions='ice')
sage: len(M)
42
sage: all(len(SixVertexModel(n, boundary_conditions='ice'))
....: == AlternatingSignMatrices(n).cardinality() for n in range(1, 7))
True
An example with a specified non-standard boundary condition and non-rectangular shape:
sage: M = SixVertexModel(2, 1, [[None], [True,True], [None], [None,None]])
sage: list(M)
[
^ ^ | ^
| | V |
<-- # <-- <-- # <-- <-- # <-- --> # <--
^ ^ | |
| | V V
<-- # <-- --> # <-- <-- # <-- <-- # <--
^ | | |
| , V , V , V
]
REFERENCES:
alias of SixVertexConfiguration
Return the boundary conditions of self.
EXAMPLES:
sage: M = SixVertexModel(2, boundary_conditions='ice')
sage: M.boundary_conditions()
((False, False), (True, True), (False, False), (True, True))
Return the partition function of self.
The partition function of a 6 vertex model is defined by:
where we sum over all configurations and is the energy function.
The constant
is known as the inverse temperature and is
equal to
where
is Boltzmann’s constant and
is
the system’s temperature.
INPUT:
EXAMPLES:
sage: M = SixVertexModel(3, boundary_conditions='ice')
sage: M.partition_function(2, [1,2,1,2,1,2])
e^(-24) + 2*e^(-28) + e^(-30) + 2*e^(-32) + e^(-36)
REFERENCES:
Wikipedia article Partition_function_(statistical_mechanics)
Bases: sage.combinat.six_vertex_model.SixVertexModel
The square ice model.
The square ice model is a 6 vertex model on an grid with
the boundary conditions that the top and bottom boundaries are pointing
outward and the left and right boundaries are pointing inward. These
boundary conditions are also called domain wall boundary conditions.
Configurations of the 6 vertex model with domain wall boundary conditions are in bijection with alternating sign matrices.
Bases: sage.combinat.six_vertex_model.SixVertexConfiguration
An element in the square ice model.
Return an alternating sign matrix of self.
See also
EXAMPLES:
sage: M = SixVertexModel(4, boundary_conditions='ice')
sage: M[6].to_alternating_sign_matrix()
[1 0 0 0]
[0 0 0 1]
[0 0 1 0]
[0 1 0 0]
sage: M[7].to_alternating_sign_matrix()
[ 0 1 0 0]
[ 1 -1 1 0]
[ 0 1 -1 1]
[ 0 0 1 0]
Return a configuration from the alternating sign matrix asm.
EXAMPLES:
sage: M = SixVertexModel(3, boundary_conditions='ice')
sage: asm = AlternatingSignMatrix([[0,1,0],[1,-1,1],[0,1,0]])
sage: M.from_alternating_sign_matrix(asm)
^ ^ ^
| | |
--> # -> # <- # <--
^ | ^
| V |
--> # <- # -> # <--
| ^ |
V | V
--> # -> # <- # <--
| | |
V V V
TESTS:
sage: M = SixVertexModel(5, boundary_conditions='ice')
sage: ASM = AlternatingSignMatrices(5)
sage: all(M.from_alternating_sign_matrix(x.to_alternating_sign_matrix()) == x
....: for x in M)
True
sage: all(M.from_alternating_sign_matrix(x).to_alternating_sign_matrix() == x
....: for x in ASM)
True