Skip to content

Commit

Permalink
Update to quantum-pecos 0.5dev6 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec authored Jan 5, 2024
1 parent 3335e03 commit e8d9e1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "pytket_pecos"
version = "0.1.6"
version = "0.1.7"
description = "This package enables emulation of pytket circuits using the PECOS emulator."
authors = [{name = "Alec Edgington", email = "[email protected]"}]
license = {file = "LICENSE"}
Expand All @@ -20,7 +20,7 @@ dependencies = [
"pytket >= 1.22.0",
"pytket-phir >= 0.2.0",
"projectq >= 0.8.0",
"quantum-pecos >= 0.5.dev5"
"quantum-pecos >= 0.5.dev6"
]

[project.urls]
Expand Down
11 changes: 11 additions & 0 deletions test/test_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ def test_conditional(self):
results = emu.run(n_shots=n_shots)
self.assertTrue(all(n in [0, 3] for n in results.to_intlist()))

def test_setbits(self):
# https://github.com/CQCL/pytket-pecos/issues/9
c = Circuit(1)
a = c.add_c_register("a", 3)
b = c.add_c_register("b", 3)
c.add_c_setbits([True, True, False], a)
c.add_c_copyreg(a, b)
emu = Emulator(c)
result = emu.run(n_shots=1).to_intlist()[0]
assert result == 0b110110


if __name__ == "__main__":
unittest.main()

0 comments on commit e8d9e1d

Please sign in to comment.