Closed nathanshammah closed 2 years ago
My preferred solution would be:
Model
class that represents the Hamiltonian model in Processor
(see below).Pulse
a bit down as an advanced use, both in the paper and in the tutorial. Phrase it as a data class rather than focusing too much on the concepts. It is different from QobjEvo
because it separates noise from the ideal dynamics. And it needs to handle concatenation of coefficients, which is not a problem of QobjEvo
.The biggest problem I see is that the list of Pulse
is partially initialized at the initialization of a Processor
(including only the Hamiltonians, no coeff
), which is indeed a less-optimal design. So I suggest to add a Model
class that contains only Hamiltonian information. The class takes the hardware parameters to initialize
class Model():
def __init__(params):
...
model = SpinChainModel({"h":0.01, ...})
and has a `call' that returns the corresponding Hamiltonian. The Hamiltonian Qobj can be obtained by
model("sx0")
or whatever identifier that matches the implementation of the class, i.e.
model("sx", 0)
Advantages are:
Pulse
.@nathanshammah @quantshah Any opinions?
I also mentioned in https://github.com/qutip/qutip-qip/discussions/101 a possible upgrade for the Hamiltonian coefficients.
It has been brought up that the
Pulse
class can be confusing for the user, as it brings together control pulses, the relative Hamiltonian, and noise added to the control pulses. This issue is opened to discuss this point and see what action to take.There is also some conceptual overlap between
qutip-qip.Pulse
andqutip.QobjEvo
(andqutip.Qobj
for the time-constant part).Right now the
Pulse
class is also discussed in https://qutip-qip.readthedocs.io/en/latest/qip-processor.html#modelling-quantum-hardware-with-processor.The actions to be taken can be discussed here, for example:
Pulse
in the documentation (and white paper)