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
"""Solve the 3D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
from pylab import * | |
# The total number of nodes | |
nodx = 3 |
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
import networkx as nx | |
import matplotlib as mat | |
import matplotlib.pyplot as plt | |
import numpy as np | |
# Colors each node in the given graph based on the data | |
# Set provided | |
def color_graph(graph, d, cmap): | |
col_graph = nx.Graph() | |
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
"""Solve the 1D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
# The total number of nodes | |
nodx = 3 | |
nody = 3 |
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
from numpy import * | |
from matplotlib.pyplot import * | |
from time import sleep | |
import numpy as np | |
import networkx as nx | |
dim = [3,2] |
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
from sympy.physics.quantum import * | |
from sympy.physics.cartesian import * | |
from sympy.physics.piab import * | |
from sympy.physics.spin import * | |
# Basic manipulations with operators, bras, kets and commutators | |
psi, phi = Ket('psi'), Ket('phi') | |
psi, phi | |
A, B, C = Operator('A'), Operator('B'), Operator('C') |