Skip to content

Commit

Permalink
update cutoff selection comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tjstavenger-pnnl committed Sep 29, 2023
1 parent 0e37b92 commit dd30a64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c2qa/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def s2(self, theta, cutoff_a, cutoff_b):
csc_matrix: operator matrix
"""

# FIXME which cutoff to use
# FIXME Using both cutoffs will cause `ValueError: dimension mismatch` between calculated matrices.
arg = (numpy.conjugate(theta * 1j) * self.get_a12_dag(cutoff_a)) - (theta * 1j * self.get_a12(cutoff_a))

return scipy.sparse.linalg.expm(arg)
Expand All @@ -128,7 +128,7 @@ def bs(self, theta, cutoff_a, cutoff_b):
csc_matrix: operator matrix
"""

# FIXME which cutoff to use
# FIXME Using both cutoffs will cause `ValueError: dimension mismatch` between calculated matrices.
arg = theta * self.get_a1dag2(cutoff_a) - numpy.conj(theta) * self.get_a12dag(cutoff_a)

return scipy.sparse.linalg.expm(arg)
Expand Down Expand Up @@ -214,7 +214,7 @@ def cbs(self, theta, cutoff_a, cutoff_b):
Returns:
csc_matrix: operator matrix
"""
# FIXME which cutoff to use
# FIXME Using both cutoffs will cause `ValueError: dimension mismatch` between calculated matrices.
argm = theta * self.get_a1dag2(cutoff_a) - numpy.conjugate(theta) * self.get_a12dag(cutoff_a)
arg = scipy.sparse.kron(zQB, argm).tocsc()

Expand All @@ -230,7 +230,7 @@ def cschwinger(self, beta, theta_1, phi_1, theta_2, phi_2, cutoff_a, cutoff_b):
csc_matrix: operator matrix
"""

# FIXME which cutoff to use
# FIXME Using both cutoffs will cause `ValueError: dimension mismatch` between calculated matrices.
Sx = (self.get_a1(cutoff_a) * self.get_a2_dag(cutoff_a) + self.get_a1_dag(cutoff_a) * self.get_a2(cutoff_a))/2
Sy = (self.get_a1(cutoff_a) * self.get_a2_dag(cutoff_a) - self.get_a1_dag(cutoff_a) * self.get_a2(cutoff_a))/(2*1j)
Sz = (self.get_a2_dag(cutoff_a) * self.get_a2(cutoff_a) - self.get_a1_dag(cutoff_a) * self.get_a1(cutoff_a))/2
Expand Down

0 comments on commit dd30a64

Please sign in to comment.