c3.libraries.propagation
¶
A library for propagators and closely related functions
Module Contents¶
- c3.libraries.propagation.sum_h0_hks(h0, hks, cf_t)[source]¶
Compute and Return
H(t) = H_0 + sum_k c_k H_k.
- c3.libraries.propagation.pwc(model: c3.model.Model, gen: c3.generator.generator.Generator, instr: c3.signal.gates.Instruction, folding_stack: list, batch_size=None) Dict [source]¶
Solve the equation of motion (Lindblad or Schrรถdinger) for a given control signal and Hamiltonians.
- Parameters
signal (dict) – Waveform of the control signal per drive line.
gate (str) – Identifier for one of the gates.
- Returns
Matrix representation of the gate.
- Return type
unitary
- c3.libraries.propagation.tf_dU_of_t(h0, hks, cflds_t, dt)[source]¶
Compute H(t) = H_0 + sum_k c_k H_k and matrix exponential exp(-i H(t) dt).
- Parameters
h0 (tf.tensor) – Drift Hamiltonian.
hks (list of tf.tensor) – List of control Hamiltonians.
cflds_t (array of tf.float) – Vector of control field values at time t.
dt (float) – Length of one time slice.
- Returns
dU = exp(-i H(t) dt)
- Return type
tf.tensor
- c3.libraries.propagation.tf_dU_of_t_lind(h0, hks, col_ops, cflds_t, dt)[source]¶
Compute the Lindbladian and it’s matrix exponential exp(L(t) dt).
- Parameters
h0 (tf.tensor) – Drift Hamiltonian.
hks (list of tf.tensor) – List of control Hamiltonians.
col_ops (list of tf.tensor) – List of collapse operators.
cflds_t (array of tf.float) – Vector of control field values at time t.
dt (float) – Length of one time slice.
- Returns
dU = exp(L(t) dt)
- Return type
tf.tensor
- c3.libraries.propagation.tf_batch_propagate(hamiltonian, hks, signals, dt, batch_size, col_ops=None, lindbladian=False)[source]¶
Propagate signal in batches :param hamiltonian: Drift Hamiltonian :type hamiltonian: tf.tensor :param hks: List of control hamiltonians :type hks: Union[tf.tensor, List[tf.tensor]] :param signals: List of control signals, one per control hamiltonian :type signals: Union[tf.tensor, List[tf.tensor]] :param dt: Length of one time slice :type dt: float :param batch_size: Number of elements in one batch :type batch_size: int
- c3.libraries.propagation.tf_propagation(h0, hks, cflds, dt)[source]¶
Calculate the unitary time evolution of a system controlled by time-dependent fields.
- Parameters
h0 (tf.tensor) – Drift Hamiltonian.
hks (list of tf.tensor) – List of control Hamiltonians.
cflds (list) – List of control fields, one per control Hamiltonian.
dt (float) – Length of one time slice.
- Returns
List of incremental propagators dU.
- Return type
list
- c3.libraries.propagation.evaluate_sequences(propagators: Dict, sequences: list)[source]¶
Compute the total propagator of a sequence of gates.
- Parameters
propagators (dict) – Dictionary of unitary representation of gates.
sequences (list) –
List of keys from propagators specifying a gate sequence. The sequence is multiplied from the left, i.e.
sequence = [U0, U1, U2, …]
- is applied as
… U2 * U1 * U0
- Returns
Propagator of the sequence.
- Return type
tf.tensor