circuit_components Package¶
circuit_components Package¶
This module contains all defined primitive circuit component definitions as well as the compiled circuit definitions
that are automatically created via the $QNET/bin/parse_qhdl.py script.
For some examples on how to create your own circuit definition file, check out the source code to
qnet.circuit_components.single_sided_jaynes_cummings_ccqnet.circuit_components.three_port_opo_ccqnet.circuit_components.kerr_cavity_cc
The module qnet.circuit_components.component features some base classes for component definitions and the module qnet.circuit_components.library
features some utility functions to help manage the circuit component definitions.
beamsplitter_cc Module¶
component Module¶
delay_cc Module¶
displace_cc Module¶
double_sided_opo_cc Module¶
kerr_cavity_cc Module¶
library Module¶
This module features some helper functions for automatically creating and managing a library of circuit component definition files.
-
qnet.circuit_components.library.camelcase_to_underscore(st)¶ Convert a camelcase entity name into an appropriate underscore name to import its corresponding module
-
qnet.circuit_components.library.getCDIM(component_name)[source]¶ Get the channel dimension of a referenced subcomponent
Parameters: component_name (str) – The entity name of the component Returns: The channel dimension of the component. Return type: int
-
qnet.circuit_components.library.make_namespace_string(namespace, sub_name)[source]¶ Make a namespace string by combining a namespace string with a new name.
Parameters: - namespace (str) – The namespace so far
- sub_name (str) – The additional name to add/
Returns: The combined namespace
Return type: str
-
qnet.circuit_components.library.write_component(entity, architectures, local=False)[source]¶ Write a new entity definition to a python module file.
Parameters: - entity (
qnet.qhdl.qhdl.Entity) – The entity object - architectures (dict) – A dictionary of architectures
dict(name = architecture)associated with the entity. - local (bool) – Whether or not to store the created module in the current/local directory or install it in :py:module:
qnet.circuit_components, default =False
Returns: The filename of the new module.
Return type: str
- entity (