hybridlane.wires.base

Attributes

WireType

qubits

Create a dictionary of qubit registers.

qumodes

Create a dictionary of qumode registers.

Classes

Qubit

Type representing a qubit

Qudit

Type representing a qudit with specified dimension

Qumode

Type representing a qumode

ComputationalBasis

Enum containing the different computational bases in CV-DV computing

BasisMap

Utility class for representing the computational basis that wires are measured in

TypeCheckResult

Represents the result of static analysis on a quantum circuit.

TypedWires

A register of wires with an associated type

TypedWire

A single wire with an associated type

Functions

typed_registers(register_dict, type)

Module Contents

hybridlane.wires.base.WireType
hybridlane.wires.base.typed_registers(register_dict, type)[source]
Parameters:
Return type:

dict

hybridlane.wires.base.qubits

Create a dictionary of qubit registers.

This has the same usage as pennylane.registers(), but the resulting wires are wrapped in TypedWires with type Qubit.

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 in TypedWires with type Qumode.

Example

>>> reg = hl.qumodes({"bob": 2})
{'bob': TypedWires(wires=Wires([0, 1]), wire_type=Qumode())}