pub struct CuQuantumConfig {
pub device_id: i32,
pub multi_gpu: bool,
pub num_gpus: usize,
pub memory_pool_size: usize,
pub async_execution: bool,
pub memory_optimization: bool,
pub precision: ComputePrecision,
pub gate_fusion_level: GateFusionLevel,
pub enable_profiling: bool,
pub max_statevec_qubits: usize,
pub tensor_contraction: TensorContractionAlgorithm,
pub enable_tf32: bool,
}Expand description
cuQuantum simulation configuration
Fields§
§device_id: i32Device ID to use (-1 for auto-select)
multi_gpu: boolEnable multi-GPU execution
num_gpus: usizeNumber of GPUs to use (0 for all available)
memory_pool_size: usizeMemory pool size in bytes (0 for auto)
async_execution: boolEnable asynchronous execution
memory_optimization: boolEnable memory optimization (may reduce peak memory)
precision: ComputePrecisionComputation precision
gate_fusion_level: GateFusionLevelGate fusion level
enable_profiling: boolEnable profiling
max_statevec_qubits: usizeMaximum number of qubits for state vector simulation
tensor_contraction: TensorContractionAlgorithmTensor network contraction algorithm
enable_tf32: boolEnable TF32 tensor core mode (NVIDIA Ampere and newer) When enabled, FP32 matrix operations use 19-bit TensorFloat-32 format providing near-FP32 accuracy with ~8x speedup on tensor cores Only effective when device has tensor cores (compute capability ≥ 8.0)
Implementations§
Source§impl CuQuantumConfig
impl CuQuantumConfig
Sourcepub fn large_circuit() -> Self
pub fn large_circuit() -> Self
Create configuration optimized for large circuits
Sourcepub fn variational() -> Self
pub fn variational() -> Self
Create configuration optimized for variational algorithms (VQE/QAOA)
Sourcepub fn with_tf32(self, enable: bool) -> Self
pub fn with_tf32(self, enable: bool) -> Self
Create configuration with TF32 explicitly enabled/disabled
Sourcepub fn should_use_tf32(&self, device_info: &CudaDeviceInfo) -> bool
pub fn should_use_tf32(&self, device_info: &CudaDeviceInfo) -> bool
Check if TF32 should be used based on device capabilities
Trait Implementations§
Source§impl Clone for CuQuantumConfig
impl Clone for CuQuantumConfig
Source§fn clone(&self) -> CuQuantumConfig
fn clone(&self) -> CuQuantumConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CuQuantumConfig
impl Debug for CuQuantumConfig
Auto Trait Implementations§
impl Freeze for CuQuantumConfig
impl RefUnwindSafe for CuQuantumConfig
impl Send for CuQuantumConfig
impl Sync for CuQuantumConfig
impl Unpin for CuQuantumConfig
impl UnwindSafe for CuQuantumConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.