View source on GitHub |
A serializable record mapping a processor_id and optional noise spec to a completely local cg.AbstractProcessor
Inherits From: SimulatedProcessorRecord, ProcessorRecord
cirq_google.workflow.SimulatedProcessorWithLocalDeviceRecord( processor_id: str, noise_strength: float = 0 ) Args | |
|---|---|
processor_id | The processor id we are emulating |
noise_strength | To do noisy simulation, set this to a positive float. The default of 0 will result in a noiseless state-vector simulation. If float('inf') is provided the simulator will be cirq.ZerosSampler. Otherwise, use a depolarizing model with this probability of noise. |
Attributes | |
|---|---|
processor_id | Dataclass field |
noise_strength | Dataclass field |
Methods
get_device
get_device() -> cirq.Device Return a cirq.Device for the processor specified by this class.
The default implementation delegates to self.get_processor().
get_processor
get_processor() -> cg.engine.SimulatedLocalProcessor Return a cg.SimulatedLocalProcessor for the specified processor_id.
get_sampler
get_sampler() -> cg.ProcessorSampler Return a cirq.Sampler for the processor specified by this class.
The default implementation delegates to self.get_processor().
__eq__
__eq__( other ) Return self==value.
Class Variables | |
|---|---|
| noise_strength | 0 |
View source on GitHub