Example #1
0
def domain_wall_indicator(i, basis, bc, check_symm=True, dtype=np.float64):
    """Local operator d which indicates (0 or 1) whether there is a domain wall (assuming a Z2 crytstal) to the right of site i.
        d = (1 - n_i)(1-n_i+1) + n_i n_i+1"""

    if not isinstance(basis, boson_basis_1d):
        raise TypeError("Expecting 1d boson basis")
    L = basis.L
    if bc == 'open' and i == (L - 1):
        return 0 * identity(basis)
    n1 = n_op(i, basis, check_symm=check_symm, dtype=dtype)
    n2 = n_op((i + 1) % L, basis, check_symm=check_symm, dtype=dtype)
    return identity(basis) - (n1 + n2) + 2 * n1 * n2
Example #2
0
def domain_wall_Z3_indicator(i, basis, bc, check_symm=True, dtype=np.float64):
    """Local operator d which indicates (0 or 1) whether there is a domain wall (assuming a Z2 crytstal) to the right of site i.
        d = (1 - n_i)(1-n_i+1)"""

    if not is_hcb_basis(basis):
        raise TypeError("Expecting 1d boson basis")
    L = basis.L
    if bc == 'open' and (i == (L - 1) or i == 0):
        return 0 * identity(basis)
    n0 = n_op((i - 1) % L, basis, check_symm=check_symm, dtype=dtype)
    n1 = n_op(i, basis, check_symm=check_symm, dtype=dtype)
    n2 = n_op((i + 1) % L, basis, check_symm=check_symm, dtype=dtype)
    I = identity(basis)
    return (I - n0) * (I - n1) * (I - n2)
Example #3
0
def proj_blockade_loc(i, basis, bc='periodic'):
    """ Returns a local blockade projector defined on link i, i.e. between sites i, i+1.
        Nonzero when at most one of those sites is excited.
        
        Note that it's defined on the global hilbert space"""

    if not isinstance(basis, boson_basis_1d):
        raise TypeError("Expecting 1d boson basis input")
    L = basis.L
    #for open conditions, there's no constraint between 1st and last links
    if bc == 'open' and i == (L - 1):
        return identity(basis)
    return identity(basis) - n2_op(
        i, (i + 1) % L, L, basis=basis, check_symm=False)
Example #4
0
def domain_wall_Z3_population(basis, bc, check_symm=True, dtype=np.float64):
    if not is_hcb_basis(basis):
        raise TypeError("Expecting 1d boson basis")
    L = basis.L
    Nd = 0 * identity(basis)
    for ii in range(L):
        Nd = Nd + domain_wall_Z3_indicator(
            ii, basis, bc, check_symm=check_symm, dtype=dtype)
    return Nd
Example #5
0
def proj_blockade(basis, bc='periodic'):
    """ Returns a global projector onto the blockade subspace.
        (a next-nearest neighbor blockade)
        basis = hcb basis
        """
    if not isinstance(basis, boson_basis_1d):
        raise TypeError("Expecting 1d boson basis input")
    Pi = identity(basis)
    L = basis.L
    for i in range(L):
        Pi = Pi * proj_blockade_loc(i, basis, bc=bc)
    return Pi