NoiseAwareOptimizer

Struct NoiseAwareOptimizer 

Source
pub struct NoiseAwareOptimizer { /* private fields */ }
Expand description

Comprehensive noise-aware optimization pass manager

Implementations§

Source§

impl NoiseAwareOptimizer

Source

pub fn new(noise_model: NoiseModel) -> Self

Create a new noise-aware optimizer

Examples found in repository?
examples/noise_optimization_demo.rs (line 48)
44fn demo_uniform_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
45    println!("--- Uniform Noise Model ---");
46
47    let noise_model = NoiseModel::uniform(4);
48    let optimizer = NoiseAwareOptimizer::new(noise_model.clone());
49
50    println!("Noise characteristics:");
51    println!(
52        "  Single-qubit error rate: {:.2e}",
53        noise_model.single_qubit_error(0)
54    );
55    println!(
56        "  Two-qubit error rate: {:.2e}",
57        noise_model.two_qubit_error(0, 1)
58    );
59    println!("  T1 time: {:.1} μs", noise_model.t1_time(0));
60    println!("  T2 time: {:.1} μs", noise_model.t2_time(0));
61    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
62
63    let original_fidelity = optimizer.estimate_fidelity(circuit);
64    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
65
66    let optimized = optimizer.optimize(circuit)?;
67    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
68    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
69
70    if optimized_fidelity > original_fidelity {
71        println!(
72            "✓ Fidelity improved by {:.4}",
73            optimized_fidelity - original_fidelity
74        );
75    } else {
76        println!("→ No fidelity improvement (circuit already optimal)");
77    }
78
79    println!();
80    Ok(())
81}
82
83fn demo_ibm_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
84    println!("--- IBM-like Noise Model ---");
85
86    let noise_model = NoiseModel::ibm_like(4);
87    let coupling_map = CouplingMap::linear(4);
88    let optimizer = NoiseAwareOptimizer::new(noise_model.clone()).with_coupling_map(coupling_map);
89
90    println!("IBM-like noise characteristics:");
91    println!(
92        "  Single-qubit error rate: {:.2e}",
93        noise_model.single_qubit_error(0)
94    );
95    println!(
96        "  Two-qubit error rate (adjacent): {:.2e}",
97        noise_model.two_qubit_error(0, 1)
98    );
99    println!("  Hadamard gate time: {:.1} ns", noise_model.gate_time("H"));
100    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
101
102    let original_fidelity = optimizer.estimate_fidelity(circuit);
103    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
104
105    let optimized = optimizer.optimize(circuit)?;
106    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
107    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
108
109    println!("Available optimization passes:");
110    for pass in optimizer.get_passes() {
111        println!("  - {}", pass.name());
112    }
113
114    println!();
115    Ok(())
116}
117
118fn demo_noise_aware_cost_model(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
119    println!("--- Noise-Aware Cost Analysis ---");
120
121    let uniform_noise = NoiseModel::uniform(4);
122    let ibm_noise = NoiseModel::ibm_like(4);
123
124    let uniform_cost_model = NoiseAwareCostModel::new(uniform_noise);
125    let ibm_cost_model = NoiseAwareCostModel::new(ibm_noise);
126
127    let uniform_cost = uniform_cost_model.circuit_cost(circuit);
128    let ibm_cost = ibm_cost_model.circuit_cost(circuit);
129
130    println!("Circuit costs with different noise models:");
131    println!("  Uniform noise model: {:.2}", uniform_cost);
132    println!("  IBM-like noise model: {:.2}", ibm_cost);
133
134    // Analyze individual gate costs
135    println!("\nGate-by-gate cost analysis (IBM model):");
136    for (i, gate) in circuit.gates().iter().enumerate() {
137        let gate_cost = ibm_cost_model.gate_cost(gate.as_ref());
138        println!("  Gate {}: {} - Cost: {:.2}", i, gate.name(), gate_cost);
139    }
140
141    println!();
142    Ok(())
143}
144
145fn demo_noise_optimization_passes(
146    circuit: &Circuit<4>,
147) -> quantrs2_core::error::QuantRS2Result<()> {
148    println!("--- Individual Optimization Passes ---");
149
150    let noise_model = NoiseModel::ibm_like(4);
151    let coupling_map = CouplingMap::linear(4);
152
153    // Test coherence optimization
154    let coherence_opt = CoherenceOptimization::new(noise_model.clone());
155    let cost_model = NoiseAwareCostModel::new(noise_model.clone());
156
157    if coherence_opt.should_apply() {
158        let coherence_result = coherence_opt.apply(circuit, &cost_model)?;
159        println!("✓ Coherence optimization applied");
160        println!("  Original gates: {}", circuit.num_gates());
161        println!("  After coherence opt: {}", coherence_result.num_gates());
162    }
163
164    // Test noise-aware mapping
165    let mapping_opt = NoiseAwareMapping::new(noise_model.clone(), coupling_map.clone());
166    if mapping_opt.should_apply() {
167        let mapping_result = mapping_opt.apply(circuit, &cost_model)?;
168        println!("✓ Noise-aware mapping applied");
169        println!("  Original gates: {}", circuit.num_gates());
170        println!("  After mapping opt: {}", mapping_result.num_gates());
171    }
172
173    // Test dynamical decoupling
174    let dd_opt = DynamicalDecoupling::new(noise_model.clone());
175    if dd_opt.should_apply() {
176        let dd_result = dd_opt.apply(circuit, &cost_model)?;
177        println!("✓ Dynamical decoupling applied");
178        println!("  Original gates: {}", circuit.num_gates());
179        println!("  After DD insertion: {}", dd_result.num_gates());
180    }
181
182    println!();
183    Ok(())
184}
185
186fn demo_fidelity_comparison() -> quantrs2_core::error::QuantRS2Result<()> {
187    println!("--- Fidelity Comparison Across Noise Models ---");
188
189    // Create circuits of different complexity
190    let circuits = vec![
191        create_simple_circuit()?,
192        create_medium_circuit()?,
193        create_complex_circuit()?,
194    ];
195
196    let noise_models = vec![
197        ("Ideal", NoiseModel::new()),
198        ("Uniform", NoiseModel::uniform(4)),
199        ("IBM-like", NoiseModel::ibm_like(4)),
200    ];
201
202    println!(
203        "{:<12} {:<8} {:<8} {:<8}",
204        "Circuit", "Ideal", "Uniform", "IBM-like"
205    );
206    println!("{:-<40}", "");
207
208    for (i, circuit) in circuits.iter().enumerate() {
209        let circuit_name = match i {
210            0 => "Simple",
211            1 => "Medium",
212            2 => "Complex",
213            _ => "Unknown",
214        };
215
216        print!("{:<12}", circuit_name);
217
218        for (_, noise_model) in &noise_models {
219            let optimizer = NoiseAwareOptimizer::new(noise_model.clone());
220            let fidelity = optimizer.estimate_fidelity(circuit);
221            print!(" {:<8.4}", fidelity);
222        }
223        println!();
224    }
225
226    println!();
227    Ok(())
228}
Source

