question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding error models to program breaks measure_observables

See original GitHub issue

measure_observables created new programs to calibrate readout errors (and can also symmetrize the errors). Unfortunately, if the program given to measure_observables contains error model information, that will not be captures by the calibration, and the results will not match the expected behavior from calibration.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ecpetersoncommented, Mar 6, 2019

As a short term fix, you can replace _get_qvm_compiler_based_on_endpoint with QVMCompiler (as imported from pyquil.api._compiler). That method used to switch between QVMCompiler and LocalQVMCompiler as needed, but LocalQVMCompiler has since been removed.

0reactions
marcuspscommented, Mar 7, 2019

Following @ecp-rigetti 's comment, it seems like

from pyquil.api._compiler import QVMCompiler
from pyquil.api._base_connection import ForestConnection
from pyquil.api._qvm import QVM
from pyquil.noise import decoherence_noise_with_asymmetric_ro

from pyquil.device import NxDevice, gates_in_isa

import networkx as nx

nineq_square = nx.convert_node_labels_to_integers(nx.grid_2d_graph(3, 3))
nineq_device = NxDevice(topology=nineq_square)

name = '9q-generic-asym-noisy-readout-qvm'
connection = ForestConnection()
noisy_readout_qvm = QVM(connection=connection, 
                        noise_model=decoherence_noise_with_asymmetric_ro(gates=gates_in_isa(qc.get_isa()),
                                                                         p00=0.99,
                                                                         p11=0.85))
qvmn = QuantumComputer(name=name,
                       qam=noisy_readout_qvm,
                       device=nineq_device,
                       compiler=QVMCompiler(device=nineq_device,
                                            endpoint=connection.compiler_endpoint))

works – i.e., provides a QVM with an error model (even if the program does not introduce errors)

Read more comments on GitHub >

github_iconTop Results From Across the Web

compatibility of stim's error model with conventional decoding ...
I am working with stim's excellent code generator together with pymatching, using stim's generated error model and the glue code in the tutorial ......
Read more >
RxJs Error Handling: Complete Practical Guide
Error handling is an essential part of RxJs, as we will need it in just about any reactive program that we write. Error...
Read more >
A Tutorial on Quantum Error Correction
The ratio k/n, called the rate of the code, gives a measure of the cost of error correction. Various bounds on k/n can...
Read more >
Analyzing Time Series Data in Observable: Hands-on Workshop
This hands-on workshop takes you through loading in real public data, exploring it using Observable Plot and finding insights and patterns ...
Read more >
Experimental violation and reformulation of the Heisenberg's ...
The test is carried out by linear optical devices and realizes an indirect measurement model that breaks Heisenberg's relation throughout ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found