class documentation
class QumodeRegister: (source)
Constructor: QumodeRegister(num_qumodes, num_qubits_per_qumode, name)
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 |
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 |
Get the qumode index for the given qubit in this register |
| Instance Variable | cutoff |
Undocumented |
| Instance Variable | num |
Undocumented |
| Instance Variable | num |
Undocumented |
| Instance Variable | qreg |
Undocumented |
| Instance Variable | size |
Undocumented |
Return true if this QumodeRegister contains the given qubit. This allows callers to use in python syntax.
Return a list of QisKit Qubit for each indexed qumode
| Parameters | |
key:slice or int | index into qumode register |
| Returns | |
list | ;ost pf qubits from QuantumRegister representing qumode |
| Raises | |
ValueError | if slice or int not provided |
The length of a QumodeRegister is the number of qumodes (not the num_qumodes * num_qubits_per_qumode)