Qubit refers to a two-valued quantity used in
- A.classical computers
- B.classical cryptography
- C.quantum computers
- D.lasers
Correct answer
Explanation
The correct answer is C, quantum computers. A qubit, short for quantum bit, is the basic unit of information in a quantum computer, just as the bit is in an ordinary computer.
A classical bit is always either 0 or 1. A qubit is built on a two-level quantum system, such as the spin of an electron, the polarisation of a photon or the state of a superconducting circuit. Because of superposition it can exist in a combination of 0 and 1 at the same time, and through entanglement the state of one qubit can be linked to another. These properties let quantum computers tackle some problems, such as factoring large numbers or simulating molecules, far faster than classical machines. India's National Quantum Mission, approved in 2023, aims to build quantum computers with 50 to 1,000 qubits.
A is wrong: classical computers store data in ordinary bits.
B is wrong: classical cryptography relies on mathematical problems run on ordinary bits.
D is wrong: lasers produce coherent light and do not use qubits as a unit of information.
Exam tip: bit = 0 or 1; qubit = superposition of 0 and 1; key quantum ideas are superposition and entanglement.
Practice Questions
View allIn C++, members of a class declared as private can be accessed
- A.From anywhere in the program
- B.Only within the same class
- C.Within the class and its derived classes
- D.Only from the main function
Show answer
Private is the most restricted access specifier and is also the default for a C++ class, so private data members can be read or changed only by the member functions of that class, and by a friend function or friend class if one is declared.
Read the full explanation →Which of the following languages does NOT support multiple inheritance through classes?
- A.C++
- B.Java
- C.Python
- D.Eiffel
Show answer
Java deliberately leaves out multiple inheritance of classes to avoid the ambiguity that arises when two base classes supply a member of the same name, the problem often called the diamond problem, and it provides interfaces so that a class can still take behaviour from more than one source.
Read the full explanation →Which special member function is executed automatically when an object of a class is created?
- A.Destructor
- B.Constructor
- C.Friend function
- D.Virtual function
Show answer
A constructor carries the same name as its class, is called automatically the moment an object is created and is normally used to give the data members their initial values; it returns no value at all, not even void, and it can be overloaded.
Read the full explanation →The feature by which a new class acquires the properties and behaviour of an existing class is
- A.Inheritance
- B.Polymorphism
- C.Abstraction
- D.Message passing
Show answer
Inheritance lets a derived, child or sub class take the members of a base, parent or super class and add its own, which is the main route to code reuse in object-oriented programming; its forms are single, multiple, multilevel, hierarchical and hybrid.
Read the full explanation →Which statement about a class and an object is correct?
- A.A class is an instance of an object
- B.An object is a blueprint and a class is its instance
- C.A class is a blueprint and an object is its instance
- D.A class and an object both occupy memory in the same way
Show answer
A class only describes the data members and member functions that its objects will have, while an object is created from the class, occupies memory and holds actual values; one class may have any number of objects.
Read the full explanation →