66 :date " 2025-10-10" }}}
77(ns qclojure.examples.bell-state-circuit
88 (:require
9- [scicloj.kindly.v4.api :as kindly]
10- [scicloj.kindly.v4.kind :as kind]
11- [org.soulspace.qclojure.application.visualization :as viz]))
9+ [scicloj.kindly.v4.kind :as kind]))
1210
1311; ; # Bell State Circuit Example
1412; ; This example demonstrates how to create and visualize a Bell state circuit and how to simulate
@@ -150,7 +148,7 @@ ideal-result
150148; ; We can visualize the frequencies of the measurements obtained from the
151149; ; ideal simulator as a histogram.
152150^kind/hiccup
153- (viz/visualize-measurement-histogram :svg (get-in ideal-result [:results :measurement-result :frequencies ]))
151+ (viz/visualize-measurement-histogram :svg (get-in ideal-result [:results :measurement-results :frequencies ]))
154152
155153; ; Now we you the hardware simulator to execute the Bell state circuit.
156154; ; The hardware simulator simulates the quantum circuit with noise and errors
@@ -172,7 +170,7 @@ hardware-result
172170; ; We can visualize the result of the hardware simulation as a histogram of the
173171; ; measurement frequencies to compare it with the ideal simulation result.
174172^kind/hiccup
175- (viz/visualize-measurement-histogram :svg (get-in hardware-result [:results :measurement ]))
173+ (viz/visualize-measurement-histogram :svg (get-in hardware-result [:results :measurement-results :frequencies ]))
176174
177175; ; We results are probabilistic, so we may not get exactly the same results every time we
178176; ; execute the circuit. However, we should see that the results from the ideal simulator
0 commit comments