xir.Declaration¶
- class Declaration(name: str, type_: str, params: Optional[Sequence[str]] = None, wires: Optional[Union[Sequence[Wire], ...]] = None)[source]¶
Bases:
object
General declaration for declaring observables, gates, functions and outputs.
- Parameters
name (str) – name of the declaration
type (str) – The type of declaration. Can be either “gate”, “obs”, “out” or “func”.
params (Sequence[str]) – parameters used by the declared object
wires (Sequence[Wire]) – wires that the declared object is applied to
Attributes
Returns the name of the declaration.
Returns the parameters of the declaration.
Returns the type of the declaration.
Returns the wires of the declaration.
- name¶
Returns the name of the declaration.
- params¶
Returns the parameters of the declaration.
- type_¶
Returns the type of the declaration.
- wires¶
Returns the wires of the declaration.
api/xir.Declaration
Download Python script
Download Notebook
View on GitHub