Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Davison, Jacob
tfimsrg
Commits
9665e0d0
Commit
9665e0d0
authored
Aug 07, 2019
by
Davison
Browse files
changed library import
parent
1d151c4e
Changes
8
Hide whitespace changes
Inline
Side-by-side
oop_imsrg/__pycache__/flow.cpython-37.pyc
View file @
9665e0d0
No preview for this file type
oop_imsrg/__pycache__/generator.cpython-37.pyc
View file @
9665e0d0
No preview for this file type
oop_imsrg/__pycache__/hamiltonian.cpython-37.pyc
View file @
9665e0d0
No preview for this file type
oop_imsrg/__pycache__/occupation_tensors.cpython-37.pyc
View file @
9665e0d0
No preview for this file type
oop_imsrg/flow.py
View file @
9665e0d0
import
tensorflow
as
tf
# tf.enable_v2_behavior()
from
tensornetwork
import
*
import
numpy
as
np
from
oop_imsrg.hamiltonian
import
*
...
...
oop_imsrg/generator.py
View file @
9665e0d0
import
tensorflow
as
tf
# tf.enable_v2_behavior()
from
tensornetwork
import
*
import
numpy
as
np
from
oop_imsrg.hamiltonian
import
*
...
...
@@ -313,8 +315,8 @@ class WegnerGenerator3B(WegnerGenerator):
# Calculate 2B generator
# fourth term
sum4_2b_1
=
np
.
matmul
(
-
1
*
np
.
transpose
(
occA2
),
fod
)
sum4_2b_2
=
np
.
matmul
(
-
1
*
np
.
transpose
(
occA2
),
fd
)
sum4_2b_1
=
np
.
matmul
(
-
1
.0
*
np
.
transpose
(
occA2
),
fod
)
sum4_2b_2
=
np
.
matmul
(
-
1
.0
*
np
.
transpose
(
occA2
),
fd
)
sum4_2b_3
=
ncon
([
Wd
,
sum4_2b_1
],
[(
0
,
-
1
,
-
2
,
1
,
-
3
,
-
4
),
(
1
,
0
)]).
numpy
()
sum4_2b_4
=
ncon
([
Wod
,
sum4_2b_2
],
[(
0
,
-
1
,
-
2
,
1
,
-
3
,
-
4
),
(
1
,
0
)]).
numpy
()
sum4_2b
=
sum4_2b_3
-
sum4_2b_4
...
...
@@ -337,7 +339,7 @@ class WegnerGenerator3B(WegnerGenerator):
sum6_2b
=
sum6_2b_3
-
sum6_2b_4
#seventh term
sum7_2b_1
=
ncon
([
occI
,
Wod
],
[(
-
1
,
-
2
,
-
3
,
-
4
,
0
,
1
,
2
,
3
,
4
),
(
3
,
4
,
-
5
,
0
,
1
,
-
6
)]).
numpy
()
sum7_2b_1
=
ncon
([
occI
,
Wod
],
[(
-
1
,
-
2
,
-
3
,
-
4
,
0
,
1
,
2
,
3
),
(
2
,
3
,
-
5
,
0
,
1
,
-
6
)]).
numpy
()
sum7_2b_2
=
ncon
([
Wd
,
sum7_2b_1
],
[(
0
,
1
,
-
1
,
2
,
3
,
-
4
),(
2
,
3
,
-
2
,
0
,
1
,
-
3
)]).
numpy
()
sum7_2b
=
sum7_2b_2
-
np
.
transpose
(
sum7_2b_2
,[
1
,
0
,
2
,
3
])
-
\
np
.
transpose
(
sum7_2b_2
,[
0
,
1
,
3
,
2
])
+
\
...
...
oop_imsrg/hamiltonian.py
View file @
9665e0d0
import
numpy
as
np
import
tensorflow
as
tf
# tf.enable_v2_behavior()
from
tensornetwork
import
*
class
Hamiltonian
(
object
):
...
...
oop_imsrg/occupation_tensors.py
View file @
9665e0d0
...
...
@@ -45,6 +45,7 @@ class OccupationTensors(object):
Returns:
occA2 -- represents n_a - n_b."""
return
self
.
_occA2
@
property
def
occB
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment