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

Rotation Class Liouvillian Superoperator #252

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Feb 1, 2024

closes #251

@AngsarM AngsarM marked this pull request as ready for review February 12, 2024 14:12
@@ -79,7 +80,7 @@ def _rotMat(self, collapseOps = None, decayRates = None, openSys=False): #pylint
flipOpN = operators.compositeOp(rotOp(sys[i+1].dimension, isDim=True),
sys[i+1]._dimsBefore, sys[i+1]._dimsAfter)
flipUn = evolution.Unitary(self.phase*self.angle*flipOpN) @ flipUn
self._paramBoundBase__matrix = evolution._prepostSO(flipUn) if (openSys or isinstance(collapseOps, list) or self._isOpen) else flipUn # pylint: disable=assigning-non-slot,line-too-long,protected-access
self._paramBoundBase__matrix = evolution._prepostSO(operatorA = flipUn, operatorB = hc(flipUn)) if (openSys or isinstance(collapseOps, list) or self._isOpen) else flipUn # pylint: disable=assigning-non-slot,line-too-long,protected-access
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self._paramBoundBase__matrix = evolution._prepostSO(operatorA = flipUn, operatorB = hc(flipUn)) if (openSys or isinstance(collapseOps, list) or self._isOpen) else flipUn # pylint: disable=assigning-non-slot,line-too-long,protected-access
self._paramBoundBase__matrix = evolution._prepostSO(operatorA = flipUn, operatorB = linearAlgebra.hc(flipUn)) if (openSys or isinstance(collapseOps, list) or self._isOpen) else flipUn # pylint: disable=assigning-non-slot,line-too-long,protected-access

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch.
For my open Heisenberg DQS simulations, I was only using xGate with $angle = \frac{\pi}{2}$, therefore flipUn was $i\sigma_{x}$, whose hc is $-i\sigma_{x}$. This means that the effect of this bug on my simulations is a global phase. But, since I apply the these xGate for even number of times, this global phase cancels out.
Do you agree? if so, I am curious how did you found out this mistake?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the global phase cancels out.
I don't remember exactly, but I think I tested every step individually using Quantum Toolbox, and rotation operators were producing matrices with a minus sign as you described.

Do you want me to write a unit test as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants