qdyn.prop_gate module¶
Support routines for the qdyn_prop_gate utility
Summary¶
Functions:
Yield gates in gates_file, where gates_file is in the format written by the |
Reference¶
-
qdyn.prop_gate.
get_prop_gate_of_t
(gates_file, with_t=False)[source]¶ Yield gates in gates_file, where gates_file is in the format written by the
qdyn_prop_gate
utility’s--write-gate
option. That is, each row in gates_files has \(2 n^2 + 1\) columns. The first column is a time stamp, the remaining columns are the real and imaginary part for each entry in the \(n \times n\) gate (vectorized in column-major format). If with_t is False (default), yield only the gates, otherwise yield both the gates and the time stamp for each gate- Returns
If
with_t=False
, iterator over gates, where each gate is a complex \(n \times n\) numpy matrix, or a Gate2Q instance for a $4 times 4$ gateIf
with_t=True
, iterator of tuples(gate, t)
, wheret
is a float or an instance of UnitFloat if the time unit can be derived from the header of gates_file