measurements
Helpers.
fidelity(rho, sigma)
Fidelity between two states.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
Qarray
|
state. |
required |
sigma
|
Qarray
|
state. |
required |
Returns:
Type | Description |
---|---|
float
|
Fidelity between rho and sigma. |
Source code in jaxquantum/core/measurements.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
get_logical_basis(n_qubits)
Compute a complete operator basis of a system composed of logical qubits.
Args:
n_qubits: number of qubits
Returns:
List containing the complete operator basis.
Source code in jaxquantum/core/measurements.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
get_physical_basis(qubits)
Compute a complete operator basis of a QEC code on a physical system specified by a number of qubits.
Args:
qubits: list of qubit codes, must have
common_gates and params attributes.
Returns:
List containing the complete operator basis.
Source code in jaxquantum/core/measurements.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
overlap(rho, sigma)
Overlap between two states or operators.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho
|
Qarray
|
state/operator. |
required |
sigma
|
Qarray
|
state/operator. |
required |
Returns:
Type | Description |
---|---|
Array
|
Overlap between rho and sigma. |
Source code in jaxquantum/core/measurements.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
quantum_state_tomography(rho, physical_basis, logical_basis)
Perform quantum state tomography to retrieve the density matrix in the logical basis.
Args:
rho: state expressed in the physical Hilbert space basis.
physical_basis: list of logical operators expressed in the physical
Hilbert space basis forming a complete logical operator basis.
logical_basis: list of logical operators expressed in the
logical Hilbert space basis forming a complete operator basis.
Returns:
Density matrix of state rho expressed in the logical basis.
Source code in jaxquantum/core/measurements.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|