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

Updating solvers module to use arraylias #281

Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update qiskit_dynamics/solvers/solver_classes.py
Co-authored-by: Kento Ueda <[email protected]>
DanPuzzuoli and to24toro authored Jan 9, 2024

Verified

This commit was signed with the committer’s verified signature.
davelopez David López
commit b13dd696a67591696df2317c27d5ba261271a07d
2 changes: 1 addition & 1 deletion qiskit_dynamics/solvers/solver_classes.py
Original file line number Diff line number Diff line change
@@ -782,7 +782,7 @@ def validate_and_format_initial_state(y0: any, model: Union[HamiltonianModel, Li
if y0_cls in [DensityMatrix, SuperOp] and isinstance(model, HamiltonianModel):
y0 = np.eye(model.dim, dtype=complex)
# if LindbladModel is vectorized and simulating a density matrix, flatten
elif (y0_cls is DensityMatrix) and isinstance(model, LindbladModel) and model.vectorized:
elif (y0_cls is DensityMatrix) and is_lindblad_model_vectorized(model):
y0 = y0.flatten(order="F")

# validate y0 shape before passing to solve_lmde