qdk_chemistry.data.noise_models module

QDK/Chemistry noise model module for simulating noise in quantum circuits.

class qdk_chemistry.data.noise_models.GateErrorDef[source]

Bases: TypedDict

Typed dictionary for error definitions.

type: SupportedErrorTypes

Error type.

rate: float

Error rate.

num_qubits: int

Number of qubits the gate acts on.

class qdk_chemistry.data.noise_models.SupportedErrorTypes(*values)[source]

Bases: CaseInsensitiveStrEnum

Supported error types for quantum gates with case-insensitive string lookup.

DEPOLARIZING_ERROR = 'depolarizing_error'
class qdk_chemistry.data.noise_models.SupportedGate(*values)[source]

Bases: CaseInsensitiveStrEnum

An enumeration of quantum gate types with case-insensitive string lookup.

Gate types gathered from Qiskit https://github.com/Qiskit/qiskit/blob/a88ed60615eeb988f404f9afaf142775478aceb9/qiskit/circuit/quantumcircuit.py#L673C1-L731C1

BARRIER = 'barrier'
CCX = 'ccx'
CCZ = 'ccz'
CH = 'ch'
CP = 'cp'
CRX = 'crx'
CRY = 'cry'
CRZ = 'crz'
CS = 'cs'
CSDG = 'csdg'
CSWAP = 'cswap'
CSX = 'csx'
CU = 'cu'
CX = 'cx'
CY = 'cy'
CZ = 'cz'
DCX = 'dcx'
DELAY = 'delay'
ECR = 'ecr'
H = 'h'
ID = 'id'
INITIALIZE = 'initialize'
ISWAP = 'iswap'
MCP = 'mcp'
MCRX = 'mcrx'
MCRY = 'mcry'
MCRZ = 'mcrz'
MCX = 'mcx'
MEASURE = 'measure'
MS = 'ms'
P = 'p'
PAULI = 'pauli'
R = 'r'
RCCCX = 'rcccx'
RCCX = 'rccx'
RESET = 'reset'
RV = 'rv'
RX = 'rx'
RXX = 'rxx'
RY = 'ry'
RYY = 'ryy'
RZ = 'rz'
RZX = 'rzx'
RZZ = 'rzz'
S = 's'
SDG = 'sdg'
SWAP = 'swap'
SX = 'sx'
SXDG = 'sxdg'
T = 't'
TDG = 'tdg'
U = 'u'
UNITARY = 'unitary'
X = 'x'
Y = 'y'
Z = 'z'
classmethod from_string(gate_str)[source]

Get a Gate enum value from its string representation.

Return type:

SupportedGate

Parameters:

gate_str (str) – String representation of the gate (case-insensitive).

Returns:

The corresponding SupportedGate enum value.

Return type:

SupportedGate

Raises:

ValueError – If no matching gate is found.