Skip to content

Commit

Permalink
Add support for directional registers to enable lossless Cirq-FT interop
Browse files Browse the repository at this point in the history
  • Loading branch information
tanujkhattar committed Sep 28, 2023
1 parent d84860d commit 5fd4fe5
Show file tree
Hide file tree
Showing 11 changed files with 362 additions and 269 deletions.
4 changes: 2 additions & 2 deletions dev_tools/requirements/deps/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cirq-core==1.3.0.dev20230925183640
cirq-ft==1.3.0.dev20230925183640
cirq-core==1.3.0.dev20230928195458
cirq-ft==1.3.0.dev20230928195458

# drawing
pydot
Expand Down
12 changes: 6 additions & 6 deletions dev_tools/requirements/envs/dev.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ cachetools==5.3.1
# via cirq-ft
certifi==2023.7.22
# via requests
cffi==1.15.1
cffi==1.16.0
# via cryptography
charset-normalizer==3.2.0
# via requests
cirq-core==1.3.0.dev20230925183640
cirq-core==1.3.0.dev20230928195458
# via
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230925183640
cirq-ft==1.3.0.dev20230928195458
# via -r deps/runtime.txt
click==8.1.7
# via
Expand Down Expand Up @@ -169,7 +169,7 @@ jupyter-client==8.3.1
# via
# ipykernel
# nbclient
jupyter-core==5.3.1
jupyter-core==5.3.2
# via
# ipykernel
# jupyter-client
Expand Down Expand Up @@ -392,7 +392,7 @@ rpds-py==0.10.3
# via
# jsonschema
# referencing
scipy==1.11.2
scipy==1.11.3
# via
# cirq-core
# quimb
Expand Down Expand Up @@ -467,7 +467,7 @@ tqdm==4.66.1
# via
# cirq-core
# quimb
traitlets==5.10.0
traitlets==5.10.1
# via
# comm
# ipykernel
Expand Down
10 changes: 5 additions & 5 deletions dev_tools/requirements/envs/docs.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ charset-normalizer==3.2.0
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.3.0.dev20230925183640
cirq-core==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230925183640
cirq-ft==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -194,7 +194,7 @@ jupyter-client==8.3.1
# -c envs/dev.env.txt
# ipykernel
# nbclient
jupyter-core==5.3.1
jupyter-core==5.3.2
# via
# -c envs/dev.env.txt
# ipykernel
Expand Down Expand Up @@ -426,7 +426,7 @@ rpds-py==0.10.3
# -c envs/dev.env.txt
# jsonschema
# referencing
scipy==1.11.2
scipy==1.11.3
# via
# -c envs/dev.env.txt
# cirq-core
Expand Down Expand Up @@ -523,7 +523,7 @@ tqdm==4.66.1
# -c envs/dev.env.txt
# cirq-core
# quimb
traitlets==5.10.0
traitlets==5.10.1
# via
# -c envs/dev.env.txt
# comm
Expand Down
10 changes: 5 additions & 5 deletions dev_tools/requirements/envs/format.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ cachetools==5.3.1
# via
# -c envs/dev.env.txt
# cirq-ft
cirq-core==1.3.0.dev20230925183640
cirq-core==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230925183640
cirq-ft==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -137,7 +137,7 @@ jupyter-client==8.3.1
# via
# -c envs/dev.env.txt
# nbclient
jupyter-core==5.3.1
jupyter-core==5.3.2
# via
# -c envs/dev.env.txt
# jupyter-client
Expand Down Expand Up @@ -319,7 +319,7 @@ rpds-py==0.10.3
# -c envs/dev.env.txt
# jsonschema
# referencing
scipy==1.11.2
scipy==1.11.3
# via
# -c envs/dev.env.txt
# cirq-core
Expand Down Expand Up @@ -368,7 +368,7 @@ tqdm==4.66.1
# -c envs/dev.env.txt
# cirq-core
# quimb
traitlets==5.10.0
traitlets==5.10.1
# via
# -c envs/dev.env.txt
# comm
Expand Down
10 changes: 5 additions & 5 deletions dev_tools/requirements/envs/pylint.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ cachetools==5.3.1
# via
# -c envs/dev.env.txt
# cirq-ft
cirq-core==1.3.0.dev20230925183640
cirq-core==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230925183640
cirq-ft==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -129,7 +129,7 @@ jupyter-client==8.3.1
# via
# -c envs/dev.env.txt
# nbclient
jupyter-core==5.3.1
jupyter-core==5.3.2
# via
# -c envs/dev.env.txt
# jupyter-client
Expand Down Expand Up @@ -315,7 +315,7 @@ rpds-py==0.10.3
# -c envs/dev.env.txt
# jsonschema
# referencing
scipy==1.11.2
scipy==1.11.3
# via
# -c envs/dev.env.txt
# cirq-core
Expand Down Expand Up @@ -367,7 +367,7 @@ tqdm==4.66.1
# -c envs/dev.env.txt
# cirq-core
# quimb
traitlets==5.10.0
traitlets==5.10.1
# via
# -c envs/dev.env.txt
# comm
Expand Down
10 changes: 5 additions & 5 deletions dev_tools/requirements/envs/pytest.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ cachetools==5.3.1
# via
# -c envs/dev.env.txt
# cirq-ft
cirq-core==1.3.0.dev20230925183640
cirq-core==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230925183640
cirq-ft==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -141,7 +141,7 @@ jupyter-client==8.3.1
# -c envs/dev.env.txt
# ipykernel
# nbclient
jupyter-core==5.3.1
jupyter-core==5.3.2
# via
# -c envs/dev.env.txt
# ipykernel
Expand Down Expand Up @@ -349,7 +349,7 @@ rpds-py==0.10.3
# -c envs/dev.env.txt
# jsonschema
# referencing
scipy==1.11.2
scipy==1.11.3
# via
# -c envs/dev.env.txt
# cirq-core
Expand Down Expand Up @@ -399,7 +399,7 @@ tqdm==4.66.1
# -c envs/dev.env.txt
# cirq-core
# quimb
traitlets==5.10.0
traitlets==5.10.1
# via
# -c envs/dev.env.txt
# comm
Expand Down
10 changes: 5 additions & 5 deletions dev_tools/requirements/envs/runtime.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ cachetools==5.3.1
# via
# -c envs/dev.env.txt
# cirq-ft
cirq-core==1.3.0.dev20230925183640
cirq-core==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230925183640
cirq-ft==1.3.0.dev20230928195458
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -117,7 +117,7 @@ jupyter-client==8.3.1
# via
# -c envs/dev.env.txt
# nbclient
jupyter-core==5.3.1
jupyter-core==5.3.2
# via
# -c envs/dev.env.txt
# jupyter-client
Expand Down Expand Up @@ -290,7 +290,7 @@ rpds-py==0.10.3
# -c envs/dev.env.txt
# jsonschema
# referencing
scipy==1.11.2
scipy==1.11.3
# via
# -c envs/dev.env.txt
# cirq-core
Expand Down Expand Up @@ -334,7 +334,7 @@ tqdm==4.66.1
# -c envs/dev.env.txt
# cirq-core
# quimb
traitlets==5.10.0
traitlets==5.10.1
# via
# -c envs/dev.env.txt
# comm
Expand Down
2 changes: 1 addition & 1 deletion qualtran/bloqs/swap_network_cirq_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_swap_with_zero_gate(selection_bitsize, target_bitsize, n_target_registe
def test_swap_with_zero_gate_diagram():
gate = SwapWithZeroGate(3, 2, 4)
q = cirq.LineQubit.range(cirq.num_qubits(gate))
circuit = cirq.Circuit(gate.on_registers(**cirq_ft.infra.split_qubits(gate.registers, q)))
circuit = cirq.Circuit(gate.on_registers(**cirq_ft.infra.split_qubits(gate.signature, q)))
cirq.testing.assert_has_diagram(
circuit,
"""
Expand Down
Loading

0 comments on commit 5fd4fe5

Please sign in to comment.