qsharp-runtime icon indicating copy to clipboard operation
qsharp-runtime copied to clipboard

Continuous-angle rotations in open systems simulator

Open cgranade opened this issue 2 years ago • 3 comments

Please describe what you would like the feature to accomplish.
Currently, the open systems simulator supports discrete intrinsic operations such as H, S, or T, but does not yet support intrinsic operations of the form (Double, Qubit) => Unit such as Rx. It would be good to add support for modeling continuous-angle rotations by quantum dynamical semigroups (e.g.: by using dynamical generators in superoperator, Lindblad, or GKS form).

Required steps:

  • [ ] https://github.com/microsoft/qsharp-runtime/issues/915
    • [ ] Implement complex matrix exponentials for small matrices (no bigger than 4 × 4 will be required for this feature)
  • [ ] https://github.com/microsoft/qsharp-runtime/issues/916
    • [ ] Add DynamicalGenerator type to NoiseModel struct
    • [ ] Implement C# and Python serialization for DynamicalGenerator
  • [ ] https://github.com/microsoft/qsharp-runtime/issues/917
    • [ ] Add continuous-angle intrinsics to crate C API
    • [ ] Expose continuous-angle intrinsics through C# simulation runtime

cgranade avatar Jan 25 '22 21:01 cgranade

I'd like to express full support of this feature request and relay some urgency behind it as it would unblock applications such as running VQE (or other chemistry quantum algorithms that involve continuous rotations) through the open systems simulator.

Concrete case in point is the customer project https://github.com/npbauman/COVOs-Azure/blob/guenp/vqe-nb/VQE%20for%20LiH%20-%20debugging-Copy1.ipynb in which continuous rotations arise as part of the quantum algorithm for simulation of the terms of the underlying Hamiltonian. Having the rotations feature would allow to test the behavior of VQE (and other quantum algorithms that involve rotations such as QPE, QAOA, etc). against various noise models which is an important capability as users want to run this in software before they are hitting a hardware device.

@cgranade @bettinaheim @efratshabtai

martinquantum avatar Feb 28 '22 17:02 martinquantum

I would like to just second @martinquantum here, I have a use case where I really need a noisy simulator that can consume QIR to test quantum error mitigation algorithms (not really any options that don't require a lot of novel work). For this I need the continuous angle rotations for the kinds of noise models I am looking at mitigating.

crazy4pi314 avatar Feb 28 '22 17:02 crazy4pi314

I'd like to also express full support for this feature. I am currently working on a VQE program that will run on hardware, and it's been very challenging to debug this without support for an open systems simulator. I would like to be able to run gate set decompositions of the Exp operation, this is currently an intrinsic operation in the Q# simulator, but on hardware it is not; I need a simulator that will run this in the same way as hardware (decomposed using a predetermined gate set).

guenp avatar Mar 14 '22 19:03 guenp