代写代考 MULT90063 Introduction to Quantum Computing

MULT90063 Introduction to Quantum Computing
Assignment 2
Due: 5pm, Friday Week 12, 2022
Welcome to Assignment 2 for MULT90063 Introduction to Quantum Computing.

Copyright By PowCoder代写 加微信 powcoder

Instructions: Work on your own, attempt all questions. Hand in your completed written work on or before the due date as per instructions above (standard late penalties will apply). The work on this assignment should be your own. Do not work together. The QUI circuits you create for this assignment must be included in your assignment with all relevant details (such as rotation angles). IBM Quantum circuits may be implemented either using the circuit designer (in which case you should include the circuit in your assignment) or using Qiskit (in which case you should include the python code).
Please submit your assignment online via LMS. To do this convert your answers to a single PDF and and upload it before the due date.
Total marks = 40
(1) Phase Flip Quantum Error Correction [7 marks = 2, 1, 4]
(a) Show how you can convert the 3 qubit bit-flip quantum error correction code (shown below) into a phase-flip (i.e. corrects a Z error) by introducing H gates.
Program the phase-flip error correction circuit into the QUI, together with a Toffoli-based correction circuit. Implement your circuit in QUI to encode (and decode) the state |𝑞⟩ = |”⟩$ |&⟩.
(b) What are the stabilizers of the three qubit phase flip code?
(c) Implement your circuit using an IBM Quantum device. What is the probability that you measure the encoded state? What is the probability that no error is detected? Does this circuit actually protect against errors – briefly discuss, giving reasons why or why not?
MULT90063 Assignment 2, © C. Hill, G. White, L. Hollenberg et al 2022

(2) Toffoli gate on IBM Quantum device. [8 marks = 3, 2, 3]
We have seen that many quantum algorithms rely on the Toffoli gate. In practice, most quantum computer architectures do not implement a 3-qubit gate directly and so the Toffoli gate must be constructed from (compiled into) a decomposition involving 1 and 2-qubit gates.
a) Using any IBM quantum computing device, implement the best Toffoli gate you can, giving details of what happens when you input each computational state (averaging over 1000 instances). Provide full details of the including your Qiskit code, device and circuit image, and a summary of the results in the for each input in the computational basis. Your circuit must work on an arbitrary superposition input state, and you will be judged on the circuit optimisation and final fidelity obtained.
b) Assume the main source of error in a) is an effective Y-rotation error. Using the QUI, find the continuous error model (including mean and standard deviation) that most closely matches the distribution of probabilities most closely matching your results in a) for the 110 input state.
c) The Toffoli gate can be used in a three qubit Grover search. Choose and IBM Quantum device and implement one iteration of Grover’s search which searches for the marked state 101. Provide full details of the program (text code and compiled circuit image), and the results (probability histogram) of the outcome. Did your circuit amplify the correct state? Discuss.
(3) QAOA on IBM Q devices [8 marks = 2, 1, 3, 2]
(a) Write out the Hamiltonian resulting from the MAX-CUT problem resulting from the following graph:
(b) What are the solution(s) you would expect for this problem?
(c) Using QUI, write out a corresponding QAOA circuit (using just p=1 iterations), find the optimal angles, and probability of successfully finding one of the solution states. Implement this circuit in QUI and provide details of the implementation. What is the probability of finding the solution state(s)?
(d) Implement the same circuit on an IBM Quantum device, show the circuit and measurement results, and hence determine the probability of success using an IBM Quantum device. Briefly comment on your results.
MULT90063 Assignment 2, © C. Hill, G. White, L. Hollenberg et al 2022

(4) Variational Quantum Eigensolver [7 marks = 2, 2, 3]
Consider a problem for which the Hamiltonian can be written as:
H=cI+cZ+cZ+cZZ+cYY+cXX+cXY “&&(()&(*&(+&(,&(
The trial wavefunction, from which we will start our search for the lowest energy configuration, can be shown to have the form
|𝜑(𝜃)⟩ = (cos(𝜃) 𝐼 − 𝑖 sin(𝜃) 𝑋 𝑌 )|01⟩ &(
a) The circuit to construct |𝜑(𝜃)⟩ differs from the circuit to get ZZ-couplings in the QAOA applications we have considered so far. Based on the circuit for a ZZ coupling, and the fact that X = H Z H and Y = <√𝑋>-𝑍√𝑋
(where H are Hadamard operations), construct a circuit in the QUI that produces |𝜑(𝜃)⟩. b) In order to minimize the energy of the Hamiltonian, q must be varied to minimize
⟨𝐻⟩=𝑐 +𝑐⟨𝑍⟩+𝑐⟨𝑍⟩+𝑐⟨𝑍𝑍⟩+𝑐⟨𝑌𝑌⟩+𝑐⟨𝑋𝑋⟩+𝑐⟨𝑋𝑌⟩ “&&(()&(*&(+&(,&(
where for each observable 𝒪 we must measure the quantity ⟨𝒪⟩ = ⟨𝜑(𝜃)|𝒪| 𝜑(𝜃)⟩. Note that measuring in the X or Y bases is equivalent to measuring in Z with a suitable basis-change gate. Modify your circuit to measure the expectation values required to determine ⟨𝐻⟩ for a given value of q. Rather than submit all the circuits, describe how you are programming the measurement of each term in ⟨𝐻⟩.
c) Consider the case where the c’s are given by:
c0 = -0.470 c1 = 0.342 c2 = -0.446 c3 = 0.573 c4 = c5 = 0.091 c6 = 0.010
By trying out different values of 𝜃, find the minimum energy for the Hamiltonian.
MULT90063 Assignment 2, © C. Hill, G. White, L. Hollenberg et al 2022

(4) Three qubit K-state [10 marks = 4, 3, 1, 2]
A three-qubit K-state given by
|𝐾⟩ = √2|100⟩ − 𝑒.//*|010⟩ + √3|001⟩ √6
(a) Using QUI, implement a circuit to create the three-qubit K-state. Show your circuit and briefly explain the reasoning you used to create this circuit.
(b) On an IBM Quantum device of your choice, make a choice of qubits and implement this circuit, attempting to achieve the highest fidelity state possible. Describe which device, and which qubits you chose, and any additional optimization which you made.
(c) Measure each of the qubits in the Z-basis, and record the results. Plot the measurement results. Comment on the results you obtained, including any errors.
(d) Apply a Hadamard gate to every qubit directly before the measurement and measure the result. What is the resulting probability of measuring the |000⟩ state. What should the probability be ideally? Show your working.
MULT90063 Assignment 2, © C. Hill, G. White, L. Hollenberg et al 2022

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com