class documentation

Wrapper to QisKit QuantumRegister to represent multiple qubits per qumode.

Implements __getitem__ to make QumodeRegister appear to work just like QuantumRegister with instances of CVCircuit.

Static Method calculate_cutoff Undocumented
Method __contains__ Return true if this QumodeRegister contains the given qubit. This allows callers to use in python syntax.
Method __getitem__ Return a list of QisKit Qubit for each indexed qumode
Method __init__ Initialize QumodeRegister
Method __iter__ Iterate over the list of lists representing the qubits for each qumode in the register
Method __len__ The length of a QumodeRegister is the number of qumodes (not the num_qumodes * num_qubits_per_qumode)
Method get_qumode_index Get the qumode index for the given qubit in this register
Instance Variable cutoff Undocumented
Instance Variable num_qubits_per_qumode Undocumented
Instance Variable num_qumodes Undocumented
Instance Variable qreg Undocumented
Instance Variable size Undocumented
@staticmethod
def calculate_cutoff(num_qubits_per_qumode: int): (source)

Undocumented

def __contains__(self, qubit): (source)

Return true if this QumodeRegister contains the given qubit. This allows callers to use in python syntax.

def __getitem__(self, key): (source)

Return a list of QisKit Qubit for each indexed qumode

Parameters
key:slice or intindex into qumode register
Returns
list;ost pf qubits from QuantumRegister representing qumode
Raises
ValueErrorif slice or int not provided
def __init__(self, num_qumodes: int, num_qubits_per_qumode: int = 2, name: str = None): (source)

Initialize QumodeRegister

Parameters
num_qumodes:inttotal number of qumodes
num_qubits_per_qumode:int, optionalNumber of qubits representing each qumode. Defaults to 2.
name:str, optionalName of register. Defaults to None.
def __iter__(self): (source)

Iterate over the list of lists representing the qubits for each qumode in the register

def __len__(self): (source)

The length of a QumodeRegister is the number of qumodes (not the num_qumodes * num_qubits_per_qumode)

def get_qumode_index(self, qubit): (source)

Get the qumode index for the given qubit in this register

Undocumented

num_qubits_per_qumode = (source)

Undocumented

num_qumodes = (source)

Undocumented

Undocumented

Undocumented