Skip to content

Commit

Permalink
Latest with many suggestions from Nate
Browse files Browse the repository at this point in the history
  • Loading branch information
bdg221 committed Jul 31, 2024
2 parents 3372d92 + 8ac71ca commit fa16a2a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/source/examples/cdr_qrack.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ kernelspec:

In this tutorial, [Clifford Data Regression](../guide/cdr.md) (CDR) is used with [Qrack](https://qrack.readthedocs.io/en/latest/) and a Qiskit fake backend.

While the Users Guide and the [Cirq: 1D Ising Simultation](./quantum_simulation_1d_ising.md) use density matrices, this example uses estimation values.

+++

Expand Down Expand Up @@ -140,9 +139,8 @@ def cirq_simulate(circuit: cirq.Circuit) -> np.ndarray:

## Executing CDR

With the different executor functions defined for running the Qrack, Qiskit, and Cirq simulators, the mitiq `execute_with_cdr` function can be called.
With the different executor functions defined for running the Qrack, Qiskit, and Cirq simulators, the `mitiq.cdr.execute_with_cdr` function can now be called.

Before getting the results from using CDR, `cirq_simulate` is called to get the ideal expectation value from the circuit. Next, the circuit is run on the fake Qiskit backend, using `qiskit_noisy` in order to obtain an unmitigated expectation value for `00`. Finally, `execute_with_cdr` is called to obtain the mitigated expectation value.

+++

Expand All @@ -160,7 +158,6 @@ print(f"Unmitigated expectation value from Qiskit Fake backend: {unmitigated_exp
mitigated_expval = cdr.execute_with_cdr(
circuit,
qiskit_noisy,
observable=None,
simulator=qrack_simulate,
seed=0,
)
Expand Down

0 comments on commit fa16a2a

Please sign in to comment.