SymbolicCircuitGraph

class scqubits.core.symbolic_circuit_graph.SymbolicCircuitGraph[source]

Methods

SymbolicCircuitGraph.__init__()

SymbolicCircuitGraph.are_branchsets_disconnected(...)

Determines whether two sets of branches are disconnected.

SymbolicCircuitGraph.check_transformation_matrix(...)

Method to identify the different modes in the transformation matrix provided by the user.

SymbolicCircuitGraph.from_yaml(input_string)

Constructs the instance of Circuit from an input string. Here is an example of an input string that is used to initiate an object of the class SymbolicCircuit::.

SymbolicCircuitGraph.variable_transformation_matrix()

Evaluates the boundary conditions and constructs the variable transformation matrix, which is returned along with the dictionary var_categories which classifies the types of variables present in the circuit.

static are_branchsets_disconnected(branch_list1, branch_list2)[source]

Determines whether two sets of branches are disconnected.

Parameters:
  • branch_list1 (List[Branch]) – first list of branches

  • branch_list2 (List[Branch]) – second list of branches

Returns:

Returns True if the branches have a connection, else False

Return type:

bool

check_transformation_matrix(transformation_matrix, enable_warnings=True)[source]

Method to identify the different modes in the transformation matrix provided by the user.

Parameters:
  • transformation_matrix (ndarray) – numpy ndarray which is a square matrix having the dimensions of the number of nodes present in the circuit.

  • warnings – If False, will not raise the warnings regarding any unidentified modes. It is set to True by default.

  • enable_warnings (bool)

Return type:

Dict[str, List[int]]

Returns:

A dictionary of lists which has the variable indices classified with var indices corresponding to the rows of the transformation matrix

classmethod from_yaml(input_string, from_file=True, basis_completion='heuristic', use_dynamic_flux_grouping=False, initiate_sym_calc=True)[source]

Constructs the instance of Circuit from an input string. Here is an example of an input string that is used to initiate an object of the class SymbolicCircuit:

#zero-pi.yaml
nodes    : 4
# zero-pi
branches:
- [JJ, 1,2, EJ = 10, 20]
- [JJ, 3,4, 10, 20]
- [L, 2,3, 0.008]
- [L, 4,1, 0.008]
- [C, 1,3, 0.02]
- [C, 2,4, 0.02]
Parameters:
  • input_string (str) – String describing the number of nodes and branches connecting then along with their parameters

  • from_file (bool) – Set to True by default, when a file name should be provided to input_string, else the circuit graph description in YAML should be provided as a string.

  • basis_completion (str) – choices: “heuristic” or “canonical”; used to choose a type of basis for completing the transformation matrix. Set to “heuristic” by default.

  • use_dynamic_flux_grouping (bool) – set to False by default. Indicates if the flux allocation is done by assuming that flux is time dependent. When set to True, it disables the option to change the closure branches.

  • initiate_sym_calc (bool) – set to True by default. Initiates the object attributes by calling the function initiate_symboliccircuit method when set to True. Set to False for debugging.

Returns:

Instance of the class SymbolicCircuit

variable_transformation_matrix()[source]

Evaluates the boundary conditions and constructs the variable transformation matrix, which is returned along with the dictionary var_categories which classifies the types of variables present in the circuit.

Return type:

Tuple[ndarray, Dict[str, List[int]]]

Returns:

tuple of transformation matrix for the node variables and var_categories dict which classifies the variable types for each variable index