Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docstring for RydbergHamiltonian and hamiltonian method #990

Merged
merged 6 commits into from
Aug 2, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/bloqade/emulate/ir/state_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,20 @@ def tocsr(self, time: float) -> csr_matrix:

@dataclass(frozen=True)
class RydbergHamiltonian:
"""Hamiltonian for a given task.
With the `RydbergHamiltonian` you can convert the Hamiltonian to CSR matrix form
as well as obtaining the average energy/variance of a register.

Attributes:
emulator_ir (EmulatorProgram): A copy of the original program
used to generate the RydbergHamiltonian
space (Space): The Hilbert space of the Hamiltonian, should align with the register the
Hamiltonian is being applied on for average energy/variance
rydberg (NDArray): Rydberg interaction operator
detuning_ops (List[DetuningOperator]): Detuning Operators of the Hamiltonian
rabi_ops (List[RabiOperator]): Rabi Operators of the Hamiltonian
"""

emulator_ir: EmulatorProgram
space: Space
rydberg: NDArray
Expand Down
Loading