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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl From<ProcessState> for &'static CStr
Converts a ProcessState into the corresponding static C string.
impl From<ProcessState> for &'static CStr
Converts a ProcessState into the corresponding static C string.
Maps each variant to a null-terminated &'static CStr:
ProcessState::AcceptingGate→"AcceptingGate"ProcessState::AcceptingHamiltonian→"AcceptingHamiltonian"ProcessState::ReadyToExecute→"ReadyToExecute"ProcessState::Terminated→"Terminated"
The returned pointer is valid for the lifetime of the program and must not be freed.
Source§fn from(value: ProcessState) -> Self
fn from(value: ProcessState) -> Self
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
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 more