hybridlane.wires.base¶
Base type definitions for type checking
Attributes¶
Classes¶
Type representing a qubit |
|
Type representing a qudit with specified dimension |
|
Type representing a qumode |
|
Enum containing the different computational bases in CV-DV computing |
|
Utility class for representing the computational basis that wires are measured in |
|
Represents the result of static analysis on a quantum circuit. |
|
A register of wires with an associated type |
|
A single wire with an associated type |
Functions¶
|
Creates a register of wires that have a particular, statically-declared type |
Module Contents¶
- hybridlane.wires.base.WireType¶
- hybridlane.wires.base.typed_registers(register_dict, type)[source]¶
Creates a register of wires that have a particular, statically-declared type
This function is analogous to
pennylane.registers(), but the resulting wires are wrapped with a specific type, allowing you to declare a set of registers that have a particular type.This could be useful when defining a circuit that has uninformative operations (like Identity), and this may be used in the future for polymorphic operations.
- hybridlane.wires.base.qubits¶
Create a dictionary of qubit registers.
This has the same usage as
pennylane.registers(), but the resulting wires are wrapped inTypedWireswith typeQubit.Example
>>> reg = hl.qubits({"alice": 2}) {'alice': TypedWires(wires=Wires([0, 1]), wire_type=Qubit())}
- hybridlane.wires.base.qumodes¶
Create a dictionary of qumode registers.
This has the same usage as
pennylane.registers(), but the resulting wires are wrapped inTypedWireswith typeQumode.Example
>>> reg = hl.qumodes({"bob": 2}) {'bob': TypedWires(wires=Wires([0, 1]), wire_type=Qumode())}