qml.tape.AnnotatedQueue

class AnnotatedQueue[source]

Bases: pennylane.tape.queuing.QueuingContext

Lightweight class that maintains a basic queue of operations, in addition to metadata annotations.

queue

Returns a list of objects in the annotated queue

queue

Returns a list of objects in the annotated queue

active_context()

Returns the currently active queuing context.

append(obj, **kwargs)

Append an object to the queue(s).

get_info(obj)

Retrieves information of an object in the active queue.

recording()

Whether a queuing context is active and recording operations

remove(obj)

Remove an object from the queue(s) if it is in the queue(s).

update_info(obj, **kwargs)

Updates information of an object in the active queue.

classmethod active_context()

Returns the currently active queuing context.

classmethod append(obj, **kwargs)

Append an object to the queue(s).

Parameters

obj – the object to be appended

classmethod get_info(obj)

Retrieves information of an object in the active queue.

Parameters

obj – the object with metadata to be retrieved

Returns

object metadata

classmethod recording()

Whether a queuing context is active and recording operations

classmethod remove(obj)

Remove an object from the queue(s) if it is in the queue(s).

Parameters

obj – the object to be removed

classmethod update_info(obj, **kwargs)

Updates information of an object in the active queue.

Parameters

obj – the object with metadata to be updated