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

JSONDecodeError when callin run_circuit #66

Closed
BrunoLiegiBastonLiegi opened this issue Sep 25, 2024 · 8 comments
Closed

JSONDecodeError when callin run_circuit #66

BrunoLiegiBastonLiegi opened this issue Sep 25, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@BrunoLiegiBastonLiegi
Copy link
Contributor

Some qibo-cloud-backends tests are failing due to qibo-client qiboteam/qibo-cloud-backends#37.
I am using qibo-client 0.0.9 and running a circuit raises JSONDecodeError: Expecting value: line 2 column 1 (char 1).
The example in the README fails for instance.

@scarrazza
Copy link
Member

I confirm, @marcorossi5 could you please have a look asap?

@scarrazza scarrazza added the bug Something isn't working label Sep 27, 2024
@marcorossi5
Copy link
Contributor

Yes, he is not using the latest qibo-client version. We have not released it yet (0.0.10). Let me check everything is working and we can make the release. Can you confirm that the qibo version you just released is 0.2.12?

@scarrazza
Copy link
Member

I have just tried in PR #65 but it does not work too, same error.

@marcorossi5
Copy link
Contributor

The former example was:

import qibo
from qibo_client import Client

circuit = qibo.models.QFT(5)
token_path = Path(__file__).parent / "token.txt"
token = token_path.read_text()
client = Client(token)
job = client.run_circuit(circuit, nshots=100, device="sim")

r = job.result(verbose=True)
print(r.frequencies())

We should replace by this working example

import qibo
from qibo_client import Client

circuit = qibo.Circuit(5)
circuit.add(qibo.gates.M(0))

token_path = Path(__file__).parent / "token.txt"
token = token_path.read_text()
client = Client(token)
job = client.run_circuit(circuit, nshots=100, device="sim")

r = job.result(verbose=True)
print(r.frequencies())

Any idea on why models.QFT is not working?

@scarrazza
Copy link
Member

In principle we should be able to support circuit simulations without measurement gates (for sim partitions) and with measurement gates for hardware partitions.

@marcorossi5
Copy link
Contributor

Ok, we can add some sort of check in the webapp for that.

However, why is QFT circuit giving problems? Is it somehow deprecated or similar?

@scarrazza
Copy link
Member

As discussed, if you don't add the M gate, you should not expect samples/frequencies but just the state vector.

@scarrazza
Copy link
Member

I have just tested main and the latest release and for both setups I get the same failure.

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

3 participants