-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compute conductivity for different chain lengths
- Loading branch information
1 parent
60f01d1
commit d53e520
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
class ConductivityLongChain(object): | ||
""" | ||
Computes chain conductivity for chains of different lengths | ||
""" | ||
def __init__(self, max_chain_len = 3): | ||
self.max_chain_len = max_chain_len | ||
self.lengths = range(2, self.max_chain_len + 1) | ||
|
||
def ComputeTimeEvolution(self): | ||
""" | ||
Computes time evolution and conductivity for each chain length | ||
""" | ||
self.num_list = [] | ||
|
||
for n in self.lengths: | ||
space = Space(chain_len = n) | ||
num = NumericalComputation(space) | ||
num.ComputeTimeEvolution() | ||
self.num_list.append(num) | ||
|
||
self.conductivity = [num.Conductivity() for num in num_list] | ||
|
||
def PlotConductivity(self): | ||
""" | ||
Returns line plot of chain conductivity | ||
""" | ||
l = zip(self.lengths, self.conductivity) | ||
legend_label = r'$\langle\rho_{1,1}^{\rm sink}\rangle$' | ||
labelx = r'$n$' | ||
labely = r'$C$' | ||
|
||
plot_object = line(l, | ||
ymin = 0, | ||
ymax = 1, | ||
xmin = 0, | ||
color = 'red', | ||
tick_formatter = 'latex', | ||
axes_labels = [labelx, labely], | ||
legend_label = legend_label) | ||
|
||
plot_object.set_legend_options(back_color = 'white') | ||
|
||
return plot_object | ||
|
||
def ShowConductivity(self): | ||
""" | ||
Shows line plot of chain conductivity | ||
""" | ||
html('<h2>Chain conductivity</h2>') | ||
show(self.PlotConductivity()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div style = "color:white;background-color:green"> | ||
<h1>Lindblad evolution of JCH model with sink</h1> | ||
</div> | ||
|
||
{{{ | ||
load('main.sage') | ||
}}} | ||
|
||
<div style = "color:white;background-color:green"> | ||
<h2>Chain conductivity analysis for long chains</h2> | ||
</div> | ||
|
||
{{{ | ||
con = ConductivityLongChain(max_chain_len = 4) | ||
}}} | ||
|
||
{{{ | ||
%time | ||
con.ComputeTimeEvolution() | ||
}}} | ||
|
||
{{{ | ||
con.ShowConductivity() | ||
}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters