supergrad.helper.Spectrum#
- class supergrad.helper.Spectrum(graph, truncated_dim=5, add_random=True, share_params=False, unify_coupling=False, *args, **kwargs)[source]#
Helper for constructing spectrum computing function of the quantum system based on the graph which contain all information about qubits and pulse. The functions constructed by this way are pure and transformable by JAX.
- Parameters:
graph (SCGraph) – The graph containing all Hamiltonian parameters.
truncated_dim (int) – desired dimension of the truncated qubit subsystem
add_random (bool) – If true, will add random deviations to the device parameters
share_params (bool) – Share device parameters between the qubits that have the same shared_param_mark. This is used only for gradient computation. One must define shared_param_mark in the graph.nodes[‘qubit’][‘shared_param_mark’].
unify_coupling (bool) – Let all couplings in the quantum system be the same. TODO: if set to true, which coupling will be used to do the computation?
- __init__(graph, truncated_dim=5, add_random=True, share_params=False, unify_coupling=False, *args, **kwargs) None[source]#
Methods
__init__(graph[, truncated_dim, add_random, ...])construct_transform_matrix()Constructing the transform matrix from product basis to eigenbasis.
eigensystem()Calculate quantum system's eigenenergy and eigenvectors using jax.scipy.linalg.eigh.
energy_tensor([greedy_assign, ...])Return the eigenenergy of quantum system in tensor form.
get_dims()get_model_eigen_basis(list_qubit_name, ...)Compute the quantum system properties in multi-qubit eigen basis.
idling_hamiltonian_in_prod_basis()Return the idling Hamiltonian in product basis.
ls_params([attr])Get all parameters for the selected attribute.
n_operator(node_name[, transform])Return the operator of the selected node.
phi_operator(node_name[, transform])Return the operator of the selected node.
Attributes
all_paramsThe static parameters dictionary.
device_paramsThe device parameters dictionary.
dimsThe dimension of the composited quantum system.