commutator_kernel

Function commutator_kernel 

Source
pub fn commutator_kernel(
    a: &Operator,
    b: &Operator,
) -> Result<HilbertState, PhysicsError>
Expand description

Calculates commutator $[A, B] = AB - BA$.

§Arguments

  • a - Operator $A$ (HilbertState/QuantumOperator).
  • b - Operator $B$.

§Returns

  • Result<HilbertState, PhysicsError> - Commutator result.