or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

circuit-analysis.mdcomposite-systems.mdfile-io.mdindex.mdnoise-analysis.mdparameter-sweeps.mdqubit-models.mdspectrum-analysis.mdunits-settings.md

noise-analysis.mddocs/

0

# Noise Analysis

1

2

Comprehensive tools for analyzing noise effects in superconducting qubits, including thermal noise, coherence calculations, and decoherence time estimation. Essential for understanding qubit performance in realistic environments.

3

4

## Capabilities

5

6

### Thermal Noise Analysis

7

8

Functions for calculating thermal effects on qubit transitions and computing temperature-dependent properties.

9

10

```python { .api }

11

def calc_therm_ratio(omega: float, T: float, omega_in_standard_units: bool = False) -> float:

12

"""

13

Calculate thermal ratio β*ω = ℏω/(k_B*T).

14

15

Parameters:

16

- omega (float): Transition frequency in system units

17

- T (float): Temperature in Kelvin

18

- omega_in_standard_units (bool): If True, omega already in standard units

19

20

Returns:

21

- float: Thermal ratio β*ω

22

"""

23

```

24

25

### Noise Channel Modeling

26

27

Abstract base classes and concrete implementations for various noise channels affecting superconducting qubits.

28

29

```python { .api }

30

class NoiseChannel:

31

"""Abstract base class for noise channels."""

32

def __init__(self, noise_op, system: QuantumSystem, truncated_dim: int = None): ...

33

def spectrum(self, omega: float, esys: tuple = None, **kwargs) -> float: ...

34

def t1_effective(self, esys: tuple = None, **kwargs) -> float: ...

35

def t2_effective(self, esys: tuple = None, **kwargs) -> float: ...

36

37

class DephasingNoise(NoiseChannel):

38

"""Dephasing noise channel for pure dephasing processes."""

39

def __init__(self, noise_op, system: QuantumSystem, **kwargs): ...

40

41

class RelaxationNoise(NoiseChannel):

42

"""Relaxation noise channel for energy decay processes."""

43

def __init__(self, noise_op, system: QuantumSystem, **kwargs): ...

44

```

45

46

### Coherence Time Calculations

47

48

Methods for computing T1 (energy relaxation) and T2 (dephasing) times from noise spectra and system parameters.

49

50

```python { .api }

51

def t1_coherence(omega_01: float, noise_spectrum: callable, esys: tuple = None,

52

T: float = 0.015, total: bool = True) -> float:

53

"""

54

Calculate T1 coherence time from noise spectrum.

55

56

Parameters:

57

- omega_01 (float): Transition frequency

58

- noise_spectrum (callable): Noise spectral density function

59

- esys (tuple): Eigensystem data

60

- T (float): Temperature in Kelvin

61

- total (bool): Return total rate vs individual contributions

62

63

Returns:

64

- float: T1 time in system units

65

"""

66

67

def t2_coherence(omega_01: float, noise_spectrum: callable, esys: tuple = None,

68

T: float = 0.015, total: bool = True) -> float:

69

"""

70

Calculate T2 coherence time (pure dephasing).

71

72

Parameters:

73

- omega_01 (float): Transition frequency

74

- noise_spectrum (callable): Noise spectral density function

75

- esys (tuple): Eigensystem data

76

- T (float): Temperature in Kelvin

77

- total (bool): Return total rate vs individual contributions

78

79

Returns:

80

- float: T2 time in system units

81

"""

82

```

83

84

### Noise Operators

85

86

Standard noise operators for common decoherence channels in superconducting circuits.

87

88

```python { .api }

89

def charge_matrix_element(n1: int, n2: int) -> float:

90

"""Matrix element of charge operator between charge states."""

91

92

def flux_matrix_element(phi1: float, phi2: float, operator_func: callable) -> float:

93

"""Matrix element of flux-dependent operator between flux states."""

94

95

def critical_current_noise_operator(system: QuantumSystem) -> np.ndarray:

96

"""Noise operator for critical current fluctuations."""

97

98

def charge_noise_operator(system: QuantumSystem) -> np.ndarray:

99

"""Noise operator for charge noise effects."""

100

101

def flux_noise_operator(system: QuantumSystem) -> np.ndarray:

102

"""Noise operator for flux noise effects."""

103

```

104

105

## Usage Examples

106

107

### Basic Thermal Analysis

108

109

```python

110

import scqubits as scq

111

import numpy as np

112

113

# Create a transmon qubit

114

transmon = scq.Transmon(EJ=25.0, EC=0.2, ng=0.0, ncut=30)

115

116

# Calculate eigenvalues and eigenvectors

117

evals, evecs = transmon.eigensys(evals_count=6)

118

119

# Calculate thermal ratio at dilution fridge temperature

120

T_mK = 15 # millikelvin

121

T_K = T_mK * 1e-3 # convert to Kelvin

122

omega_01 = evals[1] - evals[0] # transition frequency

123

124

thermal_ratio = scq.calc_therm_ratio(omega_01, T_K)

125

print(f"Thermal ratio β*ω = {thermal_ratio:.2f}")

126

127

# Thermal occupation probability

128

thermal_occupation = 1 / (np.exp(thermal_ratio) + 1)

129

print(f"Thermal occupation: {thermal_occupation:.6f}")

130

```

131

132

### Coherence Time Estimation

133

134

```python

135

# Define a simple 1/f charge noise spectrum

136

def charge_noise_spectrum(omega):

137

"""1/f charge noise spectral density."""

138

A_charge = 1e-6 # noise amplitude

139

return A_charge / max(omega, 1e-3) # avoid divergence at ω=0

140

141

# Calculate charge noise operator

142

charge_op = scq.charge_noise_operator(transmon)

143

144

# Create noise channel

145

charge_noise = scq.DephasingNoise(charge_op, transmon)

146

147

# Calculate coherence times

148

esys = (evals, evecs)

149

t1_time = charge_noise.t1_effective(esys=esys, T=T_K)

150

t2_time = charge_noise.t2_effective(esys=esys, T=T_K)

151

152

print(f"T1 time: {t1_time:.2f} μs")

153

print(f"T2 time: {t2_time:.2f} μs")

154

```

155

156

## Types

157

158

```python { .api }

159

class QuantumSystem:

160

"""Base class for quantum systems with noise analysis support."""

161

def __init__(self): ...

162

def supported_noise_channels(self) -> list: ...

163

def default_params(self) -> dict: ...

164

165

class NoiseEnvironment:

166

"""Container for multiple noise channels affecting a quantum system."""

167

def __init__(self, system: QuantumSystem): ...

168

def add_noise_channel(self, channel: NoiseChannel) -> None: ...

169

def total_t1_time(self, esys: tuple = None) -> float: ...

170

def total_t2_time(self, esys: tuple = None) -> float: ...

171

```