ppvm-traits 0.1.1

Core traits, the `Config` bundle and the single-qubit Pauli alphabet shared by the ppvm crates.
Documentation
1
2
3
4
5
6
7
8
9
10
// SPDX-FileCopyrightText: 2026 The PPVM Authors
// SPDX-License-Identifier: Apache-2.0

/// Projective Z-basis projectors `|0⟩⟨0|` and `|1⟩⟨1|`.
pub trait Projection {
    /// Project qubit `pos` onto `|0⟩`.
    fn p0(&mut self, pos: usize);
    /// Project qubit `pos` onto `|1⟩`.
    fn p1(&mut self, pos: usize);
}