Here is the grading report (I learned to view the report later in the course – it provides more hints to get the correct answer):
AssertionError Traceback (most recent call last)
~/assignment_helper.py in ()
1 ### BEGIN HIDDEN TESTS
----> 2 assert np.isclose(energy_expectation_value, -2.23606797749979)
3 ### END HIDDEN TESTS
AssertionError:
[Failed]
4.4.3 At any rate, I think it helps to copy what the instructor puts after eigen-way of exercise 7: Naturally, this expectation value also corresponds to the lowest eigenvalue and indeed, this is the ground state energy. So, by calculating the eigen-decomposition of the typically non-diagonal Hamiltonian, we can extract both the ground state and its energy. The difficulty comes from the exponential scaling of the matrix representing the Hamiltonian as a function of the number of sites. This is the original reason going back to the early 1980s to build a quantum computer: this device would implement (or simulate) the Hamiltonian in hardware. Say, a couple of hundred spins would be beyond the computational capacity of supercomputers, but having the physical spins and being able to set a specific Hamiltonian, we can extract quantities of interest, such as the ground state.
4.4.4 No-“sweat” (swell). There is a mid-term problem for single-qubit problem that you don’t need to use the 高手way for “swelling” a 2x2 matrix for the 4x4 tensor product” in 2-qubit system, since in single-qubit systems the 1-dimension vector is good enough.
4.5 After-thoughts about Module 1 Exam
4.5.1 Resubmission. Since on the internet, the exam most often is what used-to-be “take home”, it is hard. However, it allows resubmission, which is very graceful – it tells you were wrong, but keep on trying till you succeed. Well, I believe it records my first wrong answer and may discount my score? Not sure.
4.5.2 Pre-assignments. At any rate, all the exam problems are in the scope instructor videoed, or mostly in the assignments, or best of all, a kind of “pre-assignments”. I usually neglect pre-assignments because I thought I only need to spent time when it speeds up my work of the formal assignment. However, you should at least “run all” once the pre-assignments to see instructor’s answer. These answers provide great hints not only for assignments, but for exam problems as well. I learn this during the re-submission of exam answers. For example, from these great pre-assignments I learnt:
4.5.2.1 A QUBO NP-hard math problem to minimize 5xy+6x+3y can be resolved using physical Ising simulation model dimod in Python, which contains a QUBO solution.
4.5.2.2 The meaning of probability amplitude, entropy, & visibility parameter of density matrix for mixed state, in the sense of flip-coin random vectors (an analogy instructor uses to teach real quantum phenomena, very enlightening).
4.5.3 Meaning behind programming. Very often you put too much emphasis on programming and forgot the real course meaning behind it, when working on Python assignments.