pub fn with_coupling_map(self, coupling_map: CouplingMap) -> Self

Set the coupling map

Examples found in repository?
examples/noise_optimization_demo.rs (line 88)
83fn demo_ibm_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
84    println!("--- IBM-like Noise Model ---");
85
86    let noise_model = NoiseModel::ibm_like(4);
87    let coupling_map = CouplingMap::linear(4);
88    let optimizer = NoiseAwareOptimizer::new(noise_model.clone()).with_coupling_map(coupling_map);
89
90    println!("IBM-like noise characteristics:");
91    println!(
92        "  Single-qubit error rate: {:.2e}",
93        noise_model.single_qubit_error(0)
94    );
95    println!(
96        "  Two-qubit error rate (adjacent): {:.2e}",
97        noise_model.two_qubit_error(0, 1)
98    );
99    println!("  Hadamard gate time: {:.1} ns", noise_model.gate_time("H"));
100    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
101
102    let original_fidelity = optimizer.estimate_fidelity(circuit);
103    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
104
105    let optimized = optimizer.optimize(circuit)?;
106    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
107    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
108
109    println!("Available optimization passes:");
110    for pass in optimizer.get_passes() {
111        println!("  - {}", pass.name());
112    }
113
114    println!();
115    Ok(())
116}
Source

