Measuring and Storing
See original GitHub issueFor the code:
p = pq.Program()
p.inst(X(0)).measure(0,1)
print qvm.run(p, [1,0,2])
I would think that the program takes 1 (X[0]), invert it, and print the result as [[0,0,0]]. But the result is [[1,0,0]]. How is this happening?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Care and Storage of Measurement Instruments - e2b calibration
Even if you have the best-measuring instruments it would be next to useless if you cannot rely on them to give accurate results....
Read more >Measuring and storing vessel - Xylem Analytics
Measuring and storing vessel. SKU: 285123170. SKU. Request a Quote. Description. Z 453. Plastic receptacle with squeezing ring sealing and bayonet fastener ...
Read more >The Smartest Ways to Store Measuring Cups and Spoons
The Smartest Ways to Store Measuring Cups and Spoons · 1. Stick 'em on a knife rack. · 2. Hang them in the...
Read more >Measuring and Storage Containers - Fiberglass Supply Depot
Measuring and Storage Containers for mixing and measuring various products.
Read more >You're storing your measuring cups all wrong - The US Sun
In a video posted to TikTok, the expert shared his top tip for organizing measuring spoons and cups so you save space and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In Quil all qubits start in the zero state. To change a qubit into the 1 state you can just apply an X gate. For example:
Will give you a program where all qubits in qubit_list are now in the one state.
Hi @rasa97 I can tell you a little more about what is happening. This program:
Applies an X gate to the zeroth qubit, placing that qubit in the 1 state. It then measures the state of the zeroth qubit and deposits that bit result in the first classical register. Since the classical registers are initialized in zero, the state of the classical memory at the end of the computation is:
[0,1,0]
where the first classical register contains the result of the measurement. You’ll get this outcome if you run:to look at the first three bits of classical memory.
When you run:
You are asking for the classical memory to be reordered so in the returned list, so that you get the contents of the first bit, the zeroth bit, and the second bit in that order. Thus instead of
[0, 1, 0]
you get[1, 0, 0]
since the classical bit registers have been swapped.Does that help?