Quanlse/Simulator/__init__.py
def _createHam(self, idx: int, driveFreq: Union[int, float]) -> QHamiltonian:
        """
        Return the hamiltonian of qubit-resonator circuit model according to the qubit index and drive frequency.

        :param idx: index of the qubit.
        :param driveFreq: drive frequency.

        :return: QHamiltonian in the rotating frame.
        """
        qubitFreq = self.pulseModel.qubitFreq
        qubitAnharm = self.pulseModel.qubitAnharm
        resonatorFreq = self.resonatorFreq
        qubitLevel = self.pulseModel.sysLevel
        cList = {1: [sqrt(self.dissipation) * a(self.level)]}

        ham = QHamiltonian(subSysNum=2, sysLevel=[qubitLevel, self.level], dt=self.dt)
        ham.addDrift(operator=number(qubitLevel), onSubSys=0, coef=qubitFreq[idx] - driveFreq)
        ham.addDrift(operator=duff(qubitLevel), onSubSys=0, coef=0.5 * qubitAnharm[idx])
        ham.addDrift(operator=number(self.level), onSubSys=1, coef=resonatorFreq[idx] - driveFreq)
        ham.addCoupling(onSubSys=[0, 1], g=self.coupling[idx])
        ham.setCollapse(cList)

        return ham

        Return the hamiltonian of qubit-resonator circuit model according to the qubit index and drive frequency.

        :param idx: index of the qubit.
        :param driveFreq: drive frequency.

        :return: QHamiltonian in the rotating frame.
        
Return the hamiltonian of qubit-resonator circuit model according to the qubit index and drive frequency.
Return the hamiltonian of qubit - resonator circuit model according to the qubit index and drive frequency .
def _createHam(self, idx: int, driveFreq: Union[int, float]) -> QHamiltonian:
        qubitFreq = self.pulseModel.qubitFreq
        qubitAnharm = self.pulseModel.qubitAnharm
        resonatorFreq = self.resonatorFreq
        qubitLevel = self.pulseModel.sysLevel
        cList = {1: [sqrt(self.dissipation) * a(self.level)]}
        ham = QHamiltonian(subSysNum=2, sysLevel=[qubitLevel, self.level], dt=self.dt)
        ham.addDrift(operator=number(qubitLevel), onSubSys=0, coef=qubitFreq[idx] - driveFreq)
        ham.addDrift(operator=duff(qubitLevel), onSubSys=0, coef=0.5 * qubitAnharm[idx])
        ham.addDrift(operator=number(self.level), onSubSys=1, coef=resonatorFreq[idx] - driveFreq)
        ham.addCoupling(onSubSys=[0, 1], g=self.coupling[idx])
        ham.setCollapse(cList)
        return ham
def _createHam ( self , idx : int , driveFreq : Union [ int , float ] ) -> QHamiltonian : qubitFreq = self . pulseModel . qubitFreq qubitAnharm = self . pulseModel . qubitAnharm resonatorFreq = self . resonatorFreq qubitLevel = self . pulseModel . sysLevel cList = { 1 : [ sqrt ( self . dissipation ) * a ( self . level ) ] } ham = QHamiltonian ( subSysNum = 2 , sysLevel = [ qubitLevel , self . level ] , dt = self . dt ) ham . addDrift ( operator = number ( qubitLevel ) , onSubSys = 0 , coef = qubitFreq [ idx ] - driveFreq ) ham . addDrift ( operator = duff ( qubitLevel ) , onSubSys = 0 , coef = 0.5 * qubitAnharm [ idx ] ) ham . addDrift ( operator = number ( self . level ) , onSubSys = 1 , coef = resonatorFreq [ idx ] - driveFreq ) ham . addCoupling ( onSubSys = [ 0 , 1 ] , g = self . coupling [ idx ] ) ham . setCollapse ( cList ) return ham
Return the hamiltonian of qubit-resonator circuit model according to the qubit index and drive frequency.
Return the hamiltonian of qubit - resonator circuit model according to the qubit index and drive frequency .
"""
        Return the hamiltonian of qubit-resonator circuit model according to the qubit index and drive frequency.

        :param idx: index of the qubit.
        :param driveFreq: drive frequency.

        :return: QHamiltonian in the rotating frame.
        """
QHamiltonian in the rotating frame.
QHamiltonian in the rotating frame .
self
idx
int
index of the qubit.
index of the qubit .
driveFreq
Union[int, float]
None