QubitCount

class QubitCount[source]

Bases: object

Each geometry will have a QubitCount class to maintain pointers to all qubits currently in use

QubitCount inits with 0 qubits and an empty qubit:references dictionary

Methods

decrement_qubit(key)[source]

Decrement number of references to qubit with ID key

Parameters:

key (int) – Unique ID of qubit

Return type:

None

increment_qubit(key)[source]

Increment number of references to qubit with ID key

Parameters:

key (int) – Unique ID of qubit

Return type:

None

new_qubit()[source]

Creates a new qubits_count dictionary entry. The key is ID of qubit. The value is the reference.

Returns:

Qubit ID

Return type:

int