Skip to content

Commit

Permalink
Add KPZ to TOC (#336)
Browse files Browse the repository at this point in the history
* Update _index_included.yaml to include KPZ experiment
* Improve code efficiency
* Update notebook with new timings
  • Loading branch information
eliottrosenberg authored Sep 9, 2023
1 parent d021621 commit e48d8ff
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 43 deletions.
8 changes: 8 additions & 0 deletions docs/_index_included.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,11 @@ included:
- heading: Ground State
description: Create a toric code ground state.
path: /cirq/experiments/toric_code/toric_code_ground_state

- heading: Kardar-Parisi-Zhang Physics
description: Probe the dynamics of transferred magnetization in the Heisenberg spin chain.
options:
- cards
items:
- heading: Experiment example
path: /cirq/experiments/kpz/kpz
104 changes: 64 additions & 40 deletions docs/kpz/kpz.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions recirq/kpz/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,9 @@ def run_experiment_amplitudes(
num_right_initial = np.sum(initial_bitstr)
probs = (
np.abs(
sampler.compute_amplitudes(
cirq.drop_terminal_measurements(qc), all_states
)
sampler.simulate(
cirq.drop_terminal_measurements(qc)
).final_state_vector
)
** 2
)
Expand Down

0 comments on commit e48d8ff

Please sign in to comment.