\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{mdframed}%tto frame a whole section
\usepackage{amsmath}
\usepackage{cancel}%to cancel a equation to 0
\usepackage{braket}%to impose
\usepackage[a4paper, total={6in, 10in}]{geometry}% let's us select the mergin of the page
\title{The Boltzmann Equation}
\author{Adrish Chatterjee}
\date{July 2024}
\begin{document}
$$={a_\Vec{k}}^{(a)}\sqrt{1\pm n_a}\sqrt{V}\ket{(n),k_a^+}-{a_\Vec{k}}^{(a)\dag}\sqrt{n_a}\sqrt{V}\ket{(n}\ket{(n),k_a^-}$$
\end{document}
My code is giving me a desired output but it is giving me the above mentioned error. Can someone tell me what is the problem.