Hi! I’ve been working on the Coding Challenges and I have doubts about the results in Revisiting Schrodinger’s cat.

I’ll try to ask my question without revealing too much of the code and keep the challenge interesting.

As I understand it, the challenge asks for an optimization of the parameters of the U3 gate, such that: if the state |0\rangle is read on the “atom” qubit, then the “cat” qubit is known to be in |+\rangle.

Initially, I made my algorithm such that it optimized the U3 parameters to minimize err:

diff = evolve\_atom\_cat(unitary, params) - [ \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, 0 ,0]

err = \overline{|diff|}

I tried multiple optimization methods but didn’t get them to converge.

- Is it possible to optimize the parameters of the U3 such that it creates the state [ \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, 0 ,0]?

Instead, I figured I could optimize them such that the probability of p(|00\rangle) == p(|01\rangle), which means there’s a superposition on the ‘cat’ qubit. This passes the tests… However, I’m not convinced this is the right answer.

- Does p(|00\rangle) == p(|01\rangle) guarantee that reading ‘atom’ as |0\rangle, we have 50% probability of sampling ‘cat’ in 0 or 1, i.e. it’s in the |+⟩ state?