-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHSH inequality #58
Comments
@cosenal we can speak more about this tomorrow evening, but here are some answers to these questions:
I wasn't able to find specific papers using this as a benchmark, but it's obvious from some of the papers I did find that the benchmark in this case is just "run the circuit on a device and see how close you get to
Here is a minimal example of running this benchmark: from metriq_gym.hardware.bell_experiment import CHSHExperiment, ExperimentData
from qiskit_aer import Aer
qset = [0, 1]
backend_real = Aer.get_backend("qasm_simulator")
chsh_exp = CHSHExperiment(physical_qubits=qset,backend=backend_real)
experiment_data: ExperimentData = chsh_exp.run()
experiment_data.block_for_results()
# Access the analysis results
results = experiment_data.analysis_results()
for result in results:
print(f"{result.name}: {result.value}") Since we are running on
I would say let's not reinvent the wheel and opt to use the one here. The only thing I would say is that we track using git submodules ala #49 |
Thanks, @vprusso. |
Discussed today, but for posterity, one picks two qubits that map to components on the device coupling map. One would typically opt to choose two neighboring nodes with minimal cross-talk noise. Much of this choice would be contingent about the device topology and noise-specific properties.
I think the benchmark shouldn't be the average but rather "What is the best choice of qubits on the device that gets as close as possible to the theoretical violation?"
I ran it on several IBM hardware devices using several qubit configurations. Here is an updated script that supports both simulator and hardware (if you want also to run it): from metriq_gym.hardware.bell_experiment import CHSHExperiment, ExperimentData
from qiskit_aer import Aer
from qiskit_ibm_runtime import QiskitRuntimeService
use_sim = False
service = QiskitRuntimeService(instance="<INSTANCE_NAME>")
qset = [0, 1]
if use_sim:
backend = Aer.get_backend("qasm_simulator")
else:
backend = service.backend("<IBM_BACKEND_NAME>")
chsh_exp = CHSHExperiment(physical_qubits=qset,backend=backend)
experiment_data: ExperimentData = chsh_exp.run()
experiment_data.block_for_results()
# Access the analysis results
results = experiment_data.analysis_results()
for result in results:
print(f"{result.name}: {result.value}") For instance, running on |
Understand how the CHSH inequality test can be leveraged for a benchmark test
Acceptance criteria:
The text was updated successfully, but these errors were encountered: