This problem set practises Lecture 7. It works with the course library LeanFV.Quantum: kets, brackets, the Pauli matrices, CNOT and the no-cloning theorem.

How to work on it. Open the lean/ folder in VS Code with the Lean 4 extension, then open LeanFV/Homework/HW03.lean. Each problem below names its theorem in that file, such as HW03.Z_mul_X. Replace each sorry with a proof. You can also work in a notebook: start it with leanmagic.setup("import LeanFV.Homework.HW03"), as in Notebook 7. Solutions are collapsed. Many proofs are correct, and yours need not match.

The file starts with the header below, so every name from the library is in scope. The solutions on this page assume it too.

import LeanFV.Quantum.NoCloning
 
open Matrix Complex LeanFV.Quantum

Pauli identities

Problem 1 (Z times X).

Prove (HW03.Z_mul_X).

Problem 2 (Y and X anticommute).

Prove (HW03.Y_mul_X).

Problem 3 (The commutator of X and Y).

Prove (HW03.commutator_X_Y) without unfolding X, Y or Z. Use Y_mul_X from Problem 2 and the library lemma X_mul_Y : X * Y = I • Z.

Problem 4 (Y is Hermitian).

Prove (HW03.Y_conjTranspose). In Lean, Yᴴ is the conjugate transpose.

Problem 5 (Y is unitary).

Prove Y ∈ unitaryGroup (Fin 2) ℂ (HW03.Y_mem_unitaryGroup).

A normalised state

The homework file defines a second qubit state, . It is marked noncomputable because division in is (Notebook 7 shows why).

noncomputable def ketA : Ket (Fin 2) := ![3 / 5, 4 / 5 * I]
Problem 6 (ketA is normalised).

Prove braket ketA ketA = 1 (HW03.braket_ketA).

Problem 7 (The overlap with ket0).

Prove braket ket0 ketA = 3 / 5 (HW03.braket_ket0_ketA).

No-cloning

Problem 8 (No machine clones both).

Show that no unitary clones both ket0 and ketA onto the same normalised blank state (HW03.not_clones_ket0_and_ketA). The statement is ¬ (Clones U s ket0 ∧ Clones U s ketA), for any U in the unitary group and any s with braket s s = 1.

Problem 9 (CNOT does not clone (1, 1)).

Prove ¬ Clones CNOT ket0 ![1, 1] (HW03.CNOT_not_clones). Before you start, explain why no_cloning cannot do this for you.