Recursive implementation of the Fenwick tree.
openfermion.transforms.FenwickTree(
n_qubits
)
Please see Subsection B.2. of Operator Locality in Quantum
Simulation of Fermionic Models (arXiv:1701.07072) for
a reference to the update set (U), the parity set (P) and the
children set (F) sets of the Fenwick.
Args |
n_qubits
|
Int, the number of qubits in the system
|
Methods
get_children_set
View source
get_children_set(
j
)
Returns the set of children of j-th site.
Args |
j
|
int
Fermionic site index.
|
Returns |
A list of children of j. ordered from lowest index.
|
get_node
View source
get_node(
j
)
Returns the node at j in the qubit register. Wrapper.
Args |
j
|
int
Fermionic site index.
|
Returns |
FenwickNode
|
the node at j.
|
get_parity_set
View source
get_parity_set(
j
)
Returns the union of the remainder set with children set.
Coincides
with the parity set of Tranter et al.
Args |
j
|
int
Fermionic site index.
|
get_remainder_set
View source
get_remainder_set(
j
)
Return the set of children with indices less than j of all ancestors of j.
The set C from (arXiv:1701.07072).
Args |
j
|
int
Fermionic site index.
|
Returns |
A list of children of j-ancestors with index less than j.
|
get_update_set
View source
get_update_set(
j
)
The set of all ancestors of j, (the update set U from the paper).
Args |
j
|
int
Fermionic site index.
|
Returns |
List of ancestors of j, ordered from earliest.
|
Class Variables |
root
|
None
|