qleisli 0.2.2

Experimental quantum language with linear ownership, exact contracts and independent finite IR verification
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Total finite basis functions, implemented as ordinary checked source.
//!
//! These functions take basis labels, not quantum owners or measurement results.
//! Importing them grants no quantum primitive or verification privilege.
//! Contracts and finite regression status: docs/stdlib-contracts.md, B001-B002.

/// Return x xor y for all four pairs of Bit inputs.
/// This two-argument map is total but not injective on the product domain.
/// A coherent lift must check injectivity of its complete enclosing map.
pub basis fn xor2(x: Bit, y: Bit) -> Bit { x xor y }

/// Return x and y for all four pairs of Bit inputs.
/// This total, noninjective predicate can describe reversible XOR computation
/// into an auxiliary; calling it does not measure a quantum register.
pub basis fn and2(x: Bit, y: Bit) -> Bit { x and y }