use crate::enums::QuantumLevel;
use crate::Primitives;
pub trait Datum<P: Primitives> {
fn value(&self) -> P::NonNegativeInteger;
fn quantum(&self) -> P::PositiveInteger;
fn stratum(&self) -> P::NonNegativeInteger;
fn spectrum(&self) -> &P::String;
type Address: crate::kernel::address::Address<P>;
fn glyph(&self) -> &Self::Address;
}
pub trait Term<P: Primitives> {}
pub trait Triad<P: Primitives> {}
pub trait Literal<P: Primitives>: Term<P> {
type Datum: Datum<P>;
fn denotes(&self) -> &Self::Datum;
}
pub trait Application<P: Primitives>: Term<P> {
type Operation: crate::kernel::op::Operation<P>;
fn operator(&self) -> &Self::Operation;
type Term: Term<P>;
fn argument(&self) -> &[Self::Term];
}
pub trait Ring<P: Primitives> {
fn ring_quantum(&self) -> P::PositiveInteger;
fn modulus(&self) -> P::PositiveInteger;
type Datum: Datum<P>;
fn generator(&self) -> &Self::Datum;
type Involution: crate::kernel::op::Involution<P>;
fn negation(&self) -> &Self::Involution;
fn complement(&self) -> &Self::Involution;
fn at_quantum_level(&self) -> QuantumLevel;
}
pub trait Q1Ring<P: Primitives>: Ring<P> {
fn q1bit_width(&self) -> P::PositiveInteger;
fn q1capacity(&self) -> P::PositiveInteger;
}
pub mod pi1 {
pub const VALUE: i64 = 1;
}
pub mod zero {
pub const VALUE: i64 = 0;
}
pub mod q0 {
pub const BITS_WIDTH: i64 = 8;
pub const CYCLE_SIZE: i64 = 256;
pub const NEXT_LEVEL: &str = "https://uor.foundation/schema/Q1";
pub const QUANTUM_INDEX: i64 = 0;
}
pub mod q1 {
pub const BITS_WIDTH: i64 = 16;
pub const CYCLE_SIZE: i64 = 65536;
pub const LEVEL_SUCCESSOR: &str = "https://uor.foundation/schema/Q0";
pub const NEXT_LEVEL: &str = "https://uor.foundation/schema/Q2";
pub const QUANTUM_INDEX: i64 = 1;
}
pub mod q2 {
pub const BITS_WIDTH: i64 = 24;
pub const CYCLE_SIZE: i64 = 16777216;
pub const LEVEL_SUCCESSOR: &str = "https://uor.foundation/schema/Q1";
pub const NEXT_LEVEL: &str = "https://uor.foundation/schema/Q3";
pub const QUANTUM_INDEX: i64 = 2;
}
pub mod q3 {
pub const BITS_WIDTH: i64 = 32;
pub const CYCLE_SIZE: i64 = 4294967296;
pub const LEVEL_SUCCESSOR: &str = "https://uor.foundation/schema/Q2";
pub const QUANTUM_INDEX: i64 = 3;
}