Skip to content

PilotNoiseParams

PilotNoiseParams is a data class that holds noise simulation parameters for the QPilot OS pilot service. It defines the noise model and associated gate error rates used in noisy quantum circuit simulations.

Overview

PilotNoiseParams stores noise parameters as public attributes that can be read and written directly. It is used when configuring noise for simulations run through the QPilotServiceBase.

Attributes

All attributes are publicly accessible read/write fields.

AttributeTypeDescription
noise_modelintThe noise model identifier corresponding to a NOISE_MODEL enum value
single_gate_paramfloatNoise parameter for single-qubit gates
double_gate_paramfloatNoise parameter for two-qubit gates
single_p2floatSecondary single-qubit noise parameter (used in some noise models)
double_p2floatSecondary two-qubit noise parameter (used in some noise models)
single_pgatefloatSingle-qubit gate error probability
double_pgatefloatTwo-qubit gate error probability

Examples

python
from pyqpanda3.pilot_service import PilotNoiseParams

# Create and configure noise parameters
noise_params = PilotNoiseParams()
noise_params.noise_model = 6  # DEPOLARIZING_KRAUS_OPERATOR
noise_params.single_gate_param = 0.001
noise_params.double_gate_param = 0.01
noise_params.single_p2 = 0.0005
noise_params.double_p2 = 0.005
noise_params.single_pgate = 0.001
noise_params.double_pgate = 0.01

# Read noise parameters
print(f"Noise model: {noise_params.noise_model}")
print(f"Single gate param: {noise_params.single_gate_param}")
print(f"Double gate param: {noise_params.double_gate_param}")

See Also

Released under the MIT License.