apply_gate_kernel

Function apply_gate_kernel 

Source
pub fn apply_gate_kernel(
    state: &HilbertState,
    gate: &Gate,
) -> Result<HilbertState, PhysicsError>
Expand description

Applies a quantum gate to a state: $|\psi’\rangle = U |\psi\rangle$.

§Arguments

  • state - Initial state $|\psi\rangle$.
  • gate - Quantum gate/operator $U$.

§Returns

  • Ok(HilbertState) - New state $|\psi’\rangle$.