you are using qat prepare but normal qconfig. Also in the mapping, nnq.Hardswish isn’t a qat module. If you are intending to do qat you should do something like
    import torch
    qconfig = torch.quantization.get_default_qat_qconfig("fbgemm")
    model = torch.nn.Sequential(torch.nn.modules.Hardswish(), torch.nn.modules.Linear(1,1))
    model.qconfig = qconfig
    model_prep = torch.quantization.prepare_qat(model)
    print(model_prep)
    model_prep(torch.randn(1,1))

if you are not intending to do qat you should do something like
    import torch
    qconfig = torch.quantization.get_default_qconfig("fbgemm")
    model = torch.nn.Sequential(torch.nn.modules.Hardswish(), torch.nn.modules.Linear(1,1))
    model.qconfig = qconfig
    model_prep = torch.quantization.prepare(model)
    print(model_prep)
    model_prep(torch.randn(1,1))