Cardiff School of Computer Science and Informatics
Coursework Assessment Pro-forma
Module Code: CMT304
Module Title: Programming Paradigms
Lecturer: Frank C. Langbein
Assessment Title: Quantum Computing
Assessment Number: 3 of 3
Date Set: 21st March 2022
Submission date and Time: 2nd May 2022 at 9:30am
Return Date: 30th May 2022
Note that there has been a change to the CMT304 module as announced by the module
leader at the start of spring term. This means that there is only one portfolio coursework
this term. So in total there are only three parts of the portfolio coursework and this is the
third and last part.
This assignment is worth 1/3 of the total marks available for this module. If coursework is
submitted late (and where there are no extenuating circumstances):
1. If the assessment is submitted no later than 24 hours after the deadline, the mark for
the assessment will be capped at the minimum pass mark;
2. If the assessment is submitted more than 24 hours after the deadline, a mark of 0 will
be given for the assessment.
Your submission must include the official Coursework Submission Cover sheet, which can
be found here:
All submissions must be via Learning Central. Upload the following files in a single zip file,
Description Type Name
Cover Sheet Compulsory One PDF (.pdf) file [student number].pdf
Report Compulsory One PDF (.pdf) file report.pdf
Any deviation from the submission instructions above (including the number and types of
files submitted) may result in a mark of zero for the assessment or question part.
Staff reserve the right to invite students to a meeting to discuss coursework submissions.
Your submissions will be checked for plagiarism. Your work must be your own and
you must independently solve the problem and submit your own solution. Any other
material or sources of information you use must be referenced. Code and text you
submit will be compared with other submissions and various other sources on and
off the Internet. Any substantial similarities of your submission to unreferenced work
or material not created by yourself will be subject to academic misconduct procedures. Marks will only be assigned for work you have done yourself (incl. finding and
discussing material from references, but not the referenced work).
This is assignment three of a portfolio that will be composed of three assignments. Each
of the three assignments is worth 1/3 , summing up to 100% of the total marks available for
Consider the following quantum circuit:
It consists of two CNOT gates in the middle of the circuit. The two-qubit input quantum
register |x⟩ is in some arbitrary quantum state that forms its input and can be set by the
user. The other two-qubit input quantum register |00⟩ is in the ground state. The gate F is
an unknown quantum operation (this means it is an arbitrary, but fixed gate on two qubits,
but you do not know what it does). The gate F
1. Analyse the operation of the circuit to determine what the values of the two two-qubit
output quantum registers |A⟩ and |B⟩ are, depending on the properties of F and |x⟩.
Clearly justify your answer.
2. Explain how you could, if possible, determine the operation of the gate F from this
circuit (you can execute the circuit as many times as you wish). Furthermore, discuss what this means for the difference between quantum computing and a classical
computing paradigm of your choice (working with bits instead of qubits).
Answers should be provided in a report of up to 500 words. The word limit is an upper limit,
not a target length. Text longer than the word limit may be ignored.
Learning Outcomes Assessed
• Explain the conceptual foundations, evaluate and apply various programming paradigms,
such as logic, functional, scripting, filter-based programming, pattern matching and
quantum computing, to solve practical problems.
• Discuss and contrast the issues, features, design and concepts of a range of programming paradigms and languages to be able to select a suitable programming paradigm
to solve a problem.