class mentpy.PennylaneSimulator(mentpy.BaseSimulator)

Simulator for measuring patterns of MBQC circuits.

Parameters:
mbqcircuit : mp.MBQCircuit

The MBQC circuit used for the simulation.

input_state : np.ndarray

The input state of the simulator.

See also

mp.PatternSimulator, mp.CirqSimulator

Constructors

PennylaneSimulator(mbqcircuit: MBQCircuit, input_state, ...)

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, plane: str = 'XY')

Measures the state of the system.

reset(input_state=None)

Resets the simulator to the initial state.

run(angles: List[float], **kwargs) Tuple[List[int], ndarray]

Measures the state of the system.

Properties

property input_state : ndarray

The input state of the simulator.

property mbqcircuit : MBQCircuit

The MBQC circuit used for the simulation.

property outcomes : dict

The outcomes of the simulation.