quri_parts.qulacs.simulator module#
- evaluate_state_to_vector(state)#
Convert GeneralCircuitQuantumState or QuantumStateVector to QuantumStateVector that only contains the state vector.
- Parameters:
state (qulacs.QulacsStateT) –
- Return type:
- run_circuit(circuit, init_state)#
Act a NonParametricQuantumCircuit onto a state vector and returns a new state vector.
- Parameters:
circuit (NonParametricQuantumCircuit) –
init_state (ndarray[Any, dtype[complex128]]) –
- Return type:
ndarray[Any, dtype[complex128]]
- get_marginal_probability(state_vector, measured_values)#
Compute the probability of obtaining a result when measuring on a subset of the qubits.
- state_vector:
A 1-dimensional array representing the state vector.
- measured_values:
A dictionary representing the desired measurement outcome on the specified qubtis. Suppose {0: 1, 2: 0} is passed in, it computes the probability of obtaining 1 on the 0th qubit and 0 on the 2nd qubit.
- Parameters:
state_vector (ndarray[Any, dtype[complex128]]) –
measured_values (dict[int, int]) –
- Return type:
float
- create_qulacs_vector_state_sampler()#
Creates a state sampler based on Qulacs circuit execution.
- Return type:
StateSampler[QulacsStateT]
- create_concurrent_vector_state_sampler(executor=None, concurrency=1)#
- Parameters:
executor (Optional['Executor']) –
concurrency (int) –
- Return type:
ConcurrentStateSampler[QulacsStateT]
- create_qulacs_ideal_vector_state_sampler()#
Creates an ideal state sampler based on Qulacs circuit execution.
- Return type:
StateSampler[QulacsStateT]