French
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

EvolvedOp

class EvolvedOp(primitive, coeff=1.0)[source]

Bases : PrimitiveOp

Class for wrapping Operator Evolutions for compilation (convert) by an EvolutionBase method later, essentially acting as a placeholder. Note that EvolvedOp is a weird case of PrimitiveOp. It happens to be that it fits into the PrimitiveOp interface nearly perfectly, and it essentially represents a placeholder for a PrimitiveOp later, even though it doesn’t actually hold a primitive object. We could have chosen for it to be an OperatorBase, but would have ended up copying and pasting a lot of code from PrimitiveOp.

Paramètres
  • primitive (OperatorBase) – The operator being wrapped to signify evolution later.

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

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

assign_parameters

Binds scalar values to any Terra Parameters in the coefficients or primitives of the Operator, or substitutes one Parameter for another.

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.

log_i

Return a MatrixOp equivalent to log(H)/-i for this operator H.

permute

Permutes the qubits of the operator.

primitive_strings

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

reduce

Try collapsing the Operator structure, usually after some type of conversion, e.g.

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_matrix_op

Returns a MatrixOp equivalent to this Operator.

Attributes

INDENTATION = '  '
coeff

The scalar coefficient multiplying the Operator.

Type renvoyé

Union[complex, ParameterExpression]

Renvoie

The coefficient.

instance_id

Return the unique instance id.

Type renvoyé

int

num_qubits
Type renvoyé

int

parameters
primitive: PrimitiveOp

The primitive defining the underlying function of the Operator.

Type renvoyé

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

Renvoie

The primitive object.

settings

Return operator settings.

Type renvoyé

Dict