2024 Problem Set 2
2024 Problem Set 2
Quantum Implementations
Homework #2: Project - Teleportation and Noise
Submit everything as a single Jupyter notebook unless otherwise noted through Canvas.
In each submission, state all group members names and departments. Collaboration between
groups is encouraged.
1. Teleportation
(a) Prepare the state | i = p1 (|0i + |1i), perform state tomography, visualize the
2
density matrix using both plot state city and plot bloch multivector and
measure its fidelity. Due to the compiling process, state why is this not a true
tomographic measurement?
(b) Optional Prepare the state | i = p1 (|0i + |1i) on N qubits with, N > 3, perform
2
state tomography on each qubit, visualize the density matrix for each qubit using
both plot state city and plot bloch multivector and calculate each qubit
fidelity. Assuming separable states, what is the total fidelity of the N -qubit
system? Does this make sense given the single qubit results in (a)?
(c) Prepare the entangled state p1 (|00i + |11i) from the inital |00i state. Perform
2
state tomography, visualize the density matrix using plot state city, and mea-
sure its fidelity
1
p (|000i + |111i)
2
Comment on the scaling of the fidelity from from one to three qubits. Does it
seem reasonable?
(e) Prepare a three qubit circuit to prepare and teleport the state | i = p1 (|0i + |1i)
2
by preparing and using the state p1 (|00i + |11i). Use the deferred measure-
2
ment method (Fig. 4.15 in N &C) if needed (e.g. The IonQ qpu cannot do
measurements until the end. You need to check for Rigetti). Perform state to-
mography on the final teleported state, visualize the density matrix using both
plot state city and plot bloch multivector, and measure its fidelity[1] In
this case, you cannot use StateTomography because that function performs to-
mography on the 3-qubit state. Modify the teleportation circuit to run the three
measurements on the teleported qubit needed for single qubit tomography.
i. on the Aer simulator (this will work for the standard, measurement-based
teleportation circuit as well).
ii. on the IonQ, Rigetti, and/or Quantinuum simulator.
iii. on the IonQ, Rigetti, and/or Quantinuum qpu/emulator.
Do your results in (c) make sense based on your results in parts (a) and (b)?
3. Modeling Noise
(a) As discussed in class, we can gain a better understanding of noise when we visual-
ize what happens to Bloch sphere under the noise operation. Plot the Bloch sphere
transformation for the two most important noise operations: phase damping and
generalized amplitude damping. Start with the general expression for the single
P
qubit ⇢ in terms of the Bloch wavevector components, calculate "(⇢) = k Ek ⇢Ek† ,
3
and calculate the resultant Bloch vector. You can turn in this calculation in a
separate file from your Jupyter notebook. Plot the resulting Bloch “sphere”.
(b) Qiskit allows you to create a generalized noise model. (Qiskit also has noise models
for several of IBM’s qpus (but beware, it is not reported to be accurate) In this
problem we create a noise model for the IonQ machine based on their published
metrics and then compare our simulated model to the IonQ performance for a
four qubit GHZ state[2]. Follow this tutorial for aid in coding.
i. Create the circuit to make a four qubit GHZ state and measure the outcome
in the measurement basis in the noiseless case. (We are not going to do full
state tomography.) Optional: Estimate the qpu cost for doing the full state
tomography for the 4-qubit GHZ state:
1
p (|0000i + |1111i)
2
ii. Create the noise model.You can assume all gate (single and two qubit) errors
are dephasing errors (phase damping error) or use the full relaxation model
(thermal relaxation error) in which you can pick T2 and the gate times to
give the desired error rate. Do not take into account native gates. Assume all
qubits have the same error rate (which is not so realistic) with a single qubit
state fidelity 99.5% after a single qubit gate and a two-qubit state fidelity of
97.5% after a two-qubit gate. Assume a measurement error is 0.7%. Because
we are not doing full gate set tomography (or randomized benchmarking)
you can justify your noise parameters using a single gate (e.g. H for a single
qubit and create a Bell state for the two-qubit.).
iii. Measure the outcome for the four qubit GHZ state with your noise model.
Use 1,000 shots and 10,000 shots.
iv. Measure the outcome for the four qubit GHZ state on the IonQ simulator
(1,000 and 10,000 shots). Estimate the qpu cost for 1000 shot. Check that
[2] If IonQ’s qpu is down, use the Rigetti qpu or Quantinuum’s emulator. A comparison will not be as fulfilling
but it can still be made.
4
the 1000 shot cost is reasonable (i.e. < $10) before moving on.
v. Measure the outcome for the four qubit GHZ state on the IonQ qpu for 1000
shots. Optional: if the cost for 1000 shots is < $2, you can repeat with 10,000
shots.
vi. Compare your results for the noiseless, simulated noise and real qpu. Discuss
how you might improve your noise model.
[1] You can use state fidelity (include from qiskit.quantum info import state fidelity)
or compute using the definition of fidelity.
Part 2: Yes-Cloning Theorem
Tommy Nguyen
January 16, 2024
Backstory
Kai-Mei and Mark are getting upset by the tardiness of their graduate students.
With a flicker of excitement, Kai-Mei comes up with an idea to make a semi-
broken machine that can photocopy a basis state. ”You can use it to make Bell
pairs!” Kai-Mei tells Mark, ”in fact, we can introduce the photocopier into our
superdense and teleportation protocols to clone graduate students!” Kai-Mei
and Mark start feeding students into the machine.
Coherent protocols
Kai-Mei and Mark are having a bit too much fun feeding graduate students into
the photocopy machine. It’s not very good at photocopying qubits, but it can
copy basis states into new registers in the following way
|ji 7! |ji|ji,
and extending linearly to the whole space. From linearity, you can prove to
yourself that the operator the photocopy machine is applying does not allow for
copying arbitrary states!
Kai-mei wonders if they can use the photocopy machine as a quantum fax
machine instead. *That should be equivalent to quantum teleportation... except
that I wouldn’t need to do any measurements.* They convince Mark to try it
out, sharing with them half of the Bell state
1
| i = p |0ik1 |0im1 + |1ik1 |1im1 .
2
Let’s see how Kai-Mei and Mark get away with this. Kai-mei has a state
| i that they want to transfer to Mark, and half of the Bell pair above. After
doing some operations Z (not a Pauli-Z!) on their two qubits, they can perform
the ‘copier‘ operation that copies basis states into two registers inside the copy
machine’s server. That information is then transfered to Mark’s printer where,
after performing the ‘print‘ operation with his states, he prints the state | i
into his half of the entangled pair.
1
Kai-Mei shows Mark the schematics for the above:
Your task is to build the operator Z that Kai-Mei must perform on their
qubit, as well as the copier and printer operators needed to teleport the state.
For the copier operator, the simplest way is to use the basis copying operator
introduced at the beginning:
|ji|0i 7! |ji|ji,
Challenge code
In this challenge, you will be asked to complete the circuit function.
Input
The inputs of this challenge correspond to the three Euler angles which encode
the state | i that Kai-Mei wants to send. State preparation of | i can be
performed with qiskit’s UGate.
Output
To check the solution, we will calculate the expected value with respect to a
particular observable to see that it coincides with the same one generated by
Kai-Mei. If your solution matches the correct one within the given tolerance
specified in ‘check‘ (in this case it’s a ‘1e-2‘ absolute error tolerance), the output
will be ‘”Correct!”‘ Otherwise, you will receive a ‘”Wrong answer”‘ prompt.