![]() |
An interface for quantum states as targets for operations.
Attributes | |
---|---|
classical_data
|
The shared classical data container for this simulation.. |
log_of_measurement_results
|
Gets the log of measurement results. |
qubits
|
Gets the qubit order maintained by this target. |
Methods
apply_operation
apply_operation(
op: 'cirq.Operation'
)
copy
@abc.abstractmethod
copy( deep_copy_buffers: bool = True ) -> TSelfTarget
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.abstractmethod
create_merged_state() -> TActOnArgs
Creates a final merged state.
sample
@abc.abstractmethod
sample( qubits: List['cirq.Qid'], repetitions: int = 1, seed: 'cirq.RANDOM_STATE_OR_SEED_LIKE' = None ) -> np.ndarray
Samples the state value.
__getitem__
__getitem__(
item: Optional['cirq.Qid']
) -> TActOnArgs
Gets the item associated with the qubit.
__iter__
__iter__() -> Iterator[Optional['cirq.Qid']]
Iterates the keys of the mapping.
__len__
__len__() -> int
Gets the number of items in the mapping.