View source on GitHub |
Represents an operator defined by the exponential of a PauliSum.
cirq.PauliSumExponential(
pauli_sum_like: 'cirq.PauliSumLike',
exponent: Union[int, float, sympy.Expr] = 1,
atol: float = 1e-08
)
Used in the notebooks
Used in the tutorials |
---|
Given a hermitian/anti-hermitian PauliSum PS_1 + PS_2 + ... + PS_N, this class returns an operation which is equivalent to exp(j * exponent * (PS_1 + PS_2 + ... + PS_N)).
This class only supports commuting Pauli terms.
Attributes | |
---|---|
qubits
|
Methods
matrix
matrix() -> np.ndarray
Reconstructs matrix of self from underlying Pauli sum exponentials.
Raises | |
---|---|
ValueError
|
if exponent is parameterized. |
with_qubits
with_qubits(
*new_qubits
) -> 'PauliSumExponential'
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool
__iter__
__iter__() -> Iterator['cirq.PauliStringPhasor']
__ne__
__ne__(
other: _SupportsValueEquality
) -> bool
__pow__
__pow__(
exponent: int
) -> 'PauliSumExponential'