Skip to main content
This is a list of the classical types that are built-in in Qmod. For more information regarding classical types see: classical types. Members:

Pauli

Enumeration for the Pauli matrices used in quantum computing. Represents the four Pauli matrices used in quantum mechanics: Identity (I), X, Y, and Z operators. The Pauli matrices are defined as: I=(1001)I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} X=(0110)X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} Y=(0ii0)Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} Z=(1001)Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} Attributes:

PauliTerm

A term in a Hamiltonian, represented as a product of single-qubit Pauli matrices. Attributes:

IndexedPauli

A single-qubit Pauli matrix on a specific qubit given by its index. Attributes:

SparsePauliTerm

A term in the Hamiltonian, represented as a sparse product of single-qubit Pauli matrices. Attributes: paulis (CArray[IndexedPauli]): The list of chosen sparse Pauli operators in the term corresponds to a product of them. (See IndexedPauli) coefficient (CReal): The coefficient of the term (floating number). Methods: Attributes:

cmp_paulis

cmp_paulis(
a: SparsePauliTerm,
b: SparsePauliTerm
) -> int
Parameters:

SparsePauliOp

Represents a collection of sparse Pauli operators. Methods: Attributes:

get_tuples_representation

get_tuples_representation(
self: ,
reverse_order: bool
) -> list[tuple[str, int | float | complex]]
Parameters: options: show_source: false show_if_no_docstring: false Members:

SparsePauliOp

Represents a collection of sparse Pauli operators. Methods: Attributes:

get_tuples_representation

get_tuples_representation(
self: ,
reverse_order: bool
) -> list[tuple[str, int | float | complex]]
Parameters:

Pauli

Enumeration for the Pauli matrices used in quantum computing. Represents the four Pauli matrices used in quantum mechanics: Identity (I), X, Y, and Z operators. The Pauli matrices are defined as: I=(1001)I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} X=(0110)X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} Y=(0ii0)Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} Z=(1001)Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} Attributes: