{α,β,ℏ}=RandomReal[{-1,1},3];x=(({{0, 1}, {0, 0}}));a=(({{q, 0}, {0, r}})); A=MatrixExp[-ℏ β a]; y=(({{0, 0}, {1, 0}})); b=(({{s, 0}, {0, t}})); B=MatrixExp[-ℏ α b];

eqns1=Thread[Flatten/@(x.y-y.x==((B-A)/ℏ))]

eqns2=Thread[Flatten/@(a.x-x.a==-α x)]

eqns3=Thread[Flatten/@(b.y-y.b==-β y)]

eqns4=Thread[Flatten/@(a.y-y.a==α y)]

eqns5=Thread[Flatten/@(x.b-b.x==-β x)]

eqns=eqns1⋃eqns2⋃eqns3⋃eqns4⋃eqns5

Reduce[eqns, {q,r,s,t}]

Solve[eqns2⋃eqns3⋃eqns4⋃eqns5, {q,r,s,t}]

{sol}=Solve[eqns, {q,r,s,t}]

NSolve[{True,-1==((-(E^(-0.2420748525683183` r ℏ))+(E^(-0.3740462780156224` t ℏ)))/ℏ),1==((-(E^(-0.2420748525683183` q ℏ))+(E^(-0.3740462780156224` s ℏ)))/ℏ),q-r==-0.3740462780156224`,-q+r==0.3740462780156224`,-s+t==-0.2420748525683183`},{q,r,s,t}]

sol /. C[1|2]->0

eqns /. Equal -> List

eqns /. Equal -> List/. (sol /. C[1|2]->0)