pub struct Config {
pub hamiltonian_type: Option<String>,
pub qubits: Vec<String>,
pub compute_resource: Option<String>,
pub cpu_cores: Option<usize>,
pub seed: Option<u64>,
pub parameters: Parameters,
pub initial_states: Vec<Vec<String>>,
pub target_states: Targets,
pub optimization: Optimization,
}Expand description
A complete optimisation problem.
Fields§
§hamiltonian_type: Option<String>The physical platform: spin_chain, superconducting or duffing_transmon. Absent means the Python
package’s original spin-chain path, whose default coupling is Z.
qubits: Vec<String>One name per qubit; the count sets the number of qubits.
compute_resource: Option<String>cpu or gpu. This version always computes on the CPU.
cpu_cores: Option<usize>Number of CPU threads to use natively. Absent means all of them.
seed: Option<u64>Seed for every random choice in a run. Absent means one is drawn from the clock.
parameters: ParametersPhysical and pulse parameters.
initial_states: Vec<Vec<String>>Initial states: for each, one axis (Z, -Z, X, -X, Y, -Y) per qubit.
target_states: TargetsWhat each initial state should become.
optimization: OptimizationOptimiser settings.
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_json(json: &str) -> Result<Config>
pub fn from_json(json: &str) -> Result<Config>
Parse a configuration. Only the JSON syntax and field types are checked; see validate.
Sourcepub fn is_dissipative(&self) -> bool
pub fn is_dissipative(&self) -> bool
Whether T1/T2 relaxation is on.
Sourcepub fn space(&self) -> Space
pub fn space(&self) -> Space
The effective state space: dissipative runs are always in Liouville space.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
impl<T> SendAlias for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.