+# Visualize the wave functions of a quantum well.
+# This is a realization (with adaptations and corrections) of the application note alpaca_22 from https://analogparadigm.com.
+# Schrödinger's equation is here to psi'' = -(U0+epsilon)*psi
+
+coefficient(1): +1 -> l # left boundary of quantum well
+coefficient(2): -1 -> r # right boundary of quantum well
+coefficient(3): +1 -> +U0 # depth of quantum well
+coefficient(4): +1 -> epsilon # energy of system
+coefficient(5): +1 -> psi'0
+coefficient(6): -1 -> -psi0
+coefficient(8): -1 -> slowing_t # slowing down t
+
+# First, generating a time ramp from -1 to +1
+iintegrate slowing_t -> t
+ IC: +1
+
+# Defining the boundaries of the quantum well
+compare t, l -> well_left
+ GT0: -U0 # LT0 is open, thus =0
+compare t, r -> well
+ LT0: well_left # GT0 is open, thus =0
+
+# adding epsilon to the well and calculating the wave function
+isum epsilon, well -> -(well+epsilon)
+multiply -(well+epsilon), psi -> -(well+epsilon)*psi
+iintegrate -(well+epsilon)*psi -> -psi' # input is psi''
+ IC: psi'0
+iintegrate -psi' -> psi
+ IC: -psi0
+
+multiply psi, psi -> psi^2
+invert well -> -well
+
+output(x): psi
+output(y): psi^2
+output(z): -well
+output(u): t # also used as trigger