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)[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.

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 – The Cross-Kerr matrix of the system [MHz].

Return type:

numpy.ndarray

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