Function quantum::gates::controlled [] [src]

pub fn controlled(u: &Matrix) -> Gate

A two qubit controlled gate.

See Wikipedia for more information.

Panics

We panic if this supplied matrix isn't of size 2x2.