首页 > > 详细

讲解 COMP2K、辅导 Python程序设计

Computing
Instructions
Recommended you complete this part by the end of Week 12.
You should demo this lab in your Week 13 practical session.

[You must demonstrate it to the instructor in one of your practical sessions BEFORE the due date in
order to be awarded marks. Please check the ECP for the correct due date. Note that sections are
‘complete’ and marks are awarded by attempting each task AND correctly answering related
questions to the satisfaction of the instructor.]
Quantum computing is a form of computation that uses quantum phenomena such as superposition
and entanglement that forms an essential part of quantum mechanics. Quantum mechanics describes
physics of matter at the extraordinarily small scale surprisingly accurately and is the most successful
physical theory of the universe we currently have being able to predict outcomes to an accuracy of up
to 10-11 decimal places! See for example Chapter 15 of (Moore and Mertens, 2011) for an
introduction. Quantum computing’s pervasiveness will only increase as it comes out of infancy and
there continues to be major advancements as now there are known to be several quantum computers
in existence. It is expected to become prominent part in computing and algorithms of the future by
creating a new series of quantum algorithms that surpass the computational power of classical
supercomputers by “harnessing” the power of quantum computation and is one of the 21st century’s
biggest challenges.
Quantum computers uses quantum bits or ‘qubits’, bits that are in superposition of between states
instead of being either on or off and being in one or the other state (like a classical binary bit). Qubits
still collapse into binary bits, but its actual final state has a probabilistic outcome given by a probability
density as opposed to a deterministic one.
In this laboratory we’ll be using Qiskit, an open-source framework for quantum computing that allows
you to simulate and use real quantum bits on IBM’s quantum computers. There are a few different
ways of using Qiskit:
• You can use Qiskit through IBM’s online environment, accessible here.
• You can install Qiskit as a Python library through here.
This laboratory will allow you to explore qubits and the different classical and quantum operations
you can use to manipulate qubits in a quantum circuit. Qiskit’s documentation can be found here.

Section I – Microsoft Seminar
Microsoft released an extremely useful, self-contained seminar on quantum computing that is a very
valuable resource if you find the concepts in this laboratory difficult to follow:
Seminar on Quantum Computing for Computer Scientists – https://youtu.be/F_Riqjdh2oM
Try getting a handle of quantum computing concepts from the video and playing with the mathematics
of the quantum mechanical operators before you start the following section. See for example
equations (6.23) to (6.46) from Shakes’ book. Chapter 15 of (Moore and Mertens, 2011) also provides
a great introduction to the area, including all the necessary quantum mechanical preliminaries.
Although you do not receive marks for this section and you do not have to complete the entire video,
there is significant overlap with the video and the requirements of the next section that do award
marks.
COMP2048 Theory of Computation S. S. Chandra
2

Section II – Qiskit (10 Marks)
Complete the following exercises using your knowledge of quantum computing, quantum algorithms
and quantum circuits using Qiskit or IMB Composer. All documentation including circuits, code,
results and accompanying notes must be submitted as a zip file as part of your submission on
Blackboard.
-------------------------------
[See the relevant sections of Shakes’ book, Chapter 15 of (Moore and Mertens, 2011) and the
Microsoft Seminar video for hints]
1. What does a Hadamard gate do?
(1 mark)
2. Draw and simulate a simple quantum circuit with three qubits that returns |111> with certainty.
(0.5 mark)
3. Draw and simulate a quantum circuit with three qubits that returns |111⟩ or |101⟩ with 50%
probability each.
(0.5 mark)
4. Draw and simulate a quantum circuit with three qubits that returns |000⟩, |001⟩, |010⟩, |011⟩,
|100⟩, |101⟩, |110⟩, or |111⟩ with equal probability.
(0.5 mark)
5. Make and simulate a quantum circuit whose final Bell state is
1
√2
(|01⟩− |10⟩).
(2.5 marks)
6. Simulate a coin toss using qubit(s) in a quantum circuit. Why does this lead to better ‘randomness’
than a normal/classical coin toss? How could you extend this to be a random number generator?
(2 marks)
7. Implement a solution to the 1-bit Deutsch oracle problem as discussed in lectures (using the
Deutsch-Jozsa Algorithm). Description in section 15.4.1 in (Moore and Mertens, 2011) may also
be useful.
(3 marks)



联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!