Arcelyth/mqc/simulator/result_data does not have a README file

    ResultValue

    pub(open) trait ResultValue {
    fn type_name(Self) -> String
    fn try_statevector(Self) -> StateVector? = _
    }

    ResultData

    pub struct ResultData {
    values :
    HashMap
    [String, &ResultValue]
    }

    Named output data from one experiment. Only requested outputs are stored.

    ResultData::new

    fn ResultData::new() -> ResultData

    StateVector

    pub struct StateVector {
    shape : Array[UInt]
    re : Array[Double]
    im : Array[Double]
    }

    A quantum state represented by a complex state vector.

    For example, a two-qubit state |ψ⟩ = (|00⟩ + |11⟩) / √2:

    shape = [2, 2] re = [1/√2, 0, 0, 1/√2] im = [0, 0, 0, 0]

    The entries are stored in basis-state order: |00⟩, |01⟩, |10⟩, |11⟩.

    StateVector::amplitude

    Read one complex amplitude by basis index.

    StateVector::amplitudes

    Copy all amplitudes into a new array in mixed-radix basis order.

    StateVector::basis

    fn StateVector::basis(dimensions : Array[UInt], index : Int) -> StateVector raise
    QuantumError

    StateVector::dimension

    fn StateVector::dimension(self : StateVector) -> Int

    Return the product of the wire dimensions, the number of basis states.

    StateVector::dimensions

    fn StateVector::dimensions(self : StateVector) -> Array[UInt]

    StateVector::from_amplitudes

    fn StateVector::from_amplitudes(dimensions : Array[UInt], amplitudes : Array[
    Complex
    ], tolerance? : Double) -> StateVector raise
    QuantumError

    Accept only a finite, normalized state. Input amplitudes are copied. Require exactly one amplitude per basis state and a finite tolerance in (0, 1e-6].

    StateVector::inner_product

    Sum conjugate(self.amplitude(i)) * other.amplitude(i) over basis indices.

    StateVector::norm_squared

    fn StateVector::norm_squared(self : StateVector) -> Double

    Sum squared amplitude magnitudes with compensated accumulation.

    StateVector::probabilities

    fn StateVector::probabilities(self : StateVector) -> Array[Double]

    Return squared amplitude magnitudes in basis order.

    StateVector::try_statevector

    fn StateVector::try_statevector(self : StateVector) -> StateVector?

    Expose saved-value capabilities on immutable pure states.

    StateVector::type_name

    fn StateVector::type_name(_self : StateVector) -> String

    Expose saved-value capabilities on immutable pure states.

    StateVector::zero

    evolve

    Execute unitary kernels. Terminal measurements leave the returned state unchanged. The first wire is the most significant basis digit.