pub enum ProcessState {
AcceptingGate,
AcceptingHamiltonian,
ReadyToExecute,
Terminated,
}Expand description
Internal state machine for a Process.
The state advances monotonically; once Terminated no further mutations
are possible. Transitions are triggered by Process::sample,
Process::exp_value, and Process::execute.
Variants§
AcceptingGate
The process is accepting gate instructions via Process::append_block.
This is the initial state.
AcceptingHamiltonian
At least one Hamiltonian expectation-value request has been registered
via Process::exp_value (batch mode, no gradient). Additional
Hamiltonians may still be added.
ReadyToExecute
All measurements are registered and the process is ready to execute. No further gates or Hamiltonian registrations are accepted.
Terminated
The process has been executed and is in a terminal state. No further instructions can be appended or execution triggered.
Trait Implementations§
Source§impl Clone for ProcessState
impl Clone for ProcessState
Source§fn clone(&self) -> ProcessState
fn clone(&self) -> ProcessState
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 moreimpl Copy for ProcessState
Source§impl Debug for ProcessState
impl Debug for ProcessState
Source§impl Default for ProcessState
impl Default for ProcessState
Source§fn default() -> ProcessState
fn default() -> ProcessState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProcessState
impl RefUnwindSafe for ProcessState
impl Send for ProcessState
impl Sync for ProcessState
impl Unpin for ProcessState
impl UnsafeUnpin for ProcessState
impl UnwindSafe for ProcessState
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
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>
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