pub fn get_passes(&self) -> Vec<Box<dyn OptimizationPass>>

Get all noise-aware optimization passes

Examples found in repository?
examples/noise_optimization_demo.rs (line 110)
83fn demo_ibm_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
84    println!("--- IBM-like Noise Model ---");
85
86    let noise_model = NoiseModel::ibm_like(4);
87    let coupling_map = CouplingMap::linear(4);
88    let optimizer = NoiseAwareOptimizer::new(noise_model.clone()).with_coupling_map(coupling_map);
89
90    println!("IBM-like noise characteristics:");
91    println!(
92        "  Single-qubit error rate: {:.2e}",
93        noise_model.single_qubit_error(0)
94    );
95    println!(
96        "  Two-qubit error rate (adjacent): {:.2e}",
97        noise_model.two_qubit_error(0, 1)
98    );
99    println!("  Hadamard gate time: {:.1} ns", noise_model.gate_time("H"));
100    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
101
102    let original_fidelity = optimizer.estimate_fidelity(circuit);
103    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
104
105    let optimized = optimizer.optimize(circuit)?;
106    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
107    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
108
109    println!("Available optimization passes:");
110    for pass in optimizer.get_passes() {
111        println!("  - {}", pass.name());
112    }
113
114    println!();
115    Ok(())
116}
Source

pub fn optimize<const N: usize>( &self, circuit: &Circuit<N>, ) -> QuantRS2Result<Circuit<N>>

Optimize a circuit with noise awareness

Examples found in repository?
examples/noise_optimization_demo.rs (line 66)
44fn demo_uniform_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
45    println!("--- Uniform Noise Model ---");
46
47    let noise_model = NoiseModel::uniform(4);
48    let optimizer = NoiseAwareOptimizer::new(noise_model.clone());
49
50    println!("Noise characteristics:");
51    println!(
52        "  Single-qubit error rate: {:.2e}",
53        noise_model.single_qubit_error(0)
54    );
55    println!(
56        "  Two-qubit error rate: {:.2e}",
57        noise_model.two_qubit_error(0, 1)
58    );
59    println!("  T1 time: {:.1} μs", noise_model.t1_time(0));
60    println!("  T2 time: {:.1} μs", noise_model.t2_time(0));
61    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
62
63    let original_fidelity = optimizer.estimate_fidelity(circuit);
64    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
65
66    let optimized = optimizer.optimize(circuit)?;
67    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
68    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
69
70    if optimized_fidelity > original_fidelity {
71        println!(
72            "✓ Fidelity improved by {:.4}",
73            optimized_fidelity - original_fidelity
74        );
75    } else {
76        println!("→ No fidelity improvement (circuit already optimal)");
77    }
78
79    println!();
80    Ok(())
81}
82
83fn demo_ibm_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
84    println!("--- IBM-like Noise Model ---");
85
86    let noise_model = NoiseModel::ibm_like(4);
87    let coupling_map = CouplingMap::linear(4);
88    let optimizer = NoiseAwareOptimizer::new(noise_model.clone()).with_coupling_map(coupling_map);
89
90    println!("IBM-like noise characteristics:");
91    println!(
92        "  Single-qubit error rate: {:.2e}",
93        noise_model.single_qubit_error(0)
94    );
95    println!(
96        "  Two-qubit error rate (adjacent): {:.2e}",
97        noise_model.two_qubit_error(0, 1)
98    );
99    println!("  Hadamard gate time: {:.1} ns", noise_model.gate_time("H"));
100    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
101
102    let original_fidelity = optimizer.estimate_fidelity(circuit);
103    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
104
105    let optimized = optimizer.optimize(circuit)?;
106    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
107    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
108
109    println!("Available optimization passes:");
110    for pass in optimizer.get_passes() {
111        println!("  - {}", pass.name());
112    }
113
114    println!();
115    Ok(())
116}
Source

