quri_parts.stim.simulator module

evaluate_state_to_vector(state)

Convert GeneralCircuitQuantumState or QuantumStateVector to QuantumStateVector that only contains the state vector.

Parameters:

state (GeneralCircuitQuantumState | QuantumStateVector)

Return type:

QuantumStateVector

run_circuit(circuit, init_state)

Act a ImmutableQuantumCircuit onto a state vector and returns a new state vector.

Note that in Stim, the output vector gets canonicalized in the way that the first non-zero component of the output vector is positive.

Parameters:
Return type:

ndarray[Any, dtype[complex128]]