geope.lie.pauli_projector¤
geope.lie.pauli_projector.project_omegas(x, basis, dim)
¤
Project a batch of matrices onto a Lie algebra basis.
Computes the trace inner product of each matrix in x with
each basis element, normalised by the Hilbert-space dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
|
required |
basis
|
Array
|
Basis tensor |
required |
dim
|
int
|
Hilbert-space dimension \(d\). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Real |
geope.lie.pauli_projector.get_project_omegas_fn(basis)
¤
Create a partial projection function with a fixed basis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
basis
|
Basis
|
A |
required |
Returns:
| Type | Description |
|---|---|
Callable[[Array], Array]
|
A |
Callable[[Array], Array]
|
matrices and returns the projected coefficients. |
geope.lie.pauli_projector.get_kron_chain(n)
¤
Build a JIT-compiled Kronecker product chain function.
Constructs the four single-qubit Pauli matrices and returns a function that builds an \(n\)-qubit Pauli string via iterated Kronecker products.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Number of qubits. |
required |
Returns:
| Type | Description |
|---|---|
Callable[[Array], Array]
|
A JIT-compiled |
Callable[[Array], Array]
|
combination index array of length |
Callable[[Array], Array]
|
returns the corresponding |
geope.lie.pauli_projector.get_project_omegas_fn_otf(basis, batch_size=None)
¤
Create an on-the-fly omega projection function.
Instead of storing the full basis in memory, Pauli strings are constructed on the fly via Kronecker products. Useful when the number of qubits exceeds 5.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
basis
|
Basis
|
A |
required |
batch_size
|
int | None
|
Optional number of batches to split the
Pauli combinations into. If |
None
|
Returns:
| Type | Description |
|---|---|
Callable[[Array], Array]
|
A vmapped |
Callable[[Array], Array]
|
of matrices and returns projected coefficients. |