Description
This issue focuses on two key enhancements to the TrotterGroup class:
- Implementing second-order Trotterization for continuous quantum operators.
- Adding an optional parameter to offload Trotterization calculations to Rust for performance optimization.
Background
-
First-Order Trotterization (current implementation):
$$e^{A+B} \approx \left(e^{A/N} e^{B/N}\right)^N$$
-
Second-Order Trotterization (proposed enhancement):
$$e^{A+B} \approx \left(e^{A/2N} e^{B/N} e^{A/2N}\right)^N$$
-
Rust Integration: Previously implemented but lost in refactoring, it allows offloading intensive computations to Rust for performance optimization.
Proposed Changes
Rust Code Reference
#[pyfunction]
fn apply_operators_in_place(
py: Python,
state: &PyArray2<Complex64>,
num_steps: usize,
operator_groups: Vec<Vec<&PyArray2<Complex64>>>,
) -> PyResult<PyObject> {
Python-Rust Integration
Additional Resources
Testing
Description
This issue focuses on two key enhancements to the
TrotterGroupclass:Background
Proposed Changes
applymethod in theTrotterGroupclass to implement second-order Trotterization.applymethod to choose between Python and Rust for Trotterization computation.CPTPMap,Channel, andQobj.Rust Code Reference
Python-Rust Integration
apply_operators_in_placeshould be callable from the Pythonapplymethod, with appropriate data structure conversion and error handling.Additional Resources
Testing