Closed Aaron-Robertson closed 11 months ago
Alright @matt-lourens, I went through the requested changes and think we're getting pretty close! Everything's running, at least. I'm not quite seeing where we're going wrong at the moment, but will come back to it to troubleshoot this afternoon. Feel free to take a look and review as you see fit. I still need to add the circuits for other frameworks, so that's one TODO on my list.
Otherwise, I'm still playing around with and thinking about our cycle boundary conditions. As implemented, the "open" condition is more in line with the "closed" we discussed this morning, while the "closed" condition is a bit too trivial for my liking. Happy to just remove the "open" option (and move the logic back to "closed"), or implement it based on feedback if you have any specific ideas!
Hey @Aaron-Robertson, Sorry I haven't had a chance to look at the updated code yet but from a quick glance it looks good on the Qpivot implementation side. I wanted to check if you've tried the QFT with Qpivot primitive yet on the example side of the issue and if that is working?
@matt-lourens Great, glad it passes at a glance at least! I'll take another look tonight, but I wasn't getting the expected result with the example side of things. I tested variants of the circuit defined as:
N = 5
u_h = Qunitary(H2, 0, 2)
u_cr = Qunitary(CR2, 0, 2)
h_top = Qpivot(pattern="1*", mapping=u_h)
controlled_rs = Qpivot(pattern="1*", mapping=u_cr, share_weights=False)
hcr = h_top + controlled_rs
qft = Qinit(N) + (hcr + Qmask("1*"))*(N)
circuit = get_circuit(qft)
draw_circuit(circuit)
Fixes #26