quchip.results.propagator¶
Propagators of a sequence on the dressed states of a product of levels.
Functions
|
Return the propagator of a batch whose points start in the dressed states of |
Classes
|
Propagator of a sequence on the dressed states of a product of levels. |
- class quchip.results.propagator.PropagatorResult(matrix, labels, devices, leakage, frame, frequencies, ground_energy, times, omitted_channels, batch)[source]¶
Bases:
objectPropagator of a sequence on the dressed states of a product of levels.
matrix[i, j]is⟨d_i|U(T, t₀)|d_j⟩in the record’s frame. Here|d_k⟩is the dressed state of label k under the solve’s approximation and excitation cutoff, and U is the propagator from the first saved time t₀ to the last saved time T. A frame gives each label the energyE_k = ground_energy + Σᵢ fᵢ kᵢ, with the frequencies fᵢ offrequencies, and its matrix isexp(i 2π T E_i) ⟨d_i|U|d_j⟩_lab exp(−i 2π t₀ E_j). The dressed frame turns each selected device at its dressed frequency and removes the dressed ground energy. An idle label with at most one excitation then keeps amplitude 1, and other labels turn at their residual shifts, such as the static ZZ of two qubits. The integration frame gives the label amplitudes ofamplitude_array(), and the lab frame keeps every energy.- Variables:
matrix (array_like, shape (d, d)) – Final label in rows and initial label in columns.
labels (tuple of tuple of int) – Level of each selected device, for each row and column.
devices (tuple of str) – Selected devices. Every other device starts and is projected in level 0.
leakage (array_like, shape (d,)) – Probability
1 − Σᵢ|matrix[i, j]|²that input j leaves the labels. It does not depend on the frame.frame ({"dressed", "lab", "integration"}) – Frame of
matrix.frequencies (dict of str to scalar) – Frame frequency of each selected device, in GHz.
ground_energy (scalar) – Frame energy of the all-ground label, in GHz.
times (tuple of scalar) – Start time t₀ and end time T, in ns.
omitted_channels (tuple of str) – Collapse channels that the solve left out. The matrix is the propagator of the Hamiltonian alone.
batch (SimulationBatchResult) – The solve of each input, in the order of
labels.
- fidelity(target)[source]¶
Return the average gate fidelity of the propagator against a unitary target.
For a target V of dimension d, the average over pure inputs in the labels is
(Tr(M†M) + |Tr(V†M)|²) / (d(d + 1)), with M thematrix. Leakage lowersTr(M†M), so it lowers the fidelity. The target is written in the frame and label order of this record.- Parameters:
target (array_like, shape (d, d)) – Unitary target in the frame and label order of this record.
- quchip.results.propagator.subspace_propagator(batch, devices, labels, frame, omitted_channels)[source]¶
Return the propagator of a batch whose points start in the dressed states of
labels.Point j of
batchstarts in the dressed state oflabels[j]. Row i of the integration-frame matrix projects every final state on the label target oflabels[i].- Parameters:
batch (SimulationBatchResult) – Ket solves that share one chip, approximation, frame and time grid.
devices (tuple of str) – Selected devices, in the order of the levels of each label.
labels (tuple of tuple of int) – Level of each selected device, for each input.
frame ({"dressed", "lab", "integration"}) – Frame of the returned matrix.
omitted_channels (tuple of str) – Collapse channels that the solves left out.