Definition of lg in IBM quantum learning resources
Understand this faster with AI
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work. Bring the best of human thought and AI automation together at your work. Learn more TeamsQ&A for workConnect and share knowledge within a single location that is structured and easy to search.In its discussion of Shor's algorithm IBM's quantum learning platform uses the definition$$ n = \lg(N-1) = \lfloor{\log(N-1)}\rfloor+1 $$to describe the number of bits needed to encode the value N-1.https://quantum.cloud.ibm.com/learning/en/courses/fundamentals-of-quantum-algorithms/phase-estimation-and-factoring/shor-algorithmThis seems to be an unconventional (albeit useful) definition of lg (which generally seems to be defined simply as log_2). I am wondering whether this definition has an origin outside of the IBM learning resources or whether this usage is unique to this resource. I am not seeing it in Nielsen & Chuang, for example. Anybody have any reference for where this notation might originate?It is common (although not standard) is to use $\lg(x)$ to represent $\log_2(x).$ You see this in many engineering/computer science references and in some algorithms textbooks, such as Introduction to Algorithms.What can be unclear is if $\lg(x)$ is supposed to be over binary (integer) numbers (in which case it should follow the definition above), or over the reals. Depending on context, $\lg(x)$ can represent the binary logarithm, for which the definition you are giving above holds.Thanks for contributing an answer to Quantum Computing Stack Exchange!But avoid …Use MathJax to format equations. MathJax reference.To learn more, see our tips on writing great answers.Required, but never shown By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy. Start asking to get answersFind the answer to your question by asking.Explore related questionsSee similar questions with these tags.To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Site design / logo © 2025 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2025.11.20.37056
Tags
Source Information
Discussion
0 professional contributions
Sign in to join this professional discussion.
Be the first to add a constructive contribution.
