Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/quantumlib/Qualtran into ga…
Browse files Browse the repository at this point in the history
…te_with_registers
  • Loading branch information
tanujkhattar committed Oct 12, 2023
2 parents 8842c4d + a997abe commit 66279c9
Show file tree
Hide file tree
Showing 27 changed files with 844 additions and 288 deletions.
3 changes: 3 additions & 0 deletions dev_tools/autogenerate-bloqs-notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_square),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_sum_of_squares),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_greater_than),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_greater_than_constant),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_equals_a_constant),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_to_contiguous_index),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_scale_int_by_real),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_multiply_two_reals),
BloqNbSpec(qualtran.bloqs.arithmetic_test._make_square_real_number),
Expand Down
7 changes: 6 additions & 1 deletion dev_tools/execute-notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ def parse_args():
p = argparse.ArgumentParser()
p.add_argument('--output-nbs', action=argparse.BooleanOptionalAction, default=True)
p.add_argument('--output-html', action=argparse.BooleanOptionalAction, default=False)
p.add_argument('--only-out-of-date', action=argparse.BooleanOptionalAction, default=True)
args = p.parse_args()
execute_and_export_notebooks(output_nbs=args.output_nbs, output_html=args.output_html)
execute_and_export_notebooks(
output_nbs=args.output_nbs,
output_html=args.output_html,
only_out_of_date=args.only_out_of_date,
)


if __name__ == '__main__':
Expand Down
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.dev20230928195458
cirq-ft==1.3.0.dev20230928195458
cirq-core==1.3.0.dev20231010175755
cirq-ft==1.3.0.dev20231010175755

# drawing
pydot
Expand Down
10 changes: 5 additions & 5 deletions dev_tools/requirements/envs/dev.env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ cffi==1.16.0
# via cryptography
charset-normalizer==3.3.0
# via requests
cirq-core==1.3.0.dev20230928195458
cirq-core==1.3.0.dev20231010175755
# via
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230928195458
cirq-ft==1.3.0.dev20231010175755
# via -r deps/runtime.txt
click==8.1.7
# via
Expand Down Expand Up @@ -165,11 +165,11 @@ jsonschema-specifications==2023.7.1
# via jsonschema
jupyter-cache==0.6.1
# via myst-nb
jupyter-client==8.3.1
jupyter-client==8.4.0
# via
# ipykernel
# nbclient
jupyter-core==5.3.2
jupyter-core==5.4.0
# via
# ipykernel
# jupyter-client
Expand Down Expand Up @@ -388,7 +388,7 @@ rfc3986==2.0.0
# via twine
rich==13.6.0
# via twine
rpds-py==0.10.4
rpds-py==0.10.6
# via
# jsonschema
# referencing
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.3.0
# via
# -c envs/dev.env.txt
# requests
cirq-core==1.3.0.dev20230928195458
cirq-core==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230928195458
cirq-ft==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -189,12 +189,12 @@ jupyter-cache==0.6.1
# via
# -c envs/dev.env.txt
# myst-nb
jupyter-client==8.3.1
jupyter-client==8.4.0
# via
# -c envs/dev.env.txt
# ipykernel
# nbclient
jupyter-core==5.3.2
jupyter-core==5.4.0
# via
# -c envs/dev.env.txt
# ipykernel
Expand Down Expand Up @@ -421,7 +421,7 @@ requests==2.31.0
# via
# -c envs/dev.env.txt
# sphinx
rpds-py==0.10.4
rpds-py==0.10.6
# via
# -c envs/dev.env.txt
# jsonschema
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.dev20230928195458
cirq-core==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230928195458
cirq-ft==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -133,11 +133,11 @@ jsonschema-specifications==2023.7.1
# via
# -c envs/dev.env.txt
# jsonschema
jupyter-client==8.3.1
jupyter-client==8.4.0
# via
# -c envs/dev.env.txt
# nbclient
jupyter-core==5.3.2
jupyter-core==5.4.0
# via
# -c envs/dev.env.txt
# jupyter-client
Expand Down Expand Up @@ -314,7 +314,7 @@ referencing==0.30.2
# -c envs/dev.env.txt
# jsonschema
# jsonschema-specifications
rpds-py==0.10.4
rpds-py==0.10.6
# via
# -c envs/dev.env.txt
# jsonschema
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.dev20230928195458
cirq-core==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230928195458
cirq-ft==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -125,11 +125,11 @@ jsonschema-specifications==2023.7.1
# via
# -c envs/dev.env.txt
# jsonschema
jupyter-client==8.3.1
jupyter-client==8.4.0
# via
# -c envs/dev.env.txt
# nbclient
jupyter-core==5.3.2
jupyter-core==5.4.0
# via
# -c envs/dev.env.txt
# jupyter-client
Expand Down Expand Up @@ -310,7 +310,7 @@ referencing==0.30.2
# -c envs/dev.env.txt
# jsonschema
# jsonschema-specifications
rpds-py==0.10.4
rpds-py==0.10.6
# via
# -c envs/dev.env.txt
# jsonschema
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.dev20230928195458
cirq-core==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230928195458
cirq-ft==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -136,12 +136,12 @@ jsonschema-specifications==2023.7.1
# via
# -c envs/dev.env.txt
# jsonschema
jupyter-client==8.3.1
jupyter-client==8.4.0
# via
# -c envs/dev.env.txt
# ipykernel
# nbclient
jupyter-core==5.3.2
jupyter-core==5.4.0
# via
# -c envs/dev.env.txt
# ipykernel
Expand Down Expand Up @@ -344,7 +344,7 @@ referencing==0.30.2
# -c envs/dev.env.txt
# jsonschema
# jsonschema-specifications
rpds-py==0.10.4
rpds-py==0.10.6
# via
# -c envs/dev.env.txt
# jsonschema
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.dev20230928195458
cirq-core==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
# cirq-ft
cirq-ft==1.3.0.dev20230928195458
cirq-ft==1.3.0.dev20231010175755
# via
# -c envs/dev.env.txt
# -r deps/runtime.txt
Expand Down Expand Up @@ -113,11 +113,11 @@ jsonschema-specifications==2023.7.1
# via
# -c envs/dev.env.txt
# jsonschema
jupyter-client==8.3.1
jupyter-client==8.4.0
# via
# -c envs/dev.env.txt
# nbclient
jupyter-core==5.3.2
jupyter-core==5.4.0
# via
# -c envs/dev.env.txt
# jupyter-client
Expand Down Expand Up @@ -285,7 +285,7 @@ referencing==0.30.2
# -c envs/dev.env.txt
# jsonschema
# jsonschema-specifications
rpds-py==0.10.4
rpds-py==0.10.6
# via
# -c envs/dev.env.txt
# jsonschema
Expand Down
7 changes: 4 additions & 3 deletions qualtran/bloqs/and_bloq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,12 @@
}
],
"source": [
"from qualtran.resource_counting import get_bloq_counts_graph, GraphvizCounts, SympySymbolAllocator\n",
"from qualtran.resource_counting import get_bloq_counts_graph\n",
"from qualtran.drawing import show_counts_graph\n",
"import attrs\n",
"\n",
"graph, sigma = get_bloq_counts_graph(bloq)\n",
"GraphvizCounts(graph).get_svg()"
"show_counts_graph(graph)"
]
},
{
Expand Down Expand Up @@ -832,7 +833,7 @@
],
"source": [
"graph, sigma = get_bloq_counts_graph(bloq)\n",
"GraphvizCounts(graph).get_svg()"
"show_counts_graph(graph)"
]
},
{
Expand Down
Loading

0 comments on commit 66279c9

Please sign in to comment.