Closed babbush closed 7 years ago
I implemented the emulation feature for QubitTerm
, allowing to apply an n-qubit Pauli gate and thus also time evolution via the decomposition cos(theta)*Id + sin(theta)*pauli_term
. The problem is that applying such a large gate is slower than performing individual gates. So the first version will simply compile & simulate QubitTerm
s instead (Damian is working on that).
I still think the emulation feature for QubitOperator makes sense, so implementing some nice expmv is next.
Great, thanks Thomas. I think this is to be expected. Was your emulation feature in C++ or python?
In C++ and it actually depends very much on the number of pauli gates. When applying only a few pauli gates at once, there's at most a 2x speedup -- but this speedup we also get from the simulator right away when we enable gate fusion. So there's no point in having a specialized emulation implementation for terms.
We need a class in ProjectQ which can directly apply the ProjectQ implementation of QubitOperator to a state vector. This will enable use to quickly simulate circuits or get the lowest eigenvalues of QubitOperators.