AncillaRegister module

class AncillaRegister

Implements the AncillaRegister class. Use this class to define the extent of the quantum registers needed for the ancilla.

AncillaRegister(self, size, name='')

Creates a named quantum register of the required size for the ancilla qubits.

Example:
>>> ar = AncillaRegister(5, "a")
Args:
size (int):

The number of qubits in the ancilla register.

name (Optional[str]):

The name of the ancilla register. If no name is provided, the default name of “a_” will be used.

Returns:

AncillaRegister

Raises:
RunTimeError:

If no more qubits can be created.

size(self)

Returns the number of qubits in the ancilla register.

Args:

None

Returns:

int

Raises:

None

name(self)

Returns the name of the ancilla register.

Args:

None

Returns:

str

Raises:

None

prefix()

Returns the prefix character of the ancilla register.

Args:

None

Returns:

char

Raises:

None