Exemplo n.º 1
0
def transmon_hamiltonian(n_qubit,
                         n_cavity,
                         non_herm=False,
                         non_linear_decay=False):
    """Return the Transmon symbolic drift and control Hamiltonians. If
    `non_herm` is True, the drift Hamiltonian will include non-Hermitian decay
    terms for the spontaneous decay for the qubits and the cavity. This will be
    the "standard" decay with a linear decay rate, or with an independent decay
    rate for each level in the transmon and cavity if `non_linear_decay` is
    True.
    """
    HilQ1 = LocalSpace('1', dimension=n_qubit)
    HilQ2 = LocalSpace('2', dimension=n_qubit)
    HilCav = LocalSpace('c', dimension=n_cavity)
    b1 = Destroy(identifier='b_1', hs=HilQ1)
    b1_dag = b1.adjoint()
    b2 = Destroy(identifier='b_2', hs=HilQ2)
    b2_dag = b2.adjoint()
    a = Destroy(hs=HilCav)
    a_dag = a.adjoint()
    δ1, δ2, Δ, α1, α2, g1, g2 = sympy.symbols(
        r'delta_1, delta_2, Delta, alpha_1, alpha_2, g_1, g_2', real=True)
    H0 = (δ1 * b1_dag * b1 + (α1 / 2) * b1_dag * b1_dag * b1 * b1 + g1 *
          (b1_dag * a + b1 * a_dag) + δ2 * b2_dag * b2 +
          (α2 / 2) * b2_dag * b2_dag * b2 * b2 + g2 *
          (b2_dag * a + b2 * a_dag) + Δ * a_dag * a)
    if non_herm:
        if non_linear_decay:
            for i in range(1, n_qubit):
                γ = sympy.symbols(r'gamma_%d' % i, real=True)
                H0 = H0 - sympy.I * γ * LocalSigma(i, i, hs=HilQ1) / 2
            for j in range(1, n_qubit):
                γ = sympy.symbols(r'gamma_%d' % j, real=True)
                H0 = H0 - sympy.I * γ * LocalSigma(j, j, hs=HilQ2) / 2
            for n in range(1, n_cavity):
                κ = sympy.symbols(r'kappa_%d' % n, real=True)
                H0 = H0 - sympy.I * κ * LocalSigma(n, n, hs=HilCav) / 2
        else:
            γ, κ = sympy.symbols(r'gamma, kappa', real=True)
            H0 = H0 - sympy.I * γ * b1_dag * b1 / 2
            H0 = H0 - sympy.I * γ * b2_dag * b2 / 2
            H0 = H0 - sympy.I * κ * a_dag * a / 2
    H1 = a / 2  # factor 2 to account for RWA
    return H0, H1
Exemplo n.º 2
0
    def _toSLH(self):

        a = Destroy(self.space)
        a_d = a.adjoint()
        S = identity_matrix(1)
        
        if self.sub_index == 0: 
            # Include the Hamiltonian only with the first port of the kerr cavity circuit object
            H = self.Delta * (a_d * a) + self.chi * (a_d * a_d * a * a)
            L = Matrix([[sqrt(self.kappa_1) * a]])
        else:
            H = 0
            L = Matrix([[sqrt(self.kappa_2) * a]])
        
        return SLH(S, L, H)
Exemplo n.º 3
0
    def _toSLH(self):

        a = Destroy(self.space)
        a_d = a.adjoint()
        S = identity_matrix(1)

        if self.sub_index == 0:
            # Include the Hamiltonian only with the first port of the kerr cavity circuit object
            H = self.Delta * (a_d * a) + self.chi * (a_d * a_d * a * a)
            L = Matrix([[sqrt(self.kappa_1) * a]])
        else:
            H = 0
            L = Matrix([[sqrt(self.kappa_2) * a]])

        return SLH(S, L, H)