Operator overloads for QuantumSystem
#79
cahitkargi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here we will discuss the ideas on what operators should we overload and their behaviours.
What we currently have
+
operatorqs1
andqs2
) --> combines them into a composite system (saycompSys
), ie creates a composite system (compSys
) that containsqs1
andqs2
as its subsystems (incompSys.subSys
)comp1
andcomp2
) --> combines them into a composite system (saycompSys
, ie creates a composite system (compSys
) that containscomp1
andcomp2
as its subsystems (incompSys.subSys
)comp1
) and single system (sayqs1
) --> addsqs1
as a subsystem tocomp1
, ie addsqs1
intocomp1.subSys
-
operator is more complicated because of nested cases. When I say "X is a part of the composite system Y" in below explanations, I don't necessarily mean the composite system that is the immediate parent of X, but I mean the outer most composite. For example, if a single system (qs1
) is inside a composite system (comp1
), andcomp1
is a subsystem of another composite system (comp2
), and this goes up to a degree N ( (compN
). With "part of a composite system", I refer tocompN
.qs1
andqs2
) and the operation isqs1 - qs2
.qs1
is part of a composite systemcompN
, andqs2
is also a part ofcompN
(qs1
andqs2
might be in different subsystems ofcompN
), --> this operation finds and removesqs2
from the composite that it is stored (which might becompN
or any of its subsystems)qs1
is part of a composite systemcompN
, butqs2
is NOT a part ofcompN
--> this is currently undefined.comp1
andcomp2
) and the operation iscomp1 - comp2
comp2
is a subsystem ofcomp1
&comp1
is a subsystem ofcomp2
--> this is a bug (see addSubSys allows circular subsystem creation #78) and this case should not be allowed to existcomp2
is a subsystem ofcomp1
(ie it is either directly incomp1.subSys
or in subsystem of any ofcomp1.subSys
) --> this operation removescomp2
fromcomp1.subSys
or from composite that stores it.comp2
is NOT a subsystem ofcomp1
comp1
is part of a composite systemcompN
, andcomp2
is NOT a part ofcompN
--> this is undefinedcomp1
is part of a composite systemcompN
, andcomp2
is also a part ofcompN
--> this operation finds and removescomp2
from the composite that it is stored (which might becompN
or any of its subsystems)*
operator, iesomeNumber * aQuantumSystem
. It always creates a composite system (saycomp1
) that containssomeNumber
of copies ofaQuantumSystem
incomp1.subSys
(regardless whetheraQuantumSystem
is single or composite`What are the issues and suggested solutions
For all the above operators, we are not sure if they are the most suitable/intuitive/rigorous operators for the purposes described above. So, here we also discuss the alternative operators for each.
Further problems are discussed below:
+
operatorProblem : it does not define a consistent behaviour for different input cases (third case is different than first two)
Suggested solutions :
+
+
+
on multiple inputs*
operatorSuggestion : it can be used to create a copy of a quantum system where the frequencies are scaled with
someNumber
Beta Was this translation helpful? Give feedback.
All reactions