pub fn estimate_fidelity<const N: usize>(&self, circuit: &Circuit<N>) -> f64

Estimate circuit fidelity

Examples found in repository?
examples/noise_optimization_demo.rs (line 63)
44fn demo_uniform_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
45    println!("--- Uniform Noise Model ---");
46
47    let noise_model = NoiseModel::uniform(4);
48    let optimizer = NoiseAwareOptimizer::new(noise_model.clone());
49
50    println!("Noise characteristics:");
51    println!(
52        "  Single-qubit error rate: {:.2e}",
53        noise_model.single_qubit_error(0)
54    );
55    println!(
56        "  Two-qubit error rate: {:.2e}",
57        noise_model.two_qubit_error(0, 1)
58    );
59    println!("  T1 time: {:.1} μs", noise_model.t1_time(0));
60    println!("  T2 time: {:.1} μs", noise_model.t2_time(0));
61    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
62
63    let original_fidelity = optimizer.estimate_fidelity(circuit);
64    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
65
66    let optimized = optimizer.optimize(circuit)?;
67    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
68    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
69
70    if optimized_fidelity > original_fidelity {
71        println!(
72            "✓ Fidelity improved by {:.4}",
73            optimized_fidelity - original_fidelity
74        );
75    } else {
76        println!("→ No fidelity improvement (circuit already optimal)");
77    }
78
79    println!();
80    Ok(())
81}
82
83fn demo_ibm_noise(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
84    println!("--- IBM-like Noise Model ---");
85
86    let noise_model = NoiseModel::ibm_like(4);
87    let coupling_map = CouplingMap::linear(4);
88    let optimizer = NoiseAwareOptimizer::new(noise_model.clone()).with_coupling_map(coupling_map);
89
90    println!("IBM-like noise characteristics:");
91    println!(
92        "  Single-qubit error rate: {:.2e}",
93        noise_model.single_qubit_error(0)
94    );
95    println!(
96        "  Two-qubit error rate (adjacent): {:.2e}",
97        noise_model.two_qubit_error(0, 1)
98    );
99    println!("  Hadamard gate time: {:.1} ns", noise_model.gate_time("H"));
100    println!("  CNOT gate time: {:.1} ns", noise_model.gate_time("CNOT"));
101
102    let original_fidelity = optimizer.estimate_fidelity(circuit);
103    println!("\nOriginal circuit fidelity: {:.4}", original_fidelity);
104
105    let optimized = optimizer.optimize(circuit)?;
106    let optimized_fidelity = optimizer.estimate_fidelity(&optimized);
107    println!("Optimized circuit fidelity: {:.4}", optimized_fidelity);
108
109    println!("Available optimization passes:");
110    for pass in optimizer.get_passes() {
111        println!("  - {}", pass.name());
112    }
113
114    println!();
115    Ok(())
116}
117
118fn demo_noise_aware_cost_model(circuit: &Circuit<4>) -> quantrs2_core::error::QuantRS2Result<()> {
119    println!("--- Noise-Aware Cost Analysis ---");
120
121    let uniform_noise = NoiseModel::uniform(4);
122    let ibm_noise = NoiseModel::ibm_like(4);
123
124    let uniform_cost_model = NoiseAwareCostModel::new(uniform_noise);
125    let ibm_cost_model = NoiseAwareCostModel::new(ibm_noise);
126
127    let uniform_cost = uniform_cost_model.circuit_cost(circuit);
128    let ibm_cost = ibm_cost_model.circuit_cost(circuit);
129
130    println!("Circuit costs with different noise models:");
131    println!("  Uniform noise model: {:.2}", uniform_cost);
132    println!("  IBM-like noise model: {:.2}", ibm_cost);
133
134    // Analyze individual gate costs
135    println!("\nGate-by-gate cost analysis (IBM model):");
136    for (i, gate) in circuit.gates().iter().enumerate() {
137        let gate_cost = ibm_cost_model.gate_cost(gate.as_ref());
138        println!("  Gate {}: {} - Cost: {:.2}", i, gate.name(), gate_cost);
139    }
140
141    println!();
142    Ok(())
143}
144
145fn demo_noise_optimization_passes(
146    circuit: &Circuit<4>,
147) -> quantrs2_core::error::QuantRS2Result<()> {
148    println!("--- Individual Optimization Passes ---");
149
150    let noise_model = NoiseModel::ibm_like(4);
151    let coupling_map = CouplingMap::linear(4);
152
153    // Test coherence optimization
154    let coherence_opt = CoherenceOptimization::new(noise_model.clone());
155    let cost_model = NoiseAwareCostModel::new(noise_model.clone());
156
157    if coherence_opt.should_apply() {
158        let coherence_result = coherence_opt.apply(circuit, &cost_model)?;
159        println!("✓ Coherence optimization applied");
160        println!("  Original gates: {}", circuit.num_gates());
161        println!("  After coherence opt: {}", coherence_result.num_gates());
162    }
163
164    // Test noise-aware mapping
165    let mapping_opt = NoiseAwareMapping::new(noise_model.clone(), coupling_map.clone());
166    if mapping_opt.should_apply() {
167        let mapping_result = mapping_opt.apply(circuit, &cost_model)?;
168        println!("✓ Noise-aware mapping applied");
169        println!("  Original gates: {}", circuit.num_gates());
170        println!("  After mapping opt: {}", mapping_result.num_gates());
171    }
172
173    // Test dynamical decoupling
174    let dd_opt = DynamicalDecoupling::new(noise_model.clone());
175    if dd_opt.should_apply() {
176        let dd_result = dd_opt.apply(circuit, &cost_model)?;
177        println!("✓ Dynamical decoupling applied");
178        println!("  Original gates: {}", circuit.num_gates());
179        println!("  After DD insertion: {}", dd_result.num_gates());
180    }
181
182    println!();
183    Ok(())
184}
185
186fn demo_fidelity_comparison() -> quantrs2_core::error::QuantRS2Result<()> {
187    println!("--- Fidelity Comparison Across Noise Models ---");
188
189    // Create circuits of different complexity
190    let circuits = vec![
191        create_simple_circuit()?,
192        create_medium_circuit()?,
193        create_complex_circuit()?,
194    ];
195
196    let noise_models = vec![
197        ("Ideal", NoiseModel::new()),
198        ("Uniform", NoiseModel::uniform(4)),
199        ("IBM-like", NoiseModel::ibm_like(4)),
200    ];
201
202    println!(
203        "{:<12} {:<8} {:<8} {:<8}",
204        "Circuit", "Ideal", "Uniform", "IBM-like"
205    );
206    println!("{:-<40}", "");
207
208    for (i, circuit) in circuits.iter().enumerate() {
209        let circuit_name = match i {
210            0 => "Simple",
211            1 => "Medium",
212            2 => "Complex",
213            _ => "Unknown",
214        };
215
216        print!("{:<12}", circuit_name);
217
218        for (_, noise_model) in &noise_models {
219            let optimizer = NoiseAwareOptimizer::new(noise_model.clone());
220            let fidelity = optimizer.estimate_fidelity(circuit);
221            print!(" {:<8.4}", fidelity);
222        }
223        println!();
224    }
225
226    println!();
227    Ok(())
228}
Source

pub fn noise_model(&self) -> &NoiseModel

Get the noise model

Source

pub fn cost_model(&self) -> &NoiseAwareCostModel

Get the cost model

Trait Implementations§

Source§

impl Debug for NoiseAwareOptimizer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Ungil for T
where T: Send,