English
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

PauliOp

class PauliOp(*args, **kwargs)[source]

Bases: PrimitiveOp

Deprecated: Class for Operators backed by Terra’s Pauli module.

Deprecated since version 0.24.0: The class qiskit.opflow.primitive_ops.pauli_op.PauliOp is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. For code migration guidelines, visit https://qisk.it/opflow_migration.

Parameters
  • primitive – The Pauli which defines the behavior of the underlying function.

  • coeff – A coefficient multiplying the primitive.

Raises

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.

permute

Permutes the sequence of Pauli matrices.

primitive_strings

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

tensor

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

to_circuit

Returns a QuantumCircuit equivalent to this Operator.

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 Operator.

Attributes

INDENTATION = '  '
coeff

The scalar coefficient multiplying the Operator.

Returns

The coefficient.

instance_id

Return the unique instance id.

num_qubits
parameters
primitive: Pauli

The primitive defining the underlying function of the Operator.

Returns

The primitive object.

settings

Return operator settings.