pub struct QftBuilder { /* private fields */ }Expand description
Builder for constructing QFT files with a fluent interface.
§Example
use qft::QftBuilder;
let state = QftBuilder::new(4)
.bond_dimension(128)
.golay(true)
.metadata("author", "Alice")
.metadata("experiment", "VQE")
.build()
.unwrap();Implementations§
Source§impl QftBuilder
impl QftBuilder
Sourcepub fn bond_dimension(self, dim: usize) -> Self
pub fn bond_dimension(self, dim: usize) -> Self
Set the bond dimension.
Sourcepub fn truncation_threshold(self, threshold: f64) -> Self
pub fn truncation_threshold(self, threshold: f64) -> Self
Set the truncation threshold.
Sourcepub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a metadata entry.
Sourcepub fn amplitudes(self, amplitudes: Vec<Complex64>) -> Self
pub fn amplitudes(self, amplitudes: Vec<Complex64>) -> Self
Set initial amplitudes.
Auto Trait Implementations§
impl Freeze for QftBuilder
impl RefUnwindSafe for QftBuilder
impl Send for QftBuilder
impl Sync for QftBuilder
impl Unpin for QftBuilder
impl UnwindSafe for QftBuilder
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
Mutably borrows from an owned value. Read more