State vector
AnalogGate dataclass ¶
run ¶
run(
shots=1,
solver_name="dop853",
atol=1e-14,
rtol=1e-07,
nsteps=2147483647,
interaction_picture=False,
project_hyperfine=True,
)
Run the emulation with all atoms in the ground state, sampling the final state vector.
Source code in src/bloqade/emulate/ir/state_vector.py
RydbergHamiltonian dataclass ¶
average ¶
Get energy average from RydbergHamiltonian object at time time with register register
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register | StateVector | The state vector to take average with | required |
time | Optional[float] | Time value to evaluate average at. | None |
Returns:
| Name | Type | Description |
|---|---|---|
float | float | average energy at time |
Source code in src/bloqade/emulate/ir/state_vector.py
average_and_variance ¶
Get energy average and variance from RydbergHamiltonian object at time time with register register
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register | StateVector | The state vector to take average and variance with | required |
time | Optional[float] | Time value to evaluate average at. | None |
Returns:
| Type | Description |
|---|---|
float | Tuple[float, float]: average and variance of energy at time |
float | respectively. |
Source code in src/bloqade/emulate/ir/state_vector.py
expectation_value ¶
Calculate expectation values of one and two body operators.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register | ndarray | Register to evaluate expectation value with | required |
operator | ndarray | Operator to take expectation value of. | required |
site_indices | (int, Tuple[int, int]) | site/sites to evaluate | required |
Raises:
| Type | Description |
|---|---|
ValueError | Error is raised when the dimension of |
Returns:
| Name | Type | Description |
|---|---|---|
complex | complex | The expectation value. |
Source code in src/bloqade/emulate/ir/state_vector.py
variance ¶
Get the energy variance from RydbergHamiltonian object at time time with register register
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register | StateVector | The state vector to take variance with | required |
time | Optional[float] | Time value to evaluate average at. | None |
Returns:
| Name | Type | Description |
|---|---|---|
complex | float | variance of energy at time |
Source code in src/bloqade/emulate/ir/state_vector.py
StateVector dataclass ¶
local_trace ¶
return trace of an operator over the StateVector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
matrix | ndarray | Square matrix representing operator in the local hilbert space. | required |
site_indices | Union[int, Tuple[int, int]] | sites to apply operator to. | required |
Returns:
| Name | Type | Description |
|---|---|---|
complex | complex | the trace of the operator over the state-vector. |