Skip to content
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

Issue with running MQT Bench's QAOA and Portfolio Optimization QAOA on hybrid_qasm_simulator and path_sim_qasm_simulator #251

Open
rentristandelacruz opened this issue Jun 15, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@rentristandelacruz
Copy link

mqt.ddsim version

1.17.3.dev18+gfbfe86a

OS

Linux Mint 21.1

Python version

Python 3.10

C++ compiler

11.3.0

Additional environment information

Content of input file qaoa_indep_qiskit_3.qasm:

// Benchmark was created by MQT Bench on 2022-12-15
// For more information about MQT Bench, please visit https://www.cda.cit.tum.de/mqtbench/
// MQT Bench version: 0.2.2
// Qiskit version: {'qiskit-terra': '0.22.3', 'qiskit-aer': '0.11.1', 'qiskit-ignis': '0.7.0', 'qiskit-ibmq-provider': '0.19.2', 'qiskit': '0.39.3', 'qiskit-nature': '0.5.1', 'qiskit-finance': '0.3.4', 'qiskit-optimization': '0.4.0', 'qiskit-machine-learning': '0.5.0'}

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg meas[3];
creg meas0[3];
h q[0];
h q[1];
rzz(3.47521905147808) q[0],q[1];
h q[2];
rzz(3.47521905147808) q[0],q[2];
rx(-3.9630316145815) q[0];
rzz(3.47521905147808) q[1],q[2];
rx(-3.9630316145815) q[1];
rzz(-3.7141963075006) q[0],q[1];
rx(-3.9630316145815) q[2];
rzz(-3.7141963075006) q[0],q[2];
rx(-12.2750719749294) q[0];
rzz(-3.7141963075006) q[1],q[2];
rx(-12.2750719749294) q[1];
rx(-12.2750719749294) q[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas0[0];
measure q[1] -> meas0[1];
measure q[2] -> meas0[2];

Content of input file portfolioqaoa_indep_qiskit_3.qasm:

// Benchmark was created by MQT Bench on 2022-12-15
// For more information about MQT Bench, please visit https://www.cda.cit.tum.de/mqtbench/
// MQT Bench version: 0.2.2
// Qiskit version: {'qiskit-terra': '0.22.3', 'qiskit-aer': '0.11.1', 'qiskit-ignis': '0.7.0', 'qiskit-ibmq-provider': '0.19.2', 'qiskit': '0.39.3', 'qiskit-nature': '0.5.1', 'qiskit-finance': '0.3.4', 'qiskit-optimization': '0.4.0', 'qiskit-machine-learning': '0.5.0'}

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg meas[3];
creg meas0[3];
u2(0.41951949,-pi) q[0];
u2(0.41620669,-pi) q[1];
rzz(-0.420917333908502) q[0],q[1];
u2(0.41905329,-pi) q[2];
rzz(-0.421016123405307) q[0],q[2];
u3(2.2348228,1.2558831,-pi/2) q[0];
rzz(-0.420940441831552) q[1],q[2];
u3(2.2348228,1.2087537,-pi/2) q[1];
rzz(-5.98815838177421) q[0],q[1];
u3(2.2348228,1.2492507,-pi/2) q[2];
rzz(-5.98956380537088) q[0],q[2];
u3(0.56042125,-1.2358007,pi/2) q[0];
rzz(-5.98848712542991) q[1],q[2];
u3(0.56042125,-1.2880621,pi/2) q[1];
rzz(-6.64023274758061) q[0],q[1];
u3(0.56042125,-1.2431553,pi/2) q[2];
rzz(-6.6417912133385) q[0],q[2];
rx(-4.06512402388918) q[0];
rzz(-6.64059728943955) q[1],q[2];
rx(-4.06512402388918) q[1];
rx(-4.06512402388918) q[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];
barrier q[0],q[1],q[2];
measure q[0] -> meas0[0];
measure q[1] -> meas0[1];
measure q[2] -> meas0[2];

Description

When running MQT Bench's (https://www.cda.cit.tum.de/mqtbench/) QAOA and Portfolio Optimization with QAOA circuits (target independent, compiler = Qiskit), e.g. portfolioqaoa_indep_qiskit_3.qasm, qaoa_indep_qiskit_3.qasm, using hybrid_qasm_simulator and path_sim_qasm_simulators, error logs are encountered.

When running the circuits using hybrid_qasm_simulator, the following log appears:
ValueError: Only StandardOperations are supported for now.

When running the circuits using path_sim_qasm_simulator, the following log appears:
ValueError: DD for non-unitary operation not available!

Expected behavior

No response

How to Reproduce

  1. Download some QAOA and Portfolio Optimization with QAOA circuits (target independent, compiler = Qiskit) from MQT Bench's (https://www.cda.cit.tum.de/mqtbench/).
  2. Run the circuits using the hybrid_qasm_simulator and path_sim_qasm_simulator backends. Sample scripts:
    Path Simulator script:
import sys                                                                                                                              
from qiskit import *                                                                                 
from mqt    import ddsim                                                                                                                                                                                  
qasmFilename     = sys.argv[1]                                                                       
quantumCircuit   = QuantumCircuit.from_qasm_file(qasmFilename)                                 
backendSimulator = ddsim.DDSIMProvider().get_backend("path_sim_qasm_simulator")                               
myJob            = execute(quantumCircuit, backendSimulator)                                         
print(myJob.result()) 

Hybrid Simulator script:

import sys                                                                                                                              
from qiskit import *                                                                                 
from mqt    import ddsim                                                                                                                                                                                  
qasmFilename     = sys.argv[1]                                                                       
quantumCircuit   = QuantumCircuit.from_qasm_file(qasmFilename)                                 
backendSimulator = ddsim.DDSIMProvider().get_backend("hybrid_qasm_simulator")                               
myJob            = execute(quantumCircuit, backendSimulator)                                         
print(myJob.result()) 
  1. Observe the error logs appear.
@rentristandelacruz rentristandelacruz added the bug Something isn't working label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants