Circuit analysis

Starting from a list of components, you can create a quantum circuit that can be analyzed using the functions provided by the QCircuit class.

Below is a list of the main methods available for circuit analysis, along with their descriptions and usage.

class qultra.QCircuit(netlist, f_starting_point, f_end_point, loops=None)[source]

Bases: object

Represents a quantum circuit.

Parameters:
  • netlist (list) – List of component instances that define the circuit.

  • f_starting_point (float) – The start frequency of the interval over which the circuit is analyzed.

  • f_end_point (float) – The end frequency of the interval over which the circuit is analyzed.

  • loops (list of loop, optional) – Fundamental loops (loops that do not contain other loops) threaded by a time-dependent external flux. When the Hamiltonian is computed, the external flux of each loop is distributed among the branches of the circuit in the irrotational gauge and assigned to the phi_ext attribute of the J, L and CPW components, added to any static phi_ext already set by the user. All the fundamental loops not listed are assumed to have zero flux. If three or more components are connected in parallel between the same two nodes, the zero-flux loops among them must also be listed explicitly (with flux 0). Default is an empty list (no time-dependent fluxes).

modes
Each element is a list of two values:
  • The first value represents the eigenmode frequency in GHz.

  • The second value represents the eigenmode dissipation rate in MHz.

Type:

list of lists of length 2

build_total_Y_matrix(z)[source]

Builds the total admittance matrix Y for the circuit, assuming node 0 is ground and should be excluded from the final matrix.

Parameters:

z (complex) – complex variable (e.g., z = jω or k + jω)

Returns:

Y_reduced – Reduced admittance matrix (excluding ground node 0)

Return type:

numpy matrix

get_Z_submatrix(port, f, k=0)[source]

Compute the impedance submatrix corresponding to a given set of nodes.

Parameters:
  • port (list of int) – List of node indices (1-based numbering) for which the impedance submatrix is extracted.

  • f (float) – Frequency in GHz at which the impedance matrix is computed.

  • k (float, optional) – Dissipation rate in MHz at which the impedance matrix is computed. Default is 0.

Returns:

Z_submatrix – Impedance submatrix corresponding to the selected nodes.

Return type:

ndarray of complex, shape (len(nodes), len(nodes))

kappa()[source]

Returns the kappa of the modes of the circuit [MHz]

Returns:

kappa – Mode dissipation rates in MHz.

Return type:

list

mode_frequencies()[source]

Returns the frequencies of the modes of the circuit [GHz]

Returns:

frequencies – Mode frequencies in GHz.

Return type:

list

run_epr()[source]

Compute the Cross-Kerr matrix using the energy participation ratio method.

Returns:

  • chi (numpy.ndarray) – The Cross-Kerr matrix of the system [MHz].

  • p (numpy.ndarray) – The energy participation ratio matrix.

show_all()[source]

Show all the key parameter of the circuit

show_chi()[source]

Function to visualize the Cross-Kerr matrix

show_modes()[source]

Function to visualize the modes of the circuit