Exemplo n.º 1
0
    def _toSLH(self):
        S = identity_matrix(1)
        if self.sub_index == 1:
            L = sqrt(self.gamma_p) * Matrix([[LocalSigma(self.space, 'g', 'r')]])
        elif self.sub_index == 2:
            L = sqrt(self.gamma_p) * Matrix([[LocalSigma(self.space, 'h', 'r')]])
        else:
            raise Exception(str(self.sub_index))

        return SLH(S, L, 0)
def setup_qnet_sys(n_cavity,
                   stark_shift=False,
                   zero_phi=True,
                   keep_delta=False,
                   slh=True):
    """Return the effective SLH model (if `slh` is True) or a the symbolic
    circuit (if `slh` is False) for a two-node network, together with the
    symbols and operators in each node"""
    Sym1, Op1 = qnet_node_system('1',
                                 n_cavity,
                                 zero_phi=zero_phi,
                                 keep_delta=keep_delta)
    Sym2, Op2 = qnet_node_system('2',
                                 n_cavity,
                                 zero_phi=zero_phi,
                                 keep_delta=keep_delta)
    if slh:
        H1 = node_hamiltonian(Sym1,
                              Op1,
                              stark_shift=stark_shift,
                              zero_phi=zero_phi,
                              keep_delta=keep_delta)
        H2 = node_hamiltonian(Sym2,
                              Op2,
                              stark_shift=stark_shift,
                              zero_phi=zero_phi,
                              keep_delta=keep_delta)
        S = identity_matrix(1)
        κ = Sym1['kappa']
        L1 = sympy.sqrt(2 * κ) * Op1['a']
        κ = Sym2['kappa']
        L2 = sympy.sqrt(2 * κ) * Op2['a']
        SLH1 = SLH(S, [
            L1,
        ], H1)
        SLH2 = SLH(S, [
            L2,
        ], H2)

    Node1 = CircuitSymbol("Node1", cdim=1)
    Node2 = CircuitSymbol("Node2", cdim=1)

    components = [Node1, Node2]
    connections = [
        ((Node1, 0), (Node2, 0)),
    ]
    circuit = connect(components, connections)
    if slh:
        network = circuit.substitute({Node1: SLH1, Node2: SLH2})
    else:
        network = circuit

    return network, Sym1, Op1, Sym2, Op2
Exemplo n.º 3
0
    def _toSLH(self):

        S = identity_matrix(1)

        if self.sub_index == 1:
            L = sqrt(self.gamma) * Matrix([[LocalSigma(self.space, 'g', 'r')]])
        elif self.sub_index == 2:
            L = sqrt(self.gamma) * Matrix([[LocalSigma(self.space, 'h', 'r')]])
        else:
            raise Exception(str(self.sub_index))

        return SLH(S, L, 0)
Exemplo n.º 4
0
    def _toSLH(self):

        a = Destroy(self.space)
        a_d = a.adjoint()

        S = identity_matrix(1)


        # Include the Hamiltonian only with the first port of the kerr cavity circuit object
        H = self.Delta * a_d * a + (I / 2) * (self.alpha * a_d * a_d - self.alpha.conjugate() * a * a)
        L = Matrix([[sqrt(self.kappa) * a]])

        return SLH(S, L, H)
Exemplo n.º 5
0
    def _toSLH(self):

        a = Destroy(self.space)
        a_d = a.adjoint()
        S = identity_matrix(1)
        kappas = [self.kappa_1, self.kappa_2, self.kappa_3]
        kappa = kappas[self.sub_index]
        
        L = Matrix([[sqrt(kappa) * a]])
        # 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) if self.sub_index == 0 else 0
                
        return SLH(S, L, H)
Exemplo n.º 6
0
    def _toSLH(self):

        a = Destroy(self.space)
        a_d = a.adjoint()
        S = identity_matrix(1)
        kappas = [self.kappa_1, self.kappa_2, self.kappa_3]
        kappa = kappas[self.sub_index]

        L = Matrix([[sqrt(kappa) * a]])
        # 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) if self.sub_index == 0 else 0

        return SLH(S, L, H)
Exemplo n.º 7
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)
            L = Matrix([[sqrt(self.kappa_1) * a]])
        else:
            H = 0
            L = Matrix([[sqrt(self.kappa_2) * a]])

        return SLH(S, L, H)
def slh_map_2chan_chain(components, n_cavity):
    n_nodes = len(components)
    slh_map = {}
    for i in range(n_nodes):
        ind = i + 1
        Sym, Op = qnet_node_system(node_index='%d' % ind, n_cavity=n_cavity)
        S = identity_matrix(2)
        kappa_l, kappa_r = symbols("kappa_%dl, kappa_%dr" % (ind, ind),
                                   positive=True)
        L = [
            sympy.sqrt(2 * kappa_l) * Op['a'],
            sympy.sqrt(2 * kappa_r) * Op['a']
        ]
        H = node_hamiltonian(Sym, Op)
        slh_map[components[i]] = SLH(S, L, H)
    return slh_map