| Crates.io | clifford-3-even |
| lib.rs | clifford-3-even |
| version | 0.1.2 |
| created_at | 2025-03-29 19:52:30.876508+00 |
| updated_at | 2025-06-16 12:09:15.452435+00 |
| description | A simple implementation of the even sub-algebra of 3-dimensional clifford algebra, specifically for qubit processing |
| homepage | |
| repository | https://github.com/absoludity/clifford-3-even |
| max_upload_size | |
| id | 1611634 |
| size | 56,681 |
A Rust implementation of simple rotors in the even sub-algebra of Cl(3).
Rotors are mathematical objects used to represent rotations in 3D space. Unlike matrices or quaternions, rotors arise naturally from the geometric product in Clifford Algebra.
A rotor is composed of a scalar part and three bivector components:
r = b_0 + b_x yz + b_y zx + b_z xy = b_0 + b_x Ix + b_y Iy + bz Iz
where:
use clifford_3_even::Rotor;
// Create a rotor representing a rotation around the x-axis by π/4 radians
let r = Rotor::from_axis_angle([1.0, 0.0, 0.0], std::f64::consts::FRAC_PI_4);
// When applied using the sandwich product, this will rotate by π/2 radians
// For example, to rotate a bivector representing the y-axis:
let y_axis = Rotor::new(0.0, 0.0, 1.0, 0.0); // Pure y-axis bivector (e31)
let rotated = r * y_axis * r.reverse();
// rotated will be approximately equal to Rotor::new(0.0, 0.0, 0.0, 1.0) (z-axis)
This project is licensed under either of:
at your option.