Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Pengfei Chen committed May 10, 2024
1 parent 4d54a01 commit 39fe775
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions unitary/alpha/qudit_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ class Superpose(QuantumEffect):
all pure states.
"""

def __init__(self):
pass

def effect(self, *objects):
for q in objects:
if q.qubit.dimension == 2:
Expand All @@ -152,5 +149,5 @@ class QuditSuperpose(Superpose):
Will be removed in 2024.
"""

def __init__(self, dimension: int):
def __init__(self):
super().__init__()
2 changes: 1 addition & 1 deletion unitary/alpha/qudit_effects_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_qudit_superpose():
board = alpha.QuantumWorld(sampler=cirq.Simulator(), compile_to_qubits=False)
piece = alpha.QuantumObject("t", StopLight.GREEN)
board.add_object(piece)
alpha.QuditSuperpose(3)(piece)
alpha.QuditSuperpose()(piece)
results = board.peek([piece], count=100)
assert any(result == [StopLight.RED] for result in results)
assert any(result == [StopLight.YELLOW] for result in results)
Expand Down

0 comments on commit 39fe775

Please sign in to comment.