CyberIntel ⬡ News
★ Saved ◆ Cyber Reads
← Back ◌ Quantum Computing May 11, 2026

Simulation of molecule in Qiskit using DMET and SQD

Quantum Computing SE Archived May 16, 2026 ✓ Full text saved

I need some help with quantum chemistry calculations I’m running using Qiskit. I am trying to simulate a benzene molecule using Density Matrix Embedding Theory (DMET) together with Sample-based Quantum Diagonalization (SQD). In this framework, the molecule is divided into smaller fragments — in this case, six C–H fragments. The Hamiltonian of the full system is decomposed into smaller fragment Hamiltonians, which can then be solved independently. The DMET procedure converges when the sum of the

Full text archived locally
✦ AI Summary · Claude Sonnet


    Simulation of molecule in Qiskit using DMET and SQD Ask Question Asked 4 days ago Modified 4 days ago Viewed 34 times 0 I need some help with quantum chemistry calculations I’m running using Qiskit. I am trying to simulate a benzene molecule using Density Matrix Embedding Theory (DMET) together with Sample-based Quantum Diagonalization (SQD). In this framework, the molecule is divided into smaller fragments — in this case, six C–H fragments. The Hamiltonian of the full system is decomposed into smaller fragment Hamiltonians, which can then be solved independently. The DMET procedure converges when the sum of the traces of the one-particle reduced density matrices over all fragments equals the total number of electrons in the system. The problem is encoded into a quantum circuit using the LUCJ ansatz implemented in ffsim. More details about DMET can be found in this paper: https://pubs.acs.org/doi/full/10.1021/acs.jctc.6b00316 The issue is that, when I run a noiseless quantum simulation, I do not obtain a stable solution. When I solve the same problem classically using a CCSD solver, all fragments give identical energies and particle numbers, as expected from symmetry. However, in the quantum simulation, the fragment energies and particle numbers differ slightly, with discrepancies on the order of 0.001. Although these differences seem small, they are large enough to prevent DMET convergence. I want to emphasize that the simulation is completely noiseless. Does anyone have suggestions on how I could improve the accuracy or stability of the simulation? Here is a relevant snippet of my code showing how the quantum simulation is set up. t1 = mycc.t1 #T1 operator obtained from a previous CCSD calculation t2 = mycc.t2 #T2 operator obtained from a previous CCSD calculation n_reps = 1 #number of repetitions of the LUCJ ansatz alpha_alpha_indices = [(p, p + 1) for p in range(norbs_as - 1)] alpha_beta_indices = None fake_backend = FakeFez() simulator = AerSimulator() pass_manager, alpha_beta_indices = ffsim.qiskit.generate_lucj_pass_manager( backend = fake_backend, norb = norbs_as, #number of spatial orbitals connectivity = 'heavy-hex', interaction_pairs = (alpha_alpha_indices,alpha_beta_indices), optimization_level = 3, ) print(alpha_beta_indices) ucj_op = ffsim.UCJOpSpinBalanced.from_t_amplitudes( t2=t2, t1=t1, n_reps=n_reps, interaction_pairs=(alpha_alpha_indices, alpha_beta_indices), optimize=True, options=dict(maxiter=1000), ) qubits = QuantumRegister(2*norbs_as, name='q') circuit = QuantumCircuit(qubits) hf = ffsim.qiskit.PrepareHartreeFockJW(norbs_as,(nelec_as//2,nelec_as//2)) circuit.append(hf,qubits) circuit.append(ffsim.qiskit.UCJOpSpinBalancedJW(ucj_op),qubits) circuit.measure_all() print('Original circuit',circuit.count_ops(),'num_qubits:',circuit.num_qubits) isa_circuit = pass_manager.run(circuit) print('Transpiled circuit',isa_circuit.count_ops(),'num_qubits:',isa_circuit.num_qubits) job = simulator.run(isa_circuit,shots = 100_000) primitive_result = job.result() counts = primitive_result.get_counts(0) On the other hand, when I run the same simulation on real quantum hardware, the solution is much more stable across the different fragments and DMET convergence is achieved. This is very strange, since the hardware simulation is noisy, yet it performs better than the noiseless simulation. Here is the code for the simulation in real hardware: t1 = mycc.t1 #T1 operator obtained from a previous CCSD calculation t2 = mycc.t2 #T2 operator obtained from a previous CCSD calculation n_reps = 1 #number of repetitions of the LUCJ ansatz alpha_alpha_indices = [(p, p + 1) for p in range(norbs_as - 1)] alpha_beta_indices = None service = QiskitRuntimeService(token='---') backend = service.backend('ibm_fez') pass_manager, alpha_beta_indices = ffsim.qiskit.generate_lucj_pass_manager( backend = backend, norb = norbs_as, #number of spatial orbitals connectivity = 'heavy-hex', interaction_pairs = (alpha_alpha_indices,alpha_beta_indices), optimization_level = 0, ) print(alpha_beta_indices) ucj_op = ffsim.UCJOpSpinBalanced.from_t_amplitudes( t2=t2, t1=t1, n_reps=n_reps, interaction_pairs=(alpha_alpha_indices, alpha_beta_indices), optimize=True, options=dict(maxiter=1000), ) qubits = QuantumRegister(2*norbs_as, name='q') circuit = QuantumCircuit(qubits) hf = ffsim.qiskit.PrepareHartreeFockJW(norbs_as,(nelec_as//2,nelec_as//2)) circuit.append(hf,qubits) circuit.append(ffsim.qiskit.UCJOpSpinBalancedJW(ucj_op),qubits) circuit.measure_all() print('Original circuit',circuit.count_ops(),'num_qubits:',circuit.num_qubits) sampler = Sampler(mode=backend) sampler.options.dynamical_decoupling.enable = True isa_circuit = pass_manager.run(circuit) print('Transpiled circuit',isa_circuit.count_ops(),'num_qubits:',isa_circuit.num_qubits) job = sampler.run([isa_circuit], shots = 10_000) primitive_result = job.result() pub_result = primitive_result[0] counts = pub_result.data.meas.get_counts() Any comments or insights on this issue are very appreciated. Thank you. qiskitchemistry Share Improve this question Follow asked May 11 at 21:45 Daniel 111 1 bronze badge Hi, try to set in the simulation an optimization level = 0 instead of 3. I believe (but is a hypothesis) the transpiler is breaking the symmetry. Could you give me some feedback if this was the issue? :) –  Enrique Anguiano Vara Commented May 12 at 21:06 Add a comment Know someone who can answer? Share a link to this question via email, Twitter, or Facebook. Your Answer Sign up or log in Sign up using Google Sign up using Email and Password Post as a guest Name Email Required, but never shown Post Your Answer By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy. Start asking to get answers Find the answer to your question by asking. Ask question Explore related questions qiskitchemistry See similar questions with these tags. The Overflow Blog Connecting the dots for accurate AI Observability and human intuition in an AI world Featured on Meta (Almost) One year of Challenges Related 5 Simulation of a helium molecule using Qiskit 4 Is molecule simulation by quantum computing critical for drug discovery? 1 Jordan-Wigner map for ionic molecule H_2^+ 4 TranspilerError: 'The input circuit None is not scheduled' 0 Trying to run VQE on Qiskit runtime to calculate H 2 𝐻 2 molecule Hot Network Questions DSolve gives solution to first order ode which seems not to satisfy the initial condition To characterize convex solids that can be cut into n mutually congruent solids for any integer n CLI PDF annotation searcher Tiny black hole falls to the center of Earth and starts eating it up Can Ansible list all hosts that use a specific role? Does the number of eyes change a race's vision? Poynting vector of point charge in uniform motion For a given function, how do I create an association with values that are functions for the first two derivatives of the function? Why does a resistor physical temperature of 290 K make it emit -174 dBm/Hz of noise power, but other circuit elements at 290 K don't emit -174 dBm/Hz? In Acts 2:2, why would an immaterial "spirit" make the sound of wind blowing? What is this opening and how do I defend against it as Black? Paying fees associated to a medium-term visitor Limerick Again: Might Want a Pen Does the F-16 experience ground effect? How should we address the claim that the standard argument for epistemic probability might be "methodologically fragile"? Can a hotel charge for fees, even if you canceled within the cancellation policy? short story ID (old farmer at college, has a bull session, got what he came for). Probably school anthology, written pre WW2 What is the correct way to raise part of a slab? Is this interval consonant or dissonant? Footwear in Acadia National Park: When should I use hiking sandals vs boots? Why isn't complete separation breaking my model? For dinner rolls, is there any purpose to mixing egg into the dry ingredients before adding the wet ingredients? Custom augmentation-dot-like symbols in LilyPond? What exactly does classical first-order logic quantify over Question feed By continuing to use this website, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. By exiting this window, default cookies will be accepted. To reject cookies, select an option from below. Customize settings Cookie Consent Preference Center When you visit any of our websites, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences, or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and manage your preferences. Please note, blocking some types of cookies may impact your experience of the site and the services we are able to offer. Cookie Policy Accept all cookies Manage Consent Preferences Strictly Necessary Cookies Always Active These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information. Targeting Cookies Targeting Cookies These cookies are used to make advertising messages more relevant to you and may be set through our site by us or by our advertising partners. They may be used to build a profile of your interests and show you relevant advertising on our site or on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. Performance Cookies Performance Cookies These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance. Functional Cookies Functional Cookies These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly. Cookie List Clear checkbox label label Apply Cancel Consent Leg.Interest checkbox label label checkbox label label checkbox label label Necessary cookies only Confirm My Choices
    💬 Team Notes
    Article Info
    Source
    Quantum Computing SE
    Category
    ◌ Quantum Computing
    Published
    May 11, 2026
    Archived
    May 16, 2026
    Full Text
    ✓ Saved locally
    Open Original ↗