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 Running Code with 40 Qubits #479

Closed
saifawan2703 opened this issue Oct 29, 2024 · 3 comments
Closed

Issue Running Code with 40 Qubits #479

saifawan2703 opened this issue Oct 29, 2024 · 3 comments

Comments

@saifawan2703
Copy link

Hi everyone,

I have written a simple code snippet that utilizes 40 qubits, as shown below. However, I am encountering an error when trying to run it on a server with 128 GB of RAM.

Could this issue be related to memory space, or is there another underlying problem causing the code to fail?

def Simple_function(eng):
    k0 = eng.allocate_qureg(8)
    k1 = eng.allocate_qureg(8)
    x = eng.allocate_qureg(8)  # high
    y = eng.allocate_qureg(8)  # low
    z = eng.allocate_qureg(8)

eng = projectq.MainEngine(backend=Simulator(gate_fusion=True), engine_list=[])
Simple_function(eng)
@damiansteiger
Copy link
Contributor

This is a memory issue. 40 qubits require 16TB of RAM (see simulator tutorial)

@saifawan2703
Copy link
Author

thanks sir, and one more question. Which Simulator is best for Implementing Grover's Algorithm in ProjectQ?

@damiansteiger
Copy link
Contributor

In regards to #480: Simulator vs ClassicalSimulator
As Grover contains quantum operations, the Simulator is required. For only debugging a classical Grover oracle (without the quantum parts), the ClassicalSimulator is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants