Skip to content

Commit 7e1a865

Browse files
committed
Method to get the lowest ordered state.
1 parent 4ed7fa9 commit 7e1a865

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

c3/system/model.py

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ def __init__(self, subsystems=None, couplings=None, tasks=None):
4949
if tasks:
5050
self.set_tasks(tasks)
5151

52+
def get_ground_state(self) -> tf.constant:
53+
gs = [[0] * self.tot_dim]
54+
gs[0][0] = 1
55+
return tf.transpose(tf.constant(gs, dtype=tf.complex128))
56+
5257
def set_components(self, subsystems, couplings=None) -> None:
5358
for comp in subsystems:
5459
self.subsystems[comp.name] = comp

0 commit comments

Comments
 (0)