quri_parts.core.state.state_vector_parametric module

class ParametricQuantumStateVector(n_qubits, circuit, vector=None)

Bases: QuantumStateVectorMixin, ParametricCircuitQuantumStateMixin, QuantumState

ParametricQuantumStateVector 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:
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:

ParametricQuantumStateVector

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:

ParametricQuantumStateVector

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:

QuantumStateVector