class mentpy.NumpySimulatorSV(mentpy.BaseSimulator)

A vector state simulator that uses numpy to simulate the quantum circuit.

Constructors

NumpySimulatorSV(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

current_number_simulated_nodes() int

Returns the number of nodes that are currently simulated.

current_simulated_nodes() List[int]

Returns the nodes that are currently simulated.

find_swaps(source, target)
future_neighbors_in_wire(node: int) List[int]
measure(angle: float) Tuple

Measures the state of the system.

measure_ment(ment: Ment, angle, i, force0=False)

Measures a ment

neighbors_in_wire(node: int) List[int]

Returns the neighbors of a node in the same wire.

node_in_which_wire(node: int) int

Returns the wire in which the node is.

reorder_qubits(state, current_order, target_order)

Reorders the qubits in the given order.

reset(input_state: ndarray | None = None)

Resets the simulator to the initial state.

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

Measures the quantum state in the given pattern.

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.