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

More small updates #205

Merged
merged 5 commits into from
Nov 29, 2023
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
Next Next commit
Updated embedded docs
  • Loading branch information
edyounis committed Nov 29, 2023
commit 6252921f66736343848a3a0df04d44be5c98ec47
9 changes: 8 additions & 1 deletion bqskit/ir/gates/composed/embedded.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ class EmbeddedGate(ComposedGate, DifferentiableUnitary):

This concept can be generalized to multiple qudits and even
mixed-radix systems.

Note:
- Global phase inconsistencies in gates will become local phase
inconsistencies in the embedded gate. For example, if the
global phase difference between the U1Gate and the RZGate
will become local phase differences in the corresponding
subspaces when embedded into a higher-dimensional qudit.
"""

def __init__(
Expand Down Expand Up @@ -201,7 +208,7 @@ def __init__(
self.gate = gate
self.level_maps = tuple([tuple(list(lmap)) for lmap in level_maps])
self._num_qudits = gate._num_qudits
self._name = 'Embedded(%s)' % self.gate.name # TODO: include radixes and level maps # noqa: E501
self._name = 'Embedded(%s)%s' % (self.gate.name, self.level_maps)
self._num_params = self.gate._num_params
self._radixes = tuple(radixes)
self._dim = int(np.prod(self.radixes))
Expand Down