コード例 #1
0
ファイル: O_ccav.py プロジェクト: norikcentaure/holder
k  = sqa.index('Ck',  [tag_core],    withC)
l  = sqa.index('Cl',  [tag_core],    withC)
p  = sqa.index('Ap',  [tag_active],  withC)
q  = sqa.index('Aq',  [tag_active],  withC)
a  = sqa.index('Va',  [tag_virtual], withC)
b  = sqa.index('Vb',  [tag_virtual], withC)

x1 = sqa.index('Au',  [tag_active],  True)
x2 = sqa.index('Av',  [tag_active],  True)
i1 = sqa.index('Cm',  [tag_core],    True)
i2 = sqa.index('Cn',  [tag_core],    True)
a1 = sqa.index('Vg',  [tag_virtual], True)
a2 = sqa.index('Vh',  [tag_virtual], True)

# Define symmetry classes
hsym   = sqa.symmetry((1,0), 1)
Dsym_a = sqa.symmetry((2,1, 0,3), 1)
Dsym_b = sqa.symmetry((0,3, 2,1), 1)
Dsym_c = sqa.symmetry((1,0, 3,2), 1)

# Define tensors
deltaC = sqa.tensor('deltac', [i1,i2], [hsym])
deltaA = sqa.tensor('deltaa', [x1,x2], [hsym])
deltaV = sqa.tensor('deltav', [a1,a2], [hsym])

# Define the normal-ordered overlap
Cin  = sqa.tensor('V', [i,j,p,a], [])
Cout = sqa.tensor('b', [k,l,q,b], [])
if (withC):
  Op1 = sqa.term( 1.0, [''],  [Cin,  sqa.sfExOp([p, i]) , sqa.sfExOp([a, j])])
  Op2 = sqa.term( 1.0, [''],  [Cout, sqa.sfExOp([l, b]) , sqa.sfExOp([k, q])])
コード例 #2
0
import secondQuantizationAlgebra as sqa

sqa.options.verbose = False
# definitions

tag_core    = sqa.options.core_type
tag_active  = sqa.options.active_type
tag_virtual = sqa.options.virtual_type

k = sqa.index('Ak', [tag_active],  True)
l = sqa.index('Al', [tag_active],  True)
m = sqa.index('Am', [tag_active], True)
c = sqa.index('Vc', [tag_virtual], True)

hsym   = sqa.symmetry((1,0), 1)
Dsym_a = sqa.symmetry((2,1, 0,3), 1)
Dsym_b = sqa.symmetry((0,3, 2,1), 1)
Dsym_c = sqa.symmetry((1,0, 3,2), 1)
Tsym   = sqa.symmetry((0,1, 2,3), 1)

E_cmlk = [sqa.sfExOp([c, m, l, k])]
T_klmc = [sqa.tensor('T2', [k, l, m, c], [Tsym])]

print ""
print "Evaluation of the IC-MRCI Hamiltonian elements"
print "based on the spin-free generator"
print ""
print "!!!!! The operator space is L: <Psi|",  E_cmlk[0], "|Psi>: R !!!!!"
print "@@@ SIGMA_0 <-- sum_{klcd} H(0; Vd, Vc, Al, Ak) T(Ak, Al, Vc, Vd)"
print ""
コード例 #3
0
import secondQuantizationAlgebra as sqa

sqa.options.verbose = False
# definitions
tg_c = sqa.options.core_type
tg_a = sqa.options.active_type
tg_v = sqa.options.virtual_type
tg_t = tg_c + tg_a + tg_v

i  = [sqa.index('i%i' %j, [tg_c], True) for j in range(8)]
r  = [sqa.index('r%i' %j, [tg_a], True) for j in range(8)]
a  = [sqa.index('a%i' %j, [tg_v], True) for j in range(8)]
m  = [sqa.index('m%i' %j, [tg_t], True) for j in range(8)]

t_sym = [ sqa.symmetry((1,0,3,2),1) ]
W_sym = [ sqa.symmetry((1,0,3,2),1), sqa.symmetry((0,3,2,1),1) ]

t_ts_ket_1 = [ sqa.tensor('t2', [a[0], a[3], i[0], i[1]], t_sym) ]
t_ops_ket_1= [ sqa.sfExOp([i[0], i[1], a[0], a[3]]) ] 
W_ts_ket_1 = [ sqa.tensor('W', [a[1], a[2], a[3], i[2]], W_sym) ]
W_ops_ket_1= [ sqa.sfExOp([a[3], i[2], a[1], a[2]]) ] 

t_ts_ket_2 = [ sqa.tensor('t2', [a[0], a[1], i[0], i[3]], t_sym) ]
t_ops_ket_2= [ sqa.sfExOp([i[0], i[3], a[0], a[1]]) ] 
W_ts_ket_2 = [ sqa.tensor('W', [i[3], a[2], i[1], i[2]], W_sym) ]
W_ops_ket_2= [ sqa.sfExOp([i[1], i[2], i[3], a[2]]) ] 

t_ts_bra_1 = [ sqa.tensor('t2', [i[4], i[5], a[4], a[7]], t_sym) ]
t_ops_bra_1= [ sqa.sfExOp([a[4], a[7], i[4], i[5]]) ] 
W_ts_bra_1 = [ sqa.tensor('W', [a[7], i[6], a[5], a[6]], W_sym) ]
W_ops_bra_1= [ sqa.sfExOp([a[5], a[6], a[7], i[6]]) ] 
コード例 #4
0
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# In addition, any modification or use of this software should
# cite the following paper:
#
#   E. Neuscamman, T. Yanai, and G. K.-L. Chan.
#   J. Chem. Phys. 130, 124102 (2009)

import secondQuantizationAlgebra as sqa
import time

# Define density matrix symmetries
d1sym = [sqa.symmetry((1, 0), 1)]
d2sym_aaaa = [sqa.symmetry((1, 0, 2, 3), -1), sqa.symmetry((2, 3, 0, 1), 1)]
d2sym_abab = [sqa.symmetry((2, 3, 0, 1), 1)]
d3sym_aaaaaa = [
    sqa.symmetry((1, 0, 2, 3, 4, 5), -1),
    sqa.symmetry((0, 2, 1, 3, 4, 5), -1),
    sqa.symmetry((3, 4, 5, 0, 1, 2), 1)
]
d3sym_aabaab = [
    sqa.symmetry((1, 0, 2, 3, 4, 5), -1),
    sqa.symmetry((3, 4, 5, 0, 1, 2), 1)
]

# Define Amplitude symmetries
a1sym = []
a2sym_aaaa = [sqa.symmetry((1, 0, 2, 3), -1), sqa.symmetry((0, 1, 3, 2), -1)]
コード例 #5
0
ファイル: investigate.py プロジェクト: norikcentaure/holder

sqa.options.verbose = False

# Define needed indexes as being core,active,virtual
tag_core = sqa.options.core_type
tag_active = sqa.options.active_type
tag_virtual = sqa.options.virtual_type

ia1 = sqa.index('Ca1', [tag_core, ['alpha']], True)
ia2 = sqa.index('Ca2', [tag_core, ['alpha']], True)
ib1 = sqa.index('Cb1', [tag_core, ['beta']], True)
ib2 = sqa.index('Cb2', [tag_core, ['beta']], True)

#symmetry
sym = sqa.symmetry((1, 0), 1)

# tensor (name,indexes,symmetry)
tensor = sqa.tensor('t1', [ia1, ia2, ib1, ib2], [])
# delta (indexes)
delta = sqa.kroneckerDelta([ia1, ia2])
# sfExOp (indexes)
sf = sqa.sfExOp([ia1, ia2])
# creOp/desOp (index)
cre1 = sqa.creOp(ia1)
des1 = sqa.desOp(ia2)
des2 = sqa.desOp(ib1)
# creDesTensor (list of op)
credes = sqa.creDesTensor([cre1, des2, des1])

# term (cts, const, tensor_list)
コード例 #6
0
import secondQuantizationAlgebra as sqa

tg_a = sqa.options.alpha_type
tg_b = sqa.options.beta_type
tg_c = sqa.options.core_type
tg_v = sqa.options.virtual_type
tg_h = sqa.options.core_type + sqa.options.virtual_type
p0 = sqa.index('p0', [tg_h], True)
p1 = sqa.index('p1', [tg_h], True)
p2 = sqa.index('p2', [tg_h], True)
p3 = sqa.index('p3', [tg_h], True)
q0 = sqa.index('q0', [tg_v], True)
q1 = sqa.index('q1', [tg_c], True)
sym_h2abab = sqa.symmetry((2,3,0,1),1)
h2abab = sqa.tensor('h2abab', [p0, p1, p2, p3], [sym_h2abab])
p0_c = sqa.creOp(p0)
p1_c = sqa.creOp(p1)
p2_d = sqa.desOp(p2)
p3_d = sqa.desOp(p3)
t1aa = sqa.tensor('t1aa', [q0, q1], [])
q0_c = sqa.creOp(q0)
q1_d = sqa.desOp(q1)
term = sqa.term(1.0, [], [t1aa, q0_c, q1_d, h2abab, p0_c, p1_c, p3_d, p2_d])
print term
print ''
result = sqa.normalOrder(term)
for t in result:
  print t
print ''
for t in result:
  t.contractDeltaFuncs()