Exemplo n.º 1
0
    def __init__(self, L=100.0, W=1.0, eta=0.0, N=2.5, theta=0.0, **base_kwargs):
        """Exceptional Point (EP) waveguide class.

        Copies methods and variables from the Base class and adds new
        parameters.

            Additional parameters:
            ----------------------
                L, W: float
                    Waveguide length/width
                N: float
                    Number of open modes
                eta: float
                    Dissipation coefficient
                theta: float
                    Phase difference between upper and lower boundary
        """
        Base.__init__(self, T=L, **base_kwargs)

        self.L = L
        self.W = W
        self.N = N
        self.eta = eta
        self.theta = theta

        self.k = lambda n: np.sqrt(N**2 - n**2)*np.pi/W
        self.kF = N*np.pi/W
Exemplo n.º 2
0
    def __init__(self, R=0.05, gamma=2.0, **kwargs):
        """Exceptional Points (EP) optomechanics class.

        Copies methods and variables from Base class.

            Additional parameters:
            ----------------------
                R: float
                    Trajectory radius around the EP.
                gamma: float
                    Relative loss between states |1> and |2>.
        """

        Base.__init__(self, **kwargs)
        self.R = R
        self.gamma = gamma
        self.x_EP = 0.0
        self.y_EP = gamma/2.
Exemplo n.º 3
0
def plot_flip_error():
        """
        Plot the flip-error measures R1 and R2 as a function of the
        cycle time T (loop duration).
        """
        ##
        # plot ratios b_1/a_1(T)
        ##
        params = getParamList(a1 = 0.0, a2 = 0.0, b1 = 0.8, b2 = 0.8,
                          c1 = 0.2, c2 = 0.2, p = 0.0)
        params = getParamList(a2 = -0.3, b1 = 0.45, b2 = 0.9,
                              c1 = 0.1, c2 = 0.1, p = 0.0)
        Tmax = 20
        TN = 50
        Trange = np.linspace(0.01, Tmax, TN)
        R1 = np.zeros((TN,), complex)
        R2 = np.zeros((TN,), complex)
        
        for n, T in enumerate(Trange):
            print "T = ", T
            
            ##
            # flip-error R1
            ##
            h = Base(T=T, loop_type=1, init_state='a',
                       init_cond=params, loop_direction='-')
            _, psi_a, psi_b = h.solve_ODE()
            R1[n] = psi_b[-1]/psi_a[-1]
            
            ##
            # flip-error R2
            ##
            h = Base(T=T, loop_type=1, init_state='b',
                       init_cond=params, loop_direction='-')
            _, psi_a, psi_b = h.solve_ODE()
            R2[n] = psi_a[-1]/psi_b[-1]
            
        xlim(0, Tmax)
        ylim(1e-2, 1e3)
        semilogy(Trange, abs(R1), "ro-")
        semilogy(Trange, abs(R2), "go-")
        semilogy(Trange, abs(R1*R2), "ko-")
        show()
Exemplo n.º 4
0
 def __init__(self, **kwargs):
     """Copy methods and variables from Base class."""
     Base.__init__(self, **kwargs)