Fix #206 and improve Trotter–Suzuki code quality.#207
Conversation
guanghaolow
left a comment
There was a problem hiding this comment.
Thanks for cleaning up the code + documentation Chris. I've added a correction on where the indexing convention differs.
| /// [quant-ph/0508139](https://arxiv.org/abs/quant-ph/0508139). In | ||
| /// particular, `DecomposedIntoTimeStepsCA(_, 4)` corresponds to the | ||
| /// propagator $S_2(\lambda)$ in quant-ph/0508139. | ||
| /// |
There was a problem hiding this comment.
DecomposedIntoTimeStepsCA(_, 4) actually corresponds to
The difference in indexing occurs in the definition of _TrotterStepSize(order: Int).
Whereas we set let stepSizeOuter = _TrotterStepSize(order); in the implementation of _TrotterArbitraryImplCA<'T>, they define the function _AlternateStepSize(order: Int) such that our stepSizeOuter is equal to _AlternateStepSize(order/2).
There was a problem hiding this comment.
Thanks, my apologies for misunderstanding where the index convention differed. I'll fix that, then.
|
@guanghaolow: Thanks for double-checking and for catching the indexing error. I've expanded a lot to help prevent that confusion in the future, if you could please take another quick look. Thanks! |
|
@guanghaolow: Would you be willing to take a look at this again? Thanks for the help! |
This PR fixes #206 by adding in an appropriate
/// # Remarknoting the 𝑘–2𝑘 dichotomy. This PR also improves code quality in the Trotter–Suzuki decomposition feature more generally and renamesDecomposeIntoTimeStepsCA→DecomposedIntoTimeStepsCAto reflect that this feature is a exposed as a function that returns a new evolution operation.