Skip to main content

is_hermitian

Method of Operator.

is_hermitian() -> bool

Returns true if the operator is Hermitian (self-adjoint).

Returns

true if the operator is Hermitian, false otherwise.

Example

var h1 = is_hermitian(X(0) + Z(0))   // true
var h2 = X(0).is_hermitian() // true
var h3 = is_hermitian(Sgate(0)) // false