-
As of cuQuantum 25.03.0, there are several ways to calculate expectation values—i.e., to contract the tensor network corresponding to ⟨ψ|𝐻|ψ⟩ for some operator 𝐻 and quantum circuit state |ψ⟩. In practice, the quality of the contraction path has a significant impact on both the speed and memory consumption of the contraction. When using the from cuquantum import contract
from cuquantum.tensornet import (
OptimizerOptions,
PathFinderOptions,
ReconfigOptions,
SlicerOptions,
)
pathfinder_options = PathFinderOptions(
num_partitions=...,
cutoff_size=...,
algorithm=...,
imbalance_factor=...,
num_iterations=...,
num_cuts=...
)
slicer_options = SlicerOptions(
disable_slicing=...,
memory_model=...,
memory_factor=...,
min_slices=...,
slice_factor=...
)
reconfig_options = ReconfigOptions(
num_iterations=...,
num_leaves=...
)
optimizer_options = OptimizerOptions(
samples=...,
threads=...,
path=pathfinder_options,
slicing=slicer_options,
reconfiguration=reconfig_options,
seed=...,
cost_function=...,
smart=...
)
out = contract(..., optimize=optimizer_options, ...) This allows for fairly fine-grained control over the contraction path optimization process. However, in my case, both the operator 𝐻 and the state |ψ⟩ can be described using only real numbers. As discussed in post #182, the only proper way to enforce a real Another reason for choosing this interface is that it supports a degree of caching in a VQE-like setting, as outlined in the cuQuantum documentation. My question is therefore: is there any way to achieve the same level of control over contraction path optimization when using the Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks for reporting this need. Currently we don't support all these fine-grained control over the path optimization and I will report to the internal dev team |
Beta Was this translation helpful? Give feedback.
Thanks for reporting this need. Currently we don't support all these fine-grained control over the path optimization and I will report to the internal dev team