PassData

class PassData(circuit)[source]

Bases: MutableMapping[str, Any]

A dictionary wrapper shared between all passes in a compilation run.

This class reserves certain keywords and supplies default initial values for them. Other than that, it behaves very similar to a normal dictionary object mapping str keys to any type of value.

__init__(circuit)[source]

Initialize a PassData object from circuit.

Attributes

connectivity

Retrieve the physical connectivity of the circuit qudits.

error

Return the current target unitary or state.

final_mapping

Return the final mapping of logical to physical qudits.

gate_set

Return the current target MachineModel's GateSet.

initial_mapping

Return the initial mapping of logical to physical qudits.

model

Return the current target MachineModel.

placement

Return the current placement of circuit qudits on model qudits.

seed

Return the pass's seed.

target

Return the current target unitary or state.

Methods

become(other[, deepcopy])

Become a copy of other.

clear()

copy()

Returns a deep copy of the data.

get(k[,d])

items()

keys()

pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[,d])

update([E, ]**F)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

update_error_mul(error)

Update the error multiplicatively.

values()