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

Bugfixes for Example notebooks. #242

Merged
merged 4 commits into from
Apr 29, 2022
Merged

Bugfixes for Example notebooks. #242

merged 4 commits into from
Apr 29, 2022

Conversation

sserita
Copy link
Contributor

@sserita sserita commented Apr 28, 2022

This should resolve #240.

sserita and others added 4 commits April 28, 2022 14:19
Fixes errors like:

AttributeError: module 'jinja2' has no attribute 'evalcontextfilter'

caused by changes to the jinja2 API when moving from version 2->3.
Note: this breaks compatibility with jinja2 vesion 2.x, so if you get
errors about jinja2 not having the attribute 'pass_eval_context' then
you just need to update jinja2.
Following the updates to elementary error generator construction (now
closely following the taxonomy paper), the elementary error generator basis
should usually be the un-normalized (traditional) Pauli-product basis when
the state space is composed of qubits.  This gives the intuitively expected
coefficients, e.g. 0.5pi for the Hamiltonian projection of a pi/2 rotation gate.
This commit updates the report quantities giving the projections onto gates and
error generators to use the 'PP' basis whenever the model space is entirely qubits,
and to only fall back on the model's superoperator basis in other cases.  This means
that the intuitive error generator coefficients and gate decomposition should occur
within reports for qubit models.  However, in other (e.g. qutrit model) cases, the
code still falls back to the model basis - and this may not be what we actually want.
FUTURE work: fix/improve the elementary errorgen basis selection for non-qubit models.
Copy link
Collaborator

@enielse enielse left a comment

Choose a reason for hiding this comment

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

Look good.

@enielse enielse merged commit b3fc7b3 into develop Apr 29, 2022
@enielse enielse deleted the bugfix-bootstrap-example branch April 29, 2022 00:46
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