Comments (4)
This is an interesting problem. Two remarks:
-
Does the same code work correctly for a plain circuit?
-
It would be better that the problem could be reduced to a minimal circuit with potential faulty gates, otherwise, I have to dig out which gate is problematic from
c.to_qir()
of the shared object anyway.
from tensorcircuit.
Hi @refraction-ray, what do you mean by a plain circuit? As per the potential faulty gate, the circuit takes the form of a cascade of two-qubit gates. This means, the circuit is a gate defined on qubits 0 and 1, then another one on qubits 1 and 2, and so on. Just one layer of this pattern. There is no gate defined on the last qubit and qubit 0. So, since the first bit in this sampling procedure gives 0.5 instead of 0 or 1, I would assume that it is the very first gate the faulty one.
from tensorcircuit.
![Screen Shot 2024-02-04 at 10 55 11 AM](https://private-user-images.githubusercontent.com/35157286/302073847-e284330b-a717-4f8f-9655-4e40e6b4c5ac.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTEyNDUwNzUsIm5iZiI6MTcxMTI0NDc3NSwicGF0aCI6Ii8zNTE1NzI4Ni8zMDIwNzM4NDctZTI4NDMzMGItYTcxNy00ZjhmLTk2NTUtNGU0MGU2YjRjNWFjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI0VDAxNDYxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM5NWUwODBlNzNhNjU5MDEzNTI2ZTZmMGMyOTQxOTVjOTYyODg1MTYyZjZkYjU1YWRlNWZmM2U0MDc0YTE0MmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.g6LlB6JUMsIQUiknjQlYyov9OXGhdo7wQvoRUZHK6XA)
It seems that the exact code works well for a "plain circuit". So there must be something special in the definition of the faulty circuit in your case, could you pin down the source of the error by providing me a python code that generates the minimal faulty circuit?
from tensorcircuit.
Oh, so, the thing is that this is a completely random thing (I just happened to hit the error for this particular random key). I think that whatever is wrong with the circuit could be deduced from the first gate of the circuit I shared, which should be a custom two-qubit SU4 gate
from tensorcircuit.
Related Issues (20)
- PyTorch2.0's jit is still not good enough to support jit in tc HOT 2
- Failed to transfer Tensor to Numpy when using jit HOT 2
- increase the abundance of the QAOA tutorial HOT 1
- docker file need updating HOT 2
- Wired input and output of function "c.amplitude" HOT 3
- Enhance <QAOA portfolio tutorial> HOT 4
- Fermion Gaussian State Simulator HOT 3
- Stabilizer simulator
- Backend agnostic implementation of quantum Hamiltonian generation HOT 2
- Applying gates with jnp index HOT 7
- Support trainable adptive circuit HOT 2
- Implementation of SHVQE with QAS HOT 1
- tensor network representation of a tensor circuit HOT 2
- Allow sparse matrix as circuit input HOT 3
- AttributeError: module 'tensorflow' has no attribute 'sparse' HOT 2
- Bug in qiskit circuit parsing HOT 2
- jit compile circuit with any gate HOT 2
- `copy` operation of DM circuit forgets previous `apply_general_kraus` operations HOT 1
- MPS circuit with JIT compilation HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorcircuit.