quri_parts.core.state.state_parametric module#

class ParametricCircuitQuantumStateMixin(n_qubits, circuit)#

Bases: ABC

Parameters:
property parametric_circuit: UnboundParametricQuantumCircuitProtocol#

Parametric circuit to build the quantum state.

class ParametricCircuitQuantumState(n_qubits, circuit)#

Bases: ParametricCircuitQuantumStateMixin, QuantumState

ParametricCircuitQuantumState represents a quantum state generated by applying a parametric circuit to |00…0> state.

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 ParametricCircuitQuantumState 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 UnboundParametricQuantumCircuitProtocol.

Return type:

ParametricCircuitQuantumState

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:

ParametricCircuitQuantumState

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:

GeneralCircuitQuantumState