qflux 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qflux might be problematic. Click here for more details.
- qflux/closed_systems/VarQTE.py +433 -0
- qflux/closed_systems/utils.py +2 -2
- qflux/open_systems/quantum_simulation.py +39 -13
- qflux/variational_methods/__init__.py +1 -0
- qflux/variational_methods/qmad/__init__.py +4 -0
- qflux/variational_methods/qmad/ansatz.py +24 -0
- qflux/variational_methods/qmad/ansatzVect.py +24 -0
- qflux/variational_methods/qmad/effh.py +24 -0
- qflux/variational_methods/qmad/solver.py +24 -0
- {qflux-0.0.1.dist-info → qflux-0.0.2.dist-info}/METADATA +12 -20
- {qflux-0.0.1.dist-info → qflux-0.0.2.dist-info}/RECORD +14 -13
- {qflux-0.0.1.dist-info → qflux-0.0.2.dist-info}/WHEEL +1 -1
- {qflux-0.0.1.dist-info → qflux-0.0.2.dist-info}/licenses/LICENSE +0 -0
- {qflux-0.0.1.dist-info → qflux-0.0.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import numpy.typing as npt
|
|
3
|
+
from typing import List, Optional, Tuple
|
|
4
|
+
|
|
5
|
+
from qiskit import QuantumCircuit
|
|
6
|
+
from qiskit.primitives import Estimator
|
|
7
|
+
from qiskit.quantum_info import SparsePauliOp
|
|
8
|
+
from qiskit.providers.aer.noise import NoiseModel
|
|
9
|
+
from qiskit.providers.fake_provider import FakeSherbrooke
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# To change the ansatz, apply_param and measure_der must both be modified.
|
|
13
|
+
def apply_param(
|
|
14
|
+
params: npt.NDArray[np.float_], i: int, qc: QuantumCircuit, N: int
|
|
15
|
+
) -> None:
|
|
16
|
+
"""Apply parameter i to the quantum circuit currently constructing the ansatz.
|
|
17
|
+
The ansatz must be built in a peicewise manner to allow for hadamard tests
|
|
18
|
+
of the generators of the parameters to later be inserted to measure the A_ij
|
|
19
|
+
and C_i matrix elements.
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
params (numpy.array): An array containing the values of all the ansatz parameters.
|
|
23
|
+
parameter (int): Index of the parameter being applied.
|
|
24
|
+
qc (QuantumCircuit): The qiskit ansatz quantum circuit currently being constructed.
|
|
25
|
+
N (int): Number of qubits
|
|
26
|
+
"""
|
|
27
|
+
qc.rx(params[i], i % N))
|
|
28
|
+
if i % N == N - 1 and i != len(params) - 1:
|
|
29
|
+
for i in range(N - 1):
|
|
30
|
+
qc.cz(i, i + 1)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def measure_der(i: int, qc: QuantumCircuit, N: int) -> None:
|
|
34
|
+
"""Append a Hadamard test to the circuit to measure the generator of parameter i in the ansatz.
|
|
35
|
+
The ansatz currently used is simply the two-local ansatz with only rx gates.
|
|
36
|
+
Therefore the generator is only x-gates on the corresponding qubit.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
parameter (int): The index of the parameter whose generator will be measured.
|
|
40
|
+
qc (QuantumCircuit): The qiskit quantum circuit which is in the process of assembling the ansatz.
|
|
41
|
+
N (int): Number of qubits
|
|
42
|
+
"""
|
|
43
|
+
qc.cx(N, i % N)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def A_Circuit(params: npt.NDArray[np.float_], i: int, j: int, N: int) -> QuantumCircuit:
|
|
47
|
+
"""Constructs the qiskit quantum circuits used to measure each element of the A_ij matrix.
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
params (numpy.array): A numpy array containing the values of each parameter of the ansatz.
|
|
51
|
+
i (int): The index from A_ij. This also corresponds to the ansatz parameter i being measured.
|
|
52
|
+
j (int): The index from A_ij. This also corresponds to the ansatz parameter j being measured.
|
|
53
|
+
N (int): The number of qubits.
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
QuantumCircuit: The quantum circuit for an element of the A_ij matrix, in the form of a
|
|
57
|
+
hadamard test of the generators of parameters i and j. The value of the A_ij matrix
|
|
58
|
+
can be found by measuring the ancilla qubit (qubit N) in the Z basis.
|
|
59
|
+
"""
|
|
60
|
+
qc = QuantumCircuit(N + 1, 1)
|
|
61
|
+
qc.h(N)
|
|
62
|
+
for parameter in range(len(params)): # Apply parameterized gates
|
|
63
|
+
if parameter == i:
|
|
64
|
+
qc.x(N)
|
|
65
|
+
measure_der(parameter, qc, N) # Measure generator for i
|
|
66
|
+
qc.x(N)
|
|
67
|
+
if parameter == j:
|
|
68
|
+
measure_der(parameter, qc, N) # Measure second generator for j
|
|
69
|
+
apply_param(params, parameter, qc, N)
|
|
70
|
+
qc.h(N)
|
|
71
|
+
return qc
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def Measure_A(
|
|
75
|
+
init_circ: QuantumCircuit,
|
|
76
|
+
params: npt.NDArray[np.float_],
|
|
77
|
+
N: int,
|
|
78
|
+
shots: int = 2**10,
|
|
79
|
+
noisy: bool = False,
|
|
80
|
+
) -> npt.NDArray[np.float_]:
|
|
81
|
+
"""Create the A_ij matrix through measuring quantum circuits corresponding to each element.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
init_circ (QuantumCircuit): The qiskit circuit representing the initial state of the system.
|
|
85
|
+
params (numpy.array): A numpy array which contains the values of each parameter of the ansatz.
|
|
86
|
+
N (int): The number of qubits.
|
|
87
|
+
shots (int, optional): The number of shots used to estimate each element of the A_ij matrix. Defaults to 2**10.
|
|
88
|
+
noisy (bool, optional): A boolean used to turn on and off the Fake-Sherbrooke qiskit noisy backend. Defaults to False.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
numpy.array: The A_ij matrix
|
|
92
|
+
"""
|
|
93
|
+
A = [[0.0 for i in range(len(params))] for j in range(len(params))]
|
|
94
|
+
for i in range(len(params)):
|
|
95
|
+
for j in range(len(params) - i):
|
|
96
|
+
qc = QuantumCircuit(N + 1, 1)
|
|
97
|
+
ansatz = A_Circuit(params, i, i + j, N)
|
|
98
|
+
qc = qc.compose(init_circ, [k for k in range(N)])
|
|
99
|
+
qc = qc.compose(ansatz, [k for k in range(N + 1)])
|
|
100
|
+
|
|
101
|
+
observable = SparsePauliOp.from_list([("Z" + "I" * N, 1.0)])
|
|
102
|
+
if noisy:
|
|
103
|
+
device_backend = FakeSherbrooke()
|
|
104
|
+
coupling_map = device_backend.coupling_map
|
|
105
|
+
noise_model = NoiseModel.from_backend(device_backend)
|
|
106
|
+
basis_gates = noise_model.basis_gates
|
|
107
|
+
estimator = Estimator(
|
|
108
|
+
options={
|
|
109
|
+
"shots": shots,
|
|
110
|
+
"noise_model": noise_model,
|
|
111
|
+
"coupling_map": coupling_map,
|
|
112
|
+
"basis_gates": basis_gates,
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
else:
|
|
116
|
+
estimator = Estimator(options={"shots": shots})
|
|
117
|
+
result = estimator.run(qc, observable).result()
|
|
118
|
+
A[i][i + j] = result.values[0]
|
|
119
|
+
return np.array(A)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def C_Circuit(
|
|
123
|
+
params: npt.NDArray[np.float_],
|
|
124
|
+
i: int,
|
|
125
|
+
pauli_string: str,
|
|
126
|
+
N: int,
|
|
127
|
+
evolution_type: str = "real",
|
|
128
|
+
) -> QuantumCircuit:
|
|
129
|
+
|
|
130
|
+
"""Create the qiskit quantum circuits to measure each element of the C_i vector.
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
params (numpy.array): A numpy array which contains the values of each parameter of the ansatz.
|
|
134
|
+
i (int): The index of the C_i vector being measured. This also corresponds
|
|
135
|
+
to the index i of the parameter whose generator will be measured
|
|
136
|
+
pauli_string (str): A string containing a description of the pauli operator of the Hamiltonian which will be measured.
|
|
137
|
+
N (int): The number of qubits.
|
|
138
|
+
evolution_type (str, optional): This determines if the evolution will be real-time or imaginary-time
|
|
139
|
+
through the addition of an extra gate. Defaults to "real".
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
QuantumCircuit: The quantum circuit for an element of the C_i matrix, in the form of a
|
|
143
|
+
hadamard test of the generators of parameter i. The value of the C_i matrix
|
|
144
|
+
can be found by measuring the ancilla qubit (qubit N) in the Z basis.
|
|
145
|
+
"""
|
|
146
|
+
qc = QuantumCircuit(N + 1, 1)
|
|
147
|
+
qc.h(N)
|
|
148
|
+
if evolution_type == "imaginary":
|
|
149
|
+
qc.s(N) # To get only imaginary component
|
|
150
|
+
else:
|
|
151
|
+
qc.z(N)
|
|
152
|
+
for parameter in range(len(params)): # Apply parameterized gates
|
|
153
|
+
if parameter == i:
|
|
154
|
+
qc.x(N)
|
|
155
|
+
measure_der(parameter, qc, N) # Measure generators
|
|
156
|
+
qc.x(N)
|
|
157
|
+
apply_param(params, parameter, qc, N)
|
|
158
|
+
pauli_measure(qc, pauli_string)
|
|
159
|
+
qc.h(N)
|
|
160
|
+
return qc
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def Measure_C(
|
|
164
|
+
init_circ: QuantumCircuit,
|
|
165
|
+
params: npt.NDArray[np.float_],
|
|
166
|
+
H: SparsePauliOp,
|
|
167
|
+
N: int,
|
|
168
|
+
shots: int = 2**10,
|
|
169
|
+
evolution_type: str = "real",
|
|
170
|
+
noisy: bool = False,
|
|
171
|
+
) -> npt.NDArray[np.float_]:
|
|
172
|
+
"""Create the C_i vector through measuring quantum circuits corresponding to each element.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
init_circ (QuantumCircuit): A qiskit circuit constructing the initial state of the system.
|
|
176
|
+
params (numpy.array): A numpy array containing the values of the parameters of the ansatz.
|
|
177
|
+
H (SparsePauliOp): The Hamiltonian.
|
|
178
|
+
N (int): The number of qubits.
|
|
179
|
+
shots (int, optional): The number of shots to be used to measure each element of the C_i vector. Defaults to 2**10.
|
|
180
|
+
evolution_type (str, optional): This determines if the evolution will be real-time or imaginary-time
|
|
181
|
+
through the addition of an extra gate. Defaults to "real".
|
|
182
|
+
noisy (bool, optional): A boolean used to turn on and off the Fake-Sherbrooke qiskit noisy backend. Defaults to False.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
numpy.array: The C_i vector.
|
|
186
|
+
"""
|
|
187
|
+
C = [0.0 for i in range(len(params))]
|
|
188
|
+
for i in range(len(params)):
|
|
189
|
+
for pauli_string in range(len(H.paulis)):
|
|
190
|
+
qc = QuantumCircuit(N + 1, 1)
|
|
191
|
+
ansatz = C_Circuit(
|
|
192
|
+
params, i, H.paulis[pauli_string], N, evolution_type=evolution_type
|
|
193
|
+
)
|
|
194
|
+
qc = qc.compose(init_circ, [k for k in range(N)])
|
|
195
|
+
qc = qc.compose(ansatz, [k for k in range(N + 1)])
|
|
196
|
+
observable = SparsePauliOp.from_list([("Z" + "I" * N, 1.0)])
|
|
197
|
+
if noisy:
|
|
198
|
+
device_backend = FakeSherbrooke()
|
|
199
|
+
coupling_map = device_backend.coupling_map
|
|
200
|
+
noise_model = NoiseModel.from_backend(device_backend)
|
|
201
|
+
basis_gates = noise_model.basis_gates
|
|
202
|
+
estimator = Estimator(
|
|
203
|
+
options={
|
|
204
|
+
"shots": shots,
|
|
205
|
+
"noise_model": noise_model,
|
|
206
|
+
"coupling_map": coupling_map,
|
|
207
|
+
"basis_gates": basis_gates,
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
else:
|
|
211
|
+
estimator = Estimator(options={"shots": shots})
|
|
212
|
+
result = estimator.run(qc, observable).result()
|
|
213
|
+
|
|
214
|
+
C[i] -= 1 / 2 * H.coeffs[pauli_string].real * result.values[0]
|
|
215
|
+
return np.array(C)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def pauli_measure(qc: QuantumCircuit, pauli_string: str) -> None:
|
|
219
|
+
"""Measure the given pauli string on the provided quantum circuit using a hadamard test.
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
qc (QuantumCircuit): The quantum circuit ansatz being constructed.
|
|
223
|
+
pauli_string (str): The pauli string to be measured as a string.
|
|
224
|
+
"""
|
|
225
|
+
N = len(pauli_string)
|
|
226
|
+
for i in range(len(pauli_string)): # Measure Pauli Strings
|
|
227
|
+
if str(pauli_string[i]) == "X":
|
|
228
|
+
qc.cx(N, i)
|
|
229
|
+
if str(pauli_string[i]) == "Y":
|
|
230
|
+
qc.cy(N, i)
|
|
231
|
+
if str(pauli_string[i]) == "Z":
|
|
232
|
+
qc.cz(N, i)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def Construct_Ansatz(
|
|
236
|
+
init_circ: QuantumCircuit, params: npt.NDArray[np.float_], N: int
|
|
237
|
+
) -> QuantumCircuit:
|
|
238
|
+
"""Construct the full ansatz for use in measuring observables.
|
|
239
|
+
|
|
240
|
+
Args:
|
|
241
|
+
init_circ (QuantumCircuit): A qiskit circuit constructing the initial state of the system.
|
|
242
|
+
params (numpy.array): A numpy vector containing the values of the parameters of the ansatz at a specific time.
|
|
243
|
+
N (int): The number of qubits.
|
|
244
|
+
|
|
245
|
+
Returns:
|
|
246
|
+
QuantumCircuit: The full ansatz as a qiskit.QuantumCircuit.
|
|
247
|
+
"""
|
|
248
|
+
qc = QuantumCircuit(N, 0)
|
|
249
|
+
qc = qc.compose(init_circ, [k for k in range(N)])
|
|
250
|
+
|
|
251
|
+
ansatz = QuantumCircuit(N, 0)
|
|
252
|
+
for parameter in range(len(params)): # Apply parameterized gates
|
|
253
|
+
apply_param(params, parameter, ansatz, N)
|
|
254
|
+
|
|
255
|
+
qc = qc.compose(ansatz, [k for k in range(N)])
|
|
256
|
+
return qc
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def ansatz_energy(
|
|
260
|
+
init_circ: QuantumCircuit,
|
|
261
|
+
params: npt.NDArray[np.float_],
|
|
262
|
+
H: SparsePauliOp,
|
|
263
|
+
shots: int = 2**14,
|
|
264
|
+
noisy: bool = False,
|
|
265
|
+
) -> Tuple[float, float]:
|
|
266
|
+
"""Measure the energy of the ansatz.
|
|
267
|
+
|
|
268
|
+
Args:
|
|
269
|
+
init_circ (QuantumCircuit): A qiskit circuit constructing the initial state of the system.
|
|
270
|
+
params (numpy.array): A numpy vector containing the values of the parameters of the ansatz at a specific time.
|
|
271
|
+
H (SparsePauliOp): The Hamiltonian.
|
|
272
|
+
shots (_type_, optional): The number of shots to be used to measure the energy. Defaults to 2**14.
|
|
273
|
+
noisy (bool, optional): A boolean used to turn on and off the Fake-Sherbrooke qiskit noisy backend. Defaults to False.
|
|
274
|
+
|
|
275
|
+
Returns:
|
|
276
|
+
(float, float): Return (energy, variance) from the measured observables.
|
|
277
|
+
"""
|
|
278
|
+
N = H.num_qubits
|
|
279
|
+
|
|
280
|
+
if noisy:
|
|
281
|
+
device_backend = FakeSherbrooke()
|
|
282
|
+
coupling_map = device_backend.coupling_map
|
|
283
|
+
noise_model = NoiseModel.from_backend(device_backend)
|
|
284
|
+
basis_gates = noise_model.basis_gates
|
|
285
|
+
estimator = Estimator(
|
|
286
|
+
options={
|
|
287
|
+
"shots": shots,
|
|
288
|
+
"noise_model": noise_model,
|
|
289
|
+
"coupling_map": coupling_map,
|
|
290
|
+
"basis_gates": basis_gates,
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
else:
|
|
294
|
+
estimator = Estimator(options={"shots": shots})
|
|
295
|
+
qc = Construct_Ansatz(init_circ, params, N)
|
|
296
|
+
result = estimator.run(qc, H).result()
|
|
297
|
+
return result.values[0], result.metadata[0]["variance"]
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def VarQRTE(
|
|
301
|
+
n_reps_ansatz: int,
|
|
302
|
+
hamiltonian: SparsePauliOp,
|
|
303
|
+
total_time: float = 1.0,
|
|
304
|
+
timestep: float = 0.1,
|
|
305
|
+
init_circ: Optional[QuantumCircuit] = None,
|
|
306
|
+
shots: int = 2**10,
|
|
307
|
+
noisy: bool = False,
|
|
308
|
+
) -> List[npt.NDArray[np.float_]]:
|
|
309
|
+
"""The Variational Quantum Real Time Evolution (VarQRTE) algorithm. This uses quantum circuits to measure
|
|
310
|
+
the elements of two objects, the A_ij matrix and the C_i vector.
|
|
311
|
+
|
|
312
|
+
Args:
|
|
313
|
+
n_reps_ansatz (int): The number of repetitions of the variational ansatz used to simulate Real-Time evolution.
|
|
314
|
+
hamiltonian (SparsePauliOp): The Hamiltonian of the system.
|
|
315
|
+
total_time (float, optional): A float to determine the total evolution time of the quantum system. Defaults to 1.0.
|
|
316
|
+
timestep (float, optional): A float to determine the size of a single timestep. Defaults to 0.1.
|
|
317
|
+
init_circ (QuantumCircuit, optional): A qiskit circuit constructing the initial state of the system.. Defaults to None.
|
|
318
|
+
shots (int, optional): Number of shots to be used to measure observables. Defaults to 2**10.
|
|
319
|
+
noisy (bool, optional): A boolean used to turn on and off the Fake-Sherbrooke qiskit noisy backend. Defaults to False.
|
|
320
|
+
|
|
321
|
+
Returns:
|
|
322
|
+
numpy.array: An array containing all the parameter values of the ansatz throughout its time evolution.
|
|
323
|
+
These values can be put into Construct_Ansatz, or anstaz_energy to obtain observables of the system.
|
|
324
|
+
"""
|
|
325
|
+
if init_circ is None:
|
|
326
|
+
init_circ = QuantumCircuit(hamiltonian.num_qubits)
|
|
327
|
+
|
|
328
|
+
initial_params = np.zeros(hamiltonian.num_qubits * (n_reps_ansatz + 1))
|
|
329
|
+
num_timesteps = int(total_time / timestep)
|
|
330
|
+
all_params = [np.copy(initial_params)]
|
|
331
|
+
my_params = np.copy(initial_params) # Reset Initial Parameters after each run
|
|
332
|
+
for i in range(num_timesteps):
|
|
333
|
+
print(f"Simulating Time={str(timestep*(i+1))} ", end="\r")
|
|
334
|
+
theta_dot = np.array([0.0 for j in range(len(my_params))])
|
|
335
|
+
A = Measure_A(
|
|
336
|
+
init_circ, my_params, hamiltonian.num_qubits, shots=shots, noisy=noisy
|
|
337
|
+
)
|
|
338
|
+
C = Measure_C(
|
|
339
|
+
init_circ,
|
|
340
|
+
my_params,
|
|
341
|
+
hamiltonian,
|
|
342
|
+
hamiltonian.num_qubits,
|
|
343
|
+
shots=shots,
|
|
344
|
+
evolution_type="real",
|
|
345
|
+
noisy=noisy,
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
# Approximately invert A using Truncated SVD
|
|
349
|
+
u, s, v = np.linalg.svd(A)
|
|
350
|
+
for j in range(len(s)):
|
|
351
|
+
if s[j] < 1e-2:
|
|
352
|
+
s[j] = 1e8
|
|
353
|
+
t = np.diag(s**-1)
|
|
354
|
+
A_inv = np.dot(v.transpose(), np.dot(t, u.transpose()))
|
|
355
|
+
|
|
356
|
+
theta_dot = np.matmul(A_inv, C)
|
|
357
|
+
|
|
358
|
+
my_params -= theta_dot * timestep
|
|
359
|
+
all_params.append(np.copy(my_params))
|
|
360
|
+
return all_params
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
def VarQITE(
|
|
364
|
+
n_reps_ansatz: int,
|
|
365
|
+
hamiltonian: SparsePauliOp,
|
|
366
|
+
total_time: float,
|
|
367
|
+
timestep: float,
|
|
368
|
+
init_circ: Optional[QuantumCircuit] = None,
|
|
369
|
+
shots: int = 2**10,
|
|
370
|
+
noisy: bool = False,
|
|
371
|
+
) -> List[npt.NDArray[np.float_]]:
|
|
372
|
+
"""The Variational Quantum Imaginary Time Evolution (VarQITE) algorithm. This uses quantum circuits to measure
|
|
373
|
+
the elements of two objects, the A_ij matrix and the C_i vector.
|
|
374
|
+
|
|
375
|
+
Args:
|
|
376
|
+
n_reps_ansatz (int): The number of repetitions of the variational ansatz used to simulate Imaginary-Time evolution.
|
|
377
|
+
hamiltonian (SparsePauliOp): The Hamiltonian of the system.
|
|
378
|
+
total_time (float, optional): A float to determine the total evolution time of the quantum system. Defaults to 1.0.
|
|
379
|
+
timestep (float, optional): A float to determine the size of a single timestep. Defaults to 0.1.
|
|
380
|
+
init_circ (QuantumCircuit, optional): A qiskit circuit constructing the initial state of the system.. Defaults to None.
|
|
381
|
+
shots (int, optional): Number of shots to be used to measure observables. Defaults to 2**10.
|
|
382
|
+
noisy (bool, optional): A boolean used to turn on and off the Fake-Sherbrooke qiskit noisy backend. Defaults to False.
|
|
383
|
+
|
|
384
|
+
Returns:
|
|
385
|
+
numpy.array: An array containing all the parameter values of the ansatz throughout its time evolution.
|
|
386
|
+
These values can be put into Construct_Ansatz, or anstaz_energy to obtain observables of the system.
|
|
387
|
+
"""
|
|
388
|
+
if init_circ is None:
|
|
389
|
+
init_circ = QuantumCircuit(hamiltonian.num_qubits)
|
|
390
|
+
|
|
391
|
+
initial_params = np.zeros(hamiltonian.num_qubits * (n_reps_ansatz + 1))
|
|
392
|
+
num_timesteps = int(total_time / timestep)
|
|
393
|
+
all_params = [np.copy(initial_params)]
|
|
394
|
+
|
|
395
|
+
my_params = np.copy(initial_params) # Reset Initial Parameters after each run
|
|
396
|
+
for i in range(num_timesteps):
|
|
397
|
+
print(f"Timestep: {str(i*timestep)} ", end="\r")
|
|
398
|
+
theta_dot = np.array([0.0 for j in range(len(my_params))])
|
|
399
|
+
A = np.array(
|
|
400
|
+
Measure_A(
|
|
401
|
+
init_circ, my_params, hamiltonian.num_qubits, shots=shots, noisy=noisy
|
|
402
|
+
)
|
|
403
|
+
)
|
|
404
|
+
C = np.array(
|
|
405
|
+
Measure_C(
|
|
406
|
+
init_circ,
|
|
407
|
+
my_params,
|
|
408
|
+
hamiltonian,
|
|
409
|
+
hamiltonian.num_qubits,
|
|
410
|
+
shots=shots,
|
|
411
|
+
noisy=noisy,
|
|
412
|
+
evolution_type="imaginary",
|
|
413
|
+
)
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
# Approximately invert A using Truncated SVD
|
|
417
|
+
u, s, v = np.linalg.svd(A)
|
|
418
|
+
for j in range(len(s)):
|
|
419
|
+
if s[j] < 1e-2:
|
|
420
|
+
s[j] = 1e7
|
|
421
|
+
t = np.diag(s**-1)
|
|
422
|
+
A_inv = np.dot(v.transpose(), np.dot(t, u.transpose()))
|
|
423
|
+
# A_inv=np.dot(v,np.dot(t,u.transpose()))
|
|
424
|
+
|
|
425
|
+
theta_dot = np.matmul(A_inv, C)
|
|
426
|
+
|
|
427
|
+
my_params += theta_dot * timestep
|
|
428
|
+
all_params.append(np.copy(my_params))
|
|
429
|
+
|
|
430
|
+
# print("Theta dot: "+str(np.sum(np.abs(theta_dot))))
|
|
431
|
+
# print("(Energy ,Variance): "+str(ansatz_energy(init_circ, my_params[:], hamiltonian)))
|
|
432
|
+
# print()
|
|
433
|
+
return all_params
|
qflux/closed_systems/utils.py
CHANGED
|
@@ -120,7 +120,7 @@ def nested_kronecker_product(a):
|
|
|
120
120
|
|
|
121
121
|
def Hilbert_Schmidt(mat1, mat2):
|
|
122
122
|
'Return the Hilbert-Schmidt Inner Product of two matrices.'
|
|
123
|
-
return np.trace(mat1.conj().T
|
|
123
|
+
return np.trace(mat1.conj().T @ mat2)
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
def decompose(Ham_arr, tol=12, subset = None):
|
|
@@ -163,7 +163,7 @@ def decompose(Ham_arr, tol=12, subset = None):
|
|
|
163
163
|
pauli_str = ''.join(sigma_combinations[ii])
|
|
164
164
|
|
|
165
165
|
# Convert the Pauli string into a list of matrices
|
|
166
|
-
tmp_mat_list = vec_query(np.array(sigma_combinations[ii]), pms)
|
|
166
|
+
tmp_mat_list = vec_query(np.array(list(sigma_combinations[ii])), pms)
|
|
167
167
|
|
|
168
168
|
# Evaluate the Kronecker product of the matrix array
|
|
169
169
|
tmp_p_matrix = nested_kronecker_product(tmp_mat_list)
|
|
@@ -215,13 +215,14 @@ class QubitDynamicsOS(DynamicsOS):
|
|
|
215
215
|
def qc_simulation_kraus(
|
|
216
216
|
self,
|
|
217
217
|
time_arr: List[float],
|
|
218
|
-
shots: int = 1024,
|
|
219
218
|
Kraus: Optional[Dict[int, List[np.ndarray]]] = None,
|
|
219
|
+
backend: Any = AerSimulator(),
|
|
220
220
|
Gprop: Optional[List[np.ndarray]] = None,
|
|
221
221
|
tolk: float = 1e-5,
|
|
222
222
|
tolo: float = 1e-5,
|
|
223
|
+
Is_store_circuit = False,
|
|
223
224
|
**kwargs: Any
|
|
224
|
-
|
|
225
|
+
) -> np.ndarray:
|
|
225
226
|
"""
|
|
226
227
|
Perform quantum simulation using the Kraus operator representation.
|
|
227
228
|
|
|
@@ -231,17 +232,22 @@ class QubitDynamicsOS(DynamicsOS):
|
|
|
231
232
|
|
|
232
233
|
Args:
|
|
233
234
|
time_arr (List[float]): List of time steps for simulation.
|
|
234
|
-
|
|
235
|
+
|
|
235
236
|
Kraus (Optional[Dict[int, List[np.ndarray]]], optional): Dictionary mapping time step index to a list of Kraus operators.
|
|
236
237
|
If None, Kraus operators are generated from the propagator. Defaults to None.
|
|
238
|
+
backend (Any, optional): Quantum simulation backend. Defaults to AerSimulator().
|
|
237
239
|
Gprop (Optional[List[np.ndarray]], optional): Propagator matrix (or list of matrices) for simulation.
|
|
238
240
|
If None, it will be calculated. Defaults to None.
|
|
239
241
|
tolk (float, optional): Tolerance for generating Kraus operators. Defaults to 1e-5.
|
|
240
242
|
tolo (float, optional): Tolerance for observable decomposition. Defaults to 1e-5.
|
|
243
|
+
Is_store_circuit (bool, optional): If True, store the generated quantum circuits at each time step. Defaults to False.
|
|
241
244
|
**kwargs: Additional keyword arguments for propagator calculation.
|
|
242
245
|
|
|
243
246
|
Returns:
|
|
244
|
-
|
|
247
|
+
Dict[str, Any]: A dictionary containing quantum simulation results, including:
|
|
248
|
+
- 'data' (np.ndarray): Array of shape (nsteps,), containing the accumulated observable expectation values at each time step.
|
|
249
|
+
- 'circuits' (List[List[QuantumCircuit]], optional): If `Is_store_circuit` is True, this field contains a list of lists of quantum circuits.
|
|
250
|
+
Each outer list corresponds to a time step, and each inner list contains all circuits used for that step (across different Kraus operators and initial states).
|
|
245
251
|
"""
|
|
246
252
|
nsteps = len(time_arr)
|
|
247
253
|
|
|
@@ -258,7 +264,7 @@ class QubitDynamicsOS(DynamicsOS):
|
|
|
258
264
|
print('Kraus operator generation complete')
|
|
259
265
|
|
|
260
266
|
# Perform Qiskit simulation using the Estimator.
|
|
261
|
-
estimator = Estimator()
|
|
267
|
+
estimator = Estimator(mode=backend)
|
|
262
268
|
|
|
263
269
|
statevec, prob = self.init_statevec_Kraus()
|
|
264
270
|
n_inistate = len(statevec)
|
|
@@ -269,7 +275,10 @@ class QubitDynamicsOS(DynamicsOS):
|
|
|
269
275
|
obs_q = self._get_qiskit_observable(Isdilate=True, tol=tolo)
|
|
270
276
|
|
|
271
277
|
print('Starting quantum simulation')
|
|
272
|
-
|
|
278
|
+
|
|
279
|
+
result_simu = {}
|
|
280
|
+
result_simu['data'] = np.zeros(nsteps, dtype=np.float64)
|
|
281
|
+
if(Is_store_circuit): result_simu['circuits'] = [ [] for _ in range(nsteps) ]
|
|
273
282
|
|
|
274
283
|
for i in range(nsteps):
|
|
275
284
|
print('Simulation step', i, 'of', nsteps)
|
|
@@ -278,10 +287,12 @@ class QubitDynamicsOS(DynamicsOS):
|
|
|
278
287
|
for kraus_op in current_kraus_list:
|
|
279
288
|
for istate in range(n_inistate):
|
|
280
289
|
qc = self._create_circuit(kraus_op, statevec[istate], Isscale=False)
|
|
281
|
-
result = estimator.run(qc, obs_q
|
|
282
|
-
|
|
290
|
+
result = estimator.run([(qc, obs_q)]).result()
|
|
291
|
+
|
|
292
|
+
if(Is_store_circuit): result_simu['circuits'][i].append(qc)
|
|
293
|
+
result_simu['data'][i] += result[0].data.evs * prob[istate]
|
|
283
294
|
|
|
284
|
-
return
|
|
295
|
+
return result_simu
|
|
285
296
|
|
|
286
297
|
def qc_simulation_vecdens(
|
|
287
298
|
self,
|
|
@@ -306,7 +317,11 @@ class QubitDynamicsOS(DynamicsOS):
|
|
|
306
317
|
**kwargs: Additional keyword arguments for propagator calculation.
|
|
307
318
|
|
|
308
319
|
Returns:
|
|
309
|
-
|
|
320
|
+
Dict[str, Any]: A dictionary containing the quantum simulation results, including:
|
|
321
|
+
- 'data' (np.ndarray): Array of shape (nsteps, n_bitstr), storing the processed probability amplitudes
|
|
322
|
+
(i.e., normalized square root of the measured probabilities, scaled by norm factors) at each time step.
|
|
323
|
+
- 'circuits' (List[QuantumCircuit]): List of generated quantum circuits for each time step.
|
|
324
|
+
- 'norm' (List[float]): List of norm correction factors used in post-processing at each time step.
|
|
310
325
|
"""
|
|
311
326
|
if Gprop is None:
|
|
312
327
|
Gprop = self.Gt_matrix_expo(time_arr, **kwargs)
|
|
@@ -318,21 +333,32 @@ class QubitDynamicsOS(DynamicsOS):
|
|
|
318
333
|
|
|
319
334
|
n_bitstr = len(self.count_str)
|
|
320
335
|
statevec, norm0 = self.init_statevec_vecdens()
|
|
321
|
-
|
|
322
|
-
|
|
336
|
+
|
|
337
|
+
result = {}
|
|
338
|
+
result['data'] = np.zeros((nsteps, n_bitstr), dtype=np.float64)
|
|
339
|
+
result['circuits'] = []
|
|
340
|
+
result['norm'] = []
|
|
341
|
+
|
|
323
342
|
for i in range(nsteps):
|
|
324
343
|
if i % 100 == 0:
|
|
325
344
|
print('Quantum simulation step', i)
|
|
326
345
|
Gt = Gprop[i]
|
|
346
|
+
|
|
347
|
+
#create the circuit
|
|
327
348
|
circuit, norm = self._create_circuit(Gt, statevec, Isscale=True)
|
|
328
349
|
circuit.measure(range(self.Nqb + 1), range(self.Nqb + 1))
|
|
329
350
|
if self.dilation_method == 'SVD-Walsh':
|
|
330
351
|
circuit = transpile(circuit, backend)
|
|
352
|
+
|
|
353
|
+
#store the circuits and norm to the result
|
|
354
|
+
result['circuits'].append(circuit)
|
|
355
|
+
result['norm'].append(norm)
|
|
356
|
+
|
|
331
357
|
counts = backend.run(circuit, shots=shots).result().get_counts()
|
|
332
358
|
for j in range(n_bitstr):
|
|
333
359
|
bitstr = self.count_str[j]
|
|
334
360
|
if bitstr in counts:
|
|
335
|
-
result[i, j] = np.sqrt(counts[bitstr] / shots) * norm * norm0
|
|
361
|
+
result['data'][i, j] = np.sqrt(counts[bitstr] / shots) * norm * norm0
|
|
336
362
|
else:
|
|
337
363
|
print('At time', i, 'with shots =', shots, "no counts for", bitstr)
|
|
338
364
|
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
'''
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024 Saurabh Shivpuje
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
'''
|
|
24
|
+
|
|
1
25
|
import numpy as np
|
|
2
26
|
from itertools import combinations, product
|
|
3
27
|
from scipy.linalg import expm, kron
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
'''
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024 Saurabh Shivpuje
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
'''
|
|
24
|
+
|
|
1
25
|
import numpy as np
|
|
2
26
|
from itertools import combinations, product
|
|
3
27
|
from scipy.linalg import expm, kron
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
'''
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024 Saurabh Shivpuje
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
'''
|
|
24
|
+
|
|
1
25
|
import numpy as np
|
|
2
26
|
from scipy.linalg import expm, kron
|
|
3
27
|
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
'''
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024 Saurabh Shivpuje
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
'''
|
|
24
|
+
|
|
1
25
|
import numpy as np
|
|
2
26
|
from itertools import combinations, product
|
|
3
27
|
from scipy.linalg import expm, kron
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qflux
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: qflux is a package for running quantum dynamics calculations on quantum devices.
|
|
5
5
|
Author-email: Brandon Allen <brandon.allen@yale.edu>, Delmar Cabral <delmar.azevedocabral@yale.edu>, Alexander Soudackov <alexander.soudackov@yale.edu>, Anton Morgunov <anton@ischemist.com>
|
|
6
6
|
License: MIT
|
|
@@ -24,6 +24,7 @@ Requires-Dist: pylatexenc>=2.10
|
|
|
24
24
|
Requires-Dist: qutip>=5.0
|
|
25
25
|
Requires-Dist: scipy
|
|
26
26
|
Requires-Dist: tqdm
|
|
27
|
+
Requires-Dist: graycode>=1.0.5
|
|
27
28
|
Provides-Extra: dev
|
|
28
29
|
Requires-Dist: ipykernel>=6.29.5; extra == "dev"
|
|
29
30
|
Requires-Dist: rich>=13.9.4; extra == "dev"
|
|
@@ -63,7 +64,13 @@ This repository contains various protocols for performing quantum dynamics simul
|
|
|
63
64
|
|
|
64
65
|
## Getting Started <a name="start"></a>
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
`qflux` can be installed via `pip`:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install qflux
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
To get started, one can simply select a notebook and execute them locally or in google collab. Necessary dependencies will be installed using `pip`.
|
|
67
74
|
|
|
68
75
|
If using uv through the commandline, use the following syntax to create and activate a virtual environment:
|
|
69
76
|
|
|
@@ -102,27 +109,12 @@ https://qflux.batistalab.com/
|
|
|
102
109
|
|
|
103
110
|
### Contribution Guidelines <a name="contribute"></a>
|
|
104
111
|
|
|
105
|
-
To contribute to the repository,
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
git clone git@github.com:batistagroup/qflux.git
|
|
109
|
-
git pull
|
|
110
|
-
git checkout -b part_II_docs_spinchain
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
For example to contribute to the documentation, written in markdown (.md), edit the markdown in some form and make it complete (vim spin_chain.md for example).
|
|
114
|
-
Once complete, commit changes to file:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
git add spin_chain.md
|
|
118
|
-
git commit -m 'DOCS: Added docs on the spin chain example with Lindblad'
|
|
119
|
-
git push
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Generate a new pull request through github and assign to a tentative reviewer.
|
|
112
|
+
To contribute to the repository, follow the procedure outlined in the [Contribution Guidelines](https://github.com/batistagroup/qflux/blob/master/CONTRIBUTING.md) markdown file.
|
|
123
113
|
|
|
124
114
|
### Additional Repositories <a name="repos"></a>
|
|
125
115
|
|
|
116
|
+
This section includes additional repositories with functionality that has been integrated within QFlux.
|
|
117
|
+
|
|
126
118
|
[](https://github.com/dcabral00/qc_spin_tutorial) | Spin Chain Tutorial Repository
|
|
127
119
|
|
|
128
120
|
[](https://github.com/saurabhshivpuje/QMAD) | QMultiAdapt Repository
|
|
@@ -5,6 +5,7 @@ qflux/GQME/params.py,sha256=u7mHRdbbf88ccTIvw9Hb4AunlfNBrzara0OZTL80vwk,1822
|
|
|
5
5
|
qflux/GQME/readwrite.py,sha256=JUUEsDL8Ep705P8iwlQ4YjAm7MswQ-eNpH1wa8_P-_I,3583
|
|
6
6
|
qflux/GQME/tdvp.py,sha256=32Z_cLJornzM4D63nmqekhwtc-OosrQcZhIeEZAqq9s,7136
|
|
7
7
|
qflux/GQME/tt_tfd.py,sha256=-RPH9aiCinLzG0VdZo43UBVKWcuoplkFmi77oOtv5zU,15204
|
|
8
|
+
qflux/closed_systems/VarQTE.py,sha256=8Znw6R0jBsHnV_e5eGGMumcSG9HlUfRltuqevlBka9A,17956
|
|
8
9
|
qflux/closed_systems/__init__.py,sha256=CBnnqCBp0MD7jCGq1P0nzwCyR3okp4jkC8tvqWUTBCY,472
|
|
9
10
|
qflux/closed_systems/classical_methods.py,sha256=Etqjd9OkqCgPzhC2-FgQWlIiTu66V2_7LRftPDwBrb8,15882
|
|
10
11
|
qflux/closed_systems/custom_execute.py,sha256=Mk24DEvEbQlnu52MqhnSOGBpplHoAMz5__AcBKo1E_4,656
|
|
@@ -12,12 +13,12 @@ qflux/closed_systems/hamiltonians.py,sha256=ArdljgB7ASUq5QIKdN8CRdhf7b_2nFyb8OPa
|
|
|
12
13
|
qflux/closed_systems/qubit_methods.py,sha256=NPC0pLM8Jok4bpkTBcDvDNO3YqsCpw9S6MVMxRHwcuU,10882
|
|
13
14
|
qflux/closed_systems/spin_dynamics_oo.py,sha256=cn4aRM3wYkP6CBbL-LhlUMR4dqQSQK7bpSV-twSzFbU,13925
|
|
14
15
|
qflux/closed_systems/spin_propagators.py,sha256=pMg4ttThkXw2kzBlY2yDpdomTn-7alRtpKUAxD-vSl8,11496
|
|
15
|
-
qflux/closed_systems/utils.py,sha256=
|
|
16
|
+
qflux/closed_systems/utils.py,sha256=eiB5V0xvi43-jC35nKl2kMY_vr9r_-2njNn5qPLh494,6975
|
|
16
17
|
qflux/open_systems/__init__.py,sha256=pHbE5rHa0ktH9ZCWUECbmgXQxeS_dJ4PQ5GBhtM9uJk,102
|
|
17
18
|
qflux/open_systems/dilation_circuit.py,sha256=hzzIga8vE4HAyJT1WM0eOB4jA-e32g0dv7P70BfpazA,5908
|
|
18
19
|
qflux/open_systems/numerical_methods.py,sha256=Hv9CJwRa_Kdp8dP7nHt2JJfBx_5w1qMIj_Faaqs9IzM,11981
|
|
19
20
|
qflux/open_systems/params.py,sha256=VsMGDwPqmgxnyl1G_oufopZaNx2duiOQ3g-Bpjp3yJA,676
|
|
20
|
-
qflux/open_systems/quantum_simulation.py,sha256=
|
|
21
|
+
qflux/open_systems/quantum_simulation.py,sha256=5cd2b9BRyo7ZFk43KGrp45eq6KN4W7u2S4n9gh7aIzw,16723
|
|
21
22
|
qflux/open_systems/trans_basis.py,sha256=KG0BNDdW72CUcJ_Qffu8PjrMfJMCc9qhUwUloVX14Bw,4092
|
|
22
23
|
qflux/open_systems/walsh_gray_optimization.py,sha256=5IgHjknFYhWEslOzElicJvJUYwCWNZNqn3N1z-AQzMY,7682
|
|
23
24
|
qflux/typing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -25,14 +26,14 @@ qflux/typing/examples.py,sha256=Sj66GKPZas2ALTsy5Cq14ds26xOpsOQDhifAQ9tKVFw,853
|
|
|
25
26
|
qflux/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
27
|
qflux/utils/io.py,sha256=-d_nRKp2ePvLjOJNlRF9x8rs_2z6C5_jLBh-BuUFa80,480
|
|
27
28
|
qflux/utils/logging_config.py,sha256=xvrzBmXYGfd8NdNViT1ebyngXs8_UqRtkeY_4gQmV1w,2264
|
|
28
|
-
qflux/variational_methods/__init__.py,sha256=
|
|
29
|
-
qflux/variational_methods/qmad/__init__.py,sha256=
|
|
30
|
-
qflux/variational_methods/qmad/ansatz.py,sha256=
|
|
31
|
-
qflux/variational_methods/qmad/ansatzVect.py,sha256=
|
|
32
|
-
qflux/variational_methods/qmad/effh.py,sha256=
|
|
33
|
-
qflux/variational_methods/qmad/solver.py,sha256=
|
|
34
|
-
qflux-0.0.
|
|
35
|
-
qflux-0.0.
|
|
36
|
-
qflux-0.0.
|
|
37
|
-
qflux-0.0.
|
|
38
|
-
qflux-0.0.
|
|
29
|
+
qflux/variational_methods/__init__.py,sha256=lySF34XS-R-_cEIjpdXJEcB8_HQ-y-rk4U0hiqYoKNo,36
|
|
30
|
+
qflux/variational_methods/qmad/__init__.py,sha256=zK6Fgtes61fpubi-NQqw_l2ZL5hb2dOAQCmW8r9Np2w,86
|
|
31
|
+
qflux/variational_methods/qmad/ansatz.py,sha256=2ttVOrueLYycyXaBy1uxPkaTNEtkctL9wLc54LHHJOE,2969
|
|
32
|
+
qflux/variational_methods/qmad/ansatzVect.py,sha256=OJdRDhKBYou93fwetri5KXFoAj9N4cdjj799Nqu-qmE,2934
|
|
33
|
+
qflux/variational_methods/qmad/effh.py,sha256=l74femDGDDVCiHerfDDj2k30phyrYIlI_ssn4YU426g,3722
|
|
34
|
+
qflux/variational_methods/qmad/solver.py,sha256=1B9DpcuT7bpKcIWt1kHkxT3-gwQECdEzKFcBtJlFYDg,12751
|
|
35
|
+
qflux-0.0.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
36
|
+
qflux-0.0.2.dist-info/METADATA,sha256=1rRhjqS2949C8qCYtHxjAnemMNy7vEr-N6p_ZQ-B3qg,6871
|
|
37
|
+
qflux-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
38
|
+
qflux-0.0.2.dist-info/top_level.txt,sha256=GZgw1Z1DZDPg78NCF1dXCHw_f4usRh5HP5yLtgECIpo,6
|
|
39
|
+
qflux-0.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|