|  View source on GitHub | 
An interface for quantum states as targets for operations.
cirq.SimulationStateBase(
    *,
    qubits: Sequence[cirq.Qid],
    classical_data: (cirq.ClassicalDataStore | None) = None
)
| Args | |
|---|---|
| qubits | The canonical ordering of qubits. | 
| classical_data | The shared classical data container for this simulation. | 
| Attributes | |
|---|---|
| classical_data | |
| log_of_measurement_results | Gets the log of measurement results. | 
| qubit_map | |
| qubits | |
Methods
apply_operation
apply_operation(
    op: cirq.Operation
)
copy
@abc.abstractmethodcopy( deep_copy_buffers: bool = True ) -> Self
Creates a copy of the object.
| Args | |
|---|---|
| deep_copy_buffers | If True, buffers will also be deep-copied. Otherwise the copy will share a reference to the original object's buffers. | 
| Returns | |
|---|---|
| A copied instance. | 
create_merged_state
@abc.abstractmethodcreate_merged_state() -> TSimulationState
Creates a final merged state.
sample
@abc.abstractmethodsample( qubits: list[cirq.Qid], repetitions: int = 1, seed: cirq.RANDOM_STATE_OR_SEED_LIKE = None ) -> np.ndarray
Samples the state value.
__getitem__
@abc.abstractmethod__getitem__( item: (cirq.Qid | None) ) -> TSimulationState
Gets the item associated with the qubit.
__iter__
@abc.abstractmethod__iter__() -> Iterator[cirq.Qid | None]
Iterates the keys of the mapping.
__len__
@abc.abstractmethod__len__() -> int
Gets the number of items in the mapping.