quri_parts.core.state.state_vector_parametric module¶
- class ParametricQuantumStateVector(n_qubits, circuit, vector=None)¶
Bases:
QuantumStateVectorMixin,ParametricCircuitQuantumStateMixin,QuantumStateParametricQuantumStateVector represents a state defined by a state vector with a parametric circuit applied.
This class holds an unbound parametric circuit, thus circuit parameters are not bound to concrete values. Use
bind_parameters()when you need to bind concrete parameter values.- Parameters:
n_qubits (int)
circuit (ParametricQuantumCircuitProtocol)
vector (Optional[Union[StateVectorType, 'npt.ArrayLike']])
- property qubit_count: int¶
Returns the qubit count of the state.
- with_primitive_circuit()¶
Returns a new ParametricQuantumStateVector whose circuit is replaced with the corresponding primitive circuit.
The original state is not changed. For details about the primitive circuit, please refer to .primitive_circuit() in
ParametricQuantumCircuitProtocol.- Return type:
- with_gates_applied(gates)¶
Returns a new state with the gates applied.
The original state is not changed.
- Parameters:
gates (circuit.circuit.GateSequence)
- Return type:
- bind_parameters(params)¶
Returns a new state with the circuit parameters assigned concrete values.
This method does not modify self but returns a newly created state.
- Parameters:
params (Sequence[float])
- Return type: