class mentpy.PatternSimulator

Simulator for measuring patterns of MBQC circuits.

Parameters:
mbqcircuit : mp.MBQCircuit

The MBQC circuit used for the simulation.

backend : str

The simulator to use. Currently only ‘pennylane-default.qubit’ is supported.

See also

mp.PennylaneSimulator, mp.CirqSimulator

Constructors

PatternSimulator(mbqcircuit: MBQCircuit, ...)

Initialize self. See help(type(self)) for accurate signature.

String representation

__repr__() str

Return repr(self).

Special methods

__call__(angles: List[float], **kwargs)

Call self as a function.

Methods

measure(angle: float, **kwargs)
reset(input_state: ndarray | None = None)
run(angles: List[float], **kwargs) Tuple[List[int], ndarray]