Closed rmlarose closed 2 years ago
+1 Sounds like a very reasonable scaling method and I think we should provide it. Possible problem: identity gates may be considered as virtual gates by some backends and in this case the method won't work.
I'm interested in this method. Do we have a use case yet for where it would be better than unitary folding?
In my head unitary folding's advantage is that it duplicates exactly the gates that you were running and so if the noise is not uniform across gates than the unitary folding will still scale things appropriately.
Adding identities could help to effectively simulate a slow execution of a circuit but I agree that, differently from unitary folding, this would be insensitive to the noise model of specific gates. Taking into consideration this fact, maybe it makes more sense to insert entire layers (moments) of identities, instead of appending identities to gates. An identity layer would corresponds to a physical time pause which could effectively scale the effective decoherence time of the qubits (not the gate noise).
@rmlarose @willzeng @andreamari
How do you want the identity gates to be inserted ? If I use the method used for unitary folding i.e. U(U^* U)^n then 2 moments of identities are inserted i.e. n such moments are inserted into the circuit U(I I)^n.
If I instead use U(I)^n then the formula for scale factor changes i.e. this formula calculating needed number of gates will change to (ngates * (scale_factor - 1.0))
. Here, only one moment of identity is inserted.
@purva-thakre I think your second proposal is better and the formula that you suggested should be correct. However, the best way to confirm that everything works as expected is to add many tests :-)
This issue had no activity for 2 months, and will be closed in one week unless there is new activity. Cheers!
Working on this. Should be able to mark above linked PR as ready for review soon.
This issue had no activity for 2 months, and will be closed in one week unless there is new activity. Cheers!
Reopening this because previous linked PR was incomplete and needed a better design. See @andreamari comment (from Discord)
my suggestion is that since folding and id_insertions are actually quite different, it is probably easier to code id_insertions from scratch without necessarily following the existing code of unitary folding
This issue had no activity for 2 months, and will be closed in one week unless there is new activity. Cheers!
This issue had no activity for 2 months, and will be closed in one week unless there is new activity. Cheers!
Thanks @purva-thakre, the RFC looks very good!
Closing this since the RFC has been accepted
@purva-thakre we can move onto opening a list of detailed issued to implement the RFC.
@nathanshammah The RFC does have issues at the end. I am close to finishing off the tests for the scaling function and after this I only have to make changes to the documentation. Do you want me to make 1 issue for the documentation changes ?
Yes, what about opening single issues on github? What about adding one for the documentation like this one https://github.com/unitaryfund/mitiq/issues/1448 (it has sub issues that will be easier to assign and to avoid getting stuck). Btw I think the RFC is quite beautifully explaining the concept and we should try to port as much information as possible (and your diagrams) into the actual docs.
Insert n identity gates in a circuit which scales certain errors by elapsing time. Suggested in recent discussions by alpha users.