T2: 1. Classical Computing Flashcards
Define algorithm
A procedure for performing a calculation; that is, a means for evaluating f(x).
What are the two primary resources in computing and how are they quantised in the circuit model?
Time - number of gates
Space - number of bits
Define complexity class
A set of problems which take similar computational resources (typically time as a function of input size) to solve.
How are algorithms classified into complexity classes
An upper bound is placed on computation time (as function of input bits) to give a worst case scenario
Define the class of NP problems
Problems which have a verified solution in polynomial time, despite the solution being difficult to find.
Define NP-complete problems
NP Problems for which, if an answer was found, could be modified to solve all NP problems, implying P=NP.
Define computation
Some procedure for evaluating a given function f(x)
What are the four functions f:{0,1} → {0,1}
- Identity f(x)=x
- NOT f(x)=not(x)
- f(x)=0
- f(x)=1
What function does the NOT gate represent?
f(x) = x+1 modulo 2
Why does the fanout gate not have a direct quantum analogue?
No cloning theorem prevents cloning of an arbitrary qubit.
Why are there 16 gates which map two bits to one?
There are four possible inputs: 00, 01, 10, 11
There are 2^input ways we can uniquely assign ones and zeroes to each input.
What properties do NOT and CNOT share, that AND, NAND and OR do not?
They are reversible; they map from and to the same number of bits.
How do we label bits/qubits on a circuit diagram (numerically or alphabetically)
Increasing numbers as we go up/x bottom, y top etc.
What function does the CNOT gate represent?
x⊕y ≔ x+y mod2
The outcome is on the top line.
How can we use a CNOT to copy a number?
Initialise an ancillary bit to zero and use this as the target for a not. It will copy the control.