View source on GitHub |
Allocates a new CleanQubit
/BorrowableQubit
for every qalloc
/qborrow
request.
Inherits From: QubitManager
cirq.SimpleQubitManager(
prefix: str = ''
)
Methods
qalloc
qalloc(
n: int, dim: int = 2
) -> List['cirq.Qid']
Allocate n
clean qubits, i.e. qubits guaranteed to be in state |0>.
qborrow
qborrow(
n: int, dim: int = 2
) -> List['cirq.Qid']
Allocate n
dirty qubits, i.e. the returned qubits can be in any state.
qfree
qfree(
qubits: Iterable['cirq.Qid']
) -> None
Free pre-allocated clean or dirty qubits managed by this qubit manager.