Japanese
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

PauliSumOp

class PauliSumOp(primitive, coeff=1.0, grouping_type='None')[ソース]

ベースクラス: PrimitiveOp

Class for Operators backed by Terra’s SparsePauliOp class.

パラメータ
  • primitive (SparsePauliOp) – The SparsePauliOp which defines the behavior of the underlying function.

  • coeff (Union[complex, ParameterExpression]) – A coefficient multiplying the primitive.

  • grouping_type (str) – The type of grouping. If None, the operator is not grouped.

例外

TypeError – invalid parameters.

Methods Defined Here

add

Return Operator addition of self and other, overloaded by +.

adjoint

Return a new Operator equal to the Operator's adjoint (conjugate transpose), overloaded by ~.

compose

Return Operator Composition between self and other (linear algebra-style: A@B(x) = A(B(x))), overloaded by @.

equals

Evaluate Equality between Operators, overloaded by ==.

eval

Evaluate the Operator's underlying function, either on a binary string or another Operator.

exp_i

Return a CircuitOp equivalent to e^-iH for this operator H.

from_list

Construct from a pauli_list with the form [(pauli_str, coeffs)]

is_hermitian

Return True if the operator is hermitian.

is_zero

Return this operator is zero operator or not.

matrix_iter

Return a matrix representation iterator.

mul

Returns the scalar multiplication of the Operator, overloaded by *, including support for Terra's Parameters, which can be bound to values later (via bind_parameters).

permute

Permutes the sequence of PauliSumOp.

primitive_strings

Return a set of strings describing the primitives contained in the Operator.

reduce

Simplify the primitive SparsePauliOp.

tensor

Return tensor product between self and other, overloaded by ^.

to_instruction

Returns an Instruction equivalent to this Operator.

to_matrix

Return NumPy representation of the Operator.

to_pauli_op

Returns a sum of PauliOp s equivalent to this Operator.

to_spmatrix

Returns SciPy sparse matrix representation of the PauliSumOp.

Attributes

INDENTATION = '  '
coeff

The scalar coefficient multiplying the Operator.

戻り値の型

Union[complex, ParameterExpression]

戻り値

The coefficient.

coeffs

Return the Pauli coefficients.

grouping_type

Type of Grouping

Type

Returns

戻り値の型

str

instance_id

Return the unique instance id.

戻り値の型

int

num_qubits
戻り値の型

int

parameters
primitive: SparsePauliOp

The primitive defining the underlying function of the Operator.

戻り値の型

Union[QuantumCircuit, Operator, Pauli, SparsePauliOp, OperatorBase]

戻り値

The primitive object.

settings

Return operator settings.

戻り値の型

Dict