Skip to content

Commit

Permalink
Merge pull request #2388 from Ericgig/misc.qobj_creation_metadata
Browse files Browse the repository at this point in the history
Improve Qobj creation function metadata setting
  • Loading branch information
Ericgig committed May 13, 2024
2 parents 166212f + e5d2877 commit 8ab189e
Show file tree
Hide file tree
Showing 7 changed files with 354 additions and 121 deletions.
1 change: 1 addition & 0 deletions doc/changes/2388.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Better metadata management in operators creation functions
5 changes: 4 additions & 1 deletion qutip/core/energy_restricted.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ def enr_destroy(dims, excitations, *, dtype=None):
n2 = state2idx[state2]
a_ops[idx][n2, n1] = np.sqrt(s)

return [Qobj(a, dims=enr_dims).to(dtype) for a in a_ops]
return [
Qobj(a, dims=enr_dims, isunitary=False, isherm=False).to(dtype)
for a in a_ops
]


def enr_identity(dims, excitations, *, dtype=None):
Expand Down

0 comments on commit 8ab189e

Please sign in to comment.