pub struct ReducedDensityMatrix {
pub qubits: Vec<usize>,
pub data: Vec<Complex64>,
pub metadata: RunMetadata,
}Expand description
Reduced density matrix of a qubit subset, returned by
Simulate::reduced_density_matrix.
Fields§
§qubits: Vec<usize>The subsystem as it was requested, which fixes the index order below.
data: Vec<Complex64>Row major with side 2^k over k = qubits.len(): data[t * 2^k + t']
is <t|rho|t'>, where bit i of t is the state of qubits[i], so
qubits[0] is the lowest bit as q[0] is in a basis index. Trace one,
Hermitian to rounding.
metadata: RunMetadataImplementations§
Trait Implementations§
Source§impl Clone for ReducedDensityMatrix
impl Clone for ReducedDensityMatrix
Source§fn clone(&self) -> ReducedDensityMatrix
fn clone(&self) -> ReducedDensityMatrix
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReducedDensityMatrix
impl RefUnwindSafe for ReducedDensityMatrix
impl Send for ReducedDensityMatrix
impl Sync for ReducedDensityMatrix
impl Unpin for ReducedDensityMatrix
impl UnsafeUnpin for ReducedDensityMatrix
impl UnwindSafe for ReducedDensityMatrix
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
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> ⓘ
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 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> ⓘ
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