pygsti.modelmembers.term.RankOneDirectPrepTerm#

class RankOneDirectPrepTerm(rep, evotype)#

Bases: RankOnePrepTerm, _HasNumericalCoefficient

A state preparation term with numerical coefficient (and no magnitude tracking).

Methods

__init__(rep, evotype)

compose(all_terms)

Compose all_terms and set the composed term's magnitude to magnitude.

copy()

Copies this term.

create_from(coeff, pre_state, post_state, ...)

Creates a RankOnePrepTerm using natural arguments.

embed(state_space, target_labels)

Embeds this term's action as a part of a larger state space.

torep()

Access to the underlying representation object.

Attributes

coeff

The term's coefficient (float or complex).

compose(all_terms)#

Compose all_terms and set the composed term’s magnitude to magnitude.

Parameters:

all_terms (list) – List of the terms to compose.

Return type:

RankOneTerm

copy()#

Copies this term.

Return type:

RankOneTerm

classmethod create_from(coeff, pre_state, post_state, evotype, state_space)#

Creates a RankOnePrepTerm using natural arguments.

Parameters:
  • coeff (Polynomial or complex) – The term’s coefficient.

  • pre_state (State or StateRep or numpy.ndarray) – The ‘ket’ (left-side) state of the operator.

  • post_state (State or StateRep or numpy.ndarray) – The ‘bra’ (right-side) state of the operator

  • evotype (Evotype or str) – The evolution type

  • state_space (StateSpace or str) – The state space of this term.

Return type:

RankOnePrepTerm

embed(state_space, target_labels)#

Embeds this term’s action as a part of a larger state space.

Parameters:
  • state_space (StateSpace) – The full state space this term’s action will be embedded into.

  • target_labels (tuple) – A tuple of the target labels.

Return type:

RankOnePrepTerm

torep()#

Access to the underlying representation object.

property coeff#

The term’s coefficient (float or complex).