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

merging the master #1162

Closed
wants to merge 106 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
1ff915b
clifford sampling
AlejandroSopena Oct 16, 2023
6563029
output compatible with cdr
AlejandroSopena Oct 16, 2023
40251ca
do not fuse I gates
AlejandroSopena Oct 17, 2023
5a261e4
fix fuse
AlejandroSopena Oct 17, 2023
2049207
transpiling circuit
AlejandroSopena Oct 20, 2023
cdf5647
fix
AlejandroSopena Oct 20, 2023
c1fc36b
fix transpiling
AlejandroSopena Oct 20, 2023
6c49e71
fix identities
AlejandroSopena Oct 20, 2023
b1b3971
remove prints
AlejandroSopena Oct 20, 2023
57db2ec
add minus for iqm5q
AlejandroSopena Oct 22, 2023
332d88b
readout
AlejandroSopena Oct 25, 2023
e240146
bayesian unfolding readout
AlejandroSopena Oct 30, 2023
81f44fe
remove logs
MatteoRobbiati Nov 20, 2023
1aed5d4
rm comments and add preliminary docstrings
MatteoRobbiati Nov 20, 2023
5a5f112
restrict qubits function
Simone-Bordoni Dec 5, 2023
9899a22
added tests
Simone-Bordoni Dec 5, 2023
6ada47c
restricted topology for placer
Simone-Bordoni Dec 8, 2023
c238ad9
get_gammas
AlejandroSopena Dec 11, 2023
b57184e
get_noisy_circuit
AlejandroSopena Dec 11, 2023
7fc6560
zero noise extrapolation
AlejandroSopena Dec 11, 2023
cf792bf
clifford data regression
AlejandroSopena Dec 11, 2023
d4414ac
vnCDR
AlejandroSopena Dec 11, 2023
72e5ef8
readout mitigation
AlejandroSopena Dec 11, 2023
aa7efb1
importance clifford sampling
AlejandroSopena Dec 11, 2023
626540b
transpile
AlejandroSopena Dec 11, 2023
6b13d0f
updating tests
AlejandroSopena Dec 11, 2023
83133c2
Merge branch 'master' into cdr
AlejandroSopena Dec 11, 2023
ea56f40
fix docstring
AlejandroSopena Dec 11, 2023
1dd96c7
fix variational
AlejandroSopena Dec 11, 2023
60c7299
update init
AlejandroSopena Dec 11, 2023
452661e
update pre-commit
AlejandroSopena Dec 11, 2023
d587786
refactor shortest paths
Simone-Bordoni Dec 11, 2023
1e87f5a
completed new shortest paths
Simone-Bordoni Dec 12, 2023
d2d6abd
remove prints
Simone-Bordoni Dec 12, 2023
9b31bfa
fix coverage and tests
Simone-Bordoni Dec 13, 2023
c69b40a
Merge branch 'master' into restrict_topology
renatomello Dec 13, 2023
44e2560
small correction in unroller
Simone-Bordoni Dec 14, 2023
80f2558
Merge branch 'master' into restrict_topology
renatomello Dec 14, 2023
a4b691a
fix documentation tests
AlejandroSopena Dec 14, 2023
8fcb3a2
unify readout mitigation
AlejandroSopena Dec 14, 2023
e0e8c71
fix coverage
AlejandroSopena Dec 14, 2023
7e08d72
Merge branch 'master' into cdr
AlejandroSopena Dec 15, 2023
1443cb6
fix coverage (raise error)
AlejandroSopena Dec 15, 2023
b1f0951
Merge branch 'master' into restrict_topology
renatomello Dec 16, 2023
f764ed8
initial commit
renatomello Dec 19, 2023
83d7ba8
diagonal and semi-diagonal
renatomello Dec 19, 2023
0428bae
fix coverage
renatomello Dec 19, 2023
fd81021
fix test
renatomello Dec 19, 2023
d6ce5f6
fix `diagonal` angles
renatomello Dec 19, 2023
933f3fe
update documentation
renatomello Dec 19, 2023
70bd87b
Merge branch 'master' into unary_architecture
renatomello Dec 20, 2023
24b8eed
Merge branch 'master' into restrict_topology
renatomello Dec 20, 2023
150e29a
improve docstrings `pipeline`
renatomello Dec 20, 2023
438f95d
improved docstring `unroller`
renatomello Dec 20, 2023
1e5ae8a
hiding `exceptions` submodule
renatomello Dec 20, 2023
dc9feee
rewrite imports for exceptions in tests
renatomello Dec 20, 2023
7316cb7
improved docstring `placer`
renatomello Dec 20, 2023
2b27317
updating tests
AlejandroSopena Dec 20, 2023
209aac6
improved docstrings `router`
renatomello Dec 20, 2023
8d2dd1f
fix test
renatomello Dec 20, 2023
38aae68
improved docstrings `router`
renatomello Dec 20, 2023
abdd623
updating doc strings
AlejandroSopena Dec 20, 2023
d9d0e76
updating documentation
AlejandroSopena Dec 20, 2023
caf4784
fix example
AlejandroSopena Dec 20, 2023
4af1eab
add example for ICS method
AlejandroSopena Dec 20, 2023
2b39afe
adding print to example
AlejandroSopena Dec 20, 2023
6fc230d
Add reference
AlejandroSopena Dec 20, 2023
6042d95
Merge branch 'master' into unary_architecture
renatomello Dec 21, 2023
23ee4fd
Merge branch 'master' into restrict_topology
renatomello Dec 21, 2023
5f9de8c
Merge branch 'master' into cdr
renatomello Dec 21, 2023
9b6c4ee
Merge branch 'master' into restrict_topology
renatomello Dec 21, 2023
024c472
Merge branch 'master' into unary_architecture
renatomello Dec 21, 2023
a7aa8aa
corrections
Simone-Bordoni Dec 22, 2023
a37d9ce
corrections
Simone-Bordoni Dec 22, 2023
b564fc4
corrections
Simone-Bordoni Dec 22, 2023
015a60c
100 coverage
Simone-Bordoni Dec 22, 2023
fee47af
Merge branch 'master' into unary_architecture
renatomello Jan 4, 2024
b89e4f5
Andrea's suggestion
renatomello Jan 4, 2024
12c31cd
Merge branch 'master' into restrict_topology
renatomello Jan 4, 2024
9302472
matteo's suggestions
AlejandroSopena Jan 7, 2024
38aa9bd
Merge branch 'master' into restrict_topology
renatomello Jan 10, 2024
52dacc5
Merge branch 'master' into unary_architecture
renatomello Jan 10, 2024
091fe3a
Merge branch 'master' into cdr
renatomello Jan 10, 2024
94bbd4f
code review
AlejandroSopena Jan 10, 2024
0c3830a
Bump jinja2 from 3.1.2 to 3.1.3
dependabot[bot] Jan 11, 2024
3f53ddc
Merge pull request #1121 from qiboteam/restrict_topology
renatomello Jan 11, 2024
8e96b46
Merge branch 'master' into unary_architecture
renatomello Jan 11, 2024
8e53dd0
Merge branch 'master' into cdr
renatomello Jan 11, 2024
b63fdad
Merge branch 'cdr' of https://github.com/qiboteam/qibo into cdr
renatomello Jan 11, 2024
d851a8e
Update src/qibo/models/error_mitigation.py
renatomello Jan 11, 2024
7746326
Update src/qibo/models/error_mitigation.py
renatomello Jan 11, 2024
1002a69
Update src/qibo/models/error_mitigation.py
renatomello Jan 11, 2024
f05141e
Update src/qibo/models/error_mitigation.py
renatomello Jan 11, 2024
159707b
Matteo's suggestions
AlejandroSopena Jan 12, 2024
f05a722
Merge pull request #1141 from qiboteam/unary_architecture
renatomello Jan 12, 2024
e9c51f5
Merge branch 'master' into cdr
renatomello Jan 12, 2024
2625ea8
Merge branch 'cdr' of https://github.com/qiboteam/qibo into cdr
renatomello Jan 12, 2024
bee350a
fix coverage
AlejandroSopena Jan 12, 2024
9cebb48
fix coverage
AlejandroSopena Jan 12, 2024
3a3dfaa
Merge pull request #1129 from qiboteam/cdr
AlejandroSopena Jan 12, 2024
81f0e01
Merge pull request #1155 from qiboteam/dependabot/pip/jinja2-3.1.3
scarrazza Jan 12, 2024
ac4e476
increasing version
scarrazza Jan 12, 2024
627eab7
improved docstrings
renatomello Jan 20, 2024
617fc7a
another fix
renatomello Jan 23, 2024
d92d4aa
another minor fix
renatomello Jan 23, 2024
b10eb08
Merge pull request #1160 from qiboteam/noise_doc
renatomello Jan 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
output compatible with cdr
  • Loading branch information
AlejandroSopena committed Oct 16, 2023
commit 65630298e69ce2871d4daef76ff927ddcde91f6b
20 changes: 13 additions & 7 deletions src/qibo/models/error_mitigation.py
Original file line number Diff line number Diff line change
@@ -655,11 +655,10 @@ def sample_clifford_training_circuit(
)
gate.clifford = True
sampled_circuit.add(gate)

return sampled_circuit


def escircuit(circuit, obs, backend=None):
def escircuit(circuit, obs, fuse=True, backend=None):
from qibo.quantum_info import comp_basis_to_pauli, random_clifford, vectorization

if backend is None: # pragma: no cover
@@ -706,7 +705,10 @@ def escircuit(circuit, obs, backend=None):
for gate in circ_cliff.queue:
circ_cliff1.add(gate)

return circ_cliff1.fuse(max_qubits=1), circ_cliff, adjust_gates
if fuse:
circ_cliff1 = circ_cliff1.fuse(max_qubits=1)

return circ_cliff1, circ_cliff, adjust_gates


def mit_obs(
@@ -715,6 +717,7 @@ def mit_obs(
noise_model,
nshots=int(1e4),
n_training_samples=10,
full_output=False,
backend=None,
):
if backend is None: # pragma: no cover
@@ -725,7 +728,7 @@ def mit_obs(
for _ in range(n_training_samples)
]

data = {"exact": {"-1": [], "1": []}, "noisy": {"-1": [], "1": []}}
data = {"noise-free": {"-1": [], "1": []}, "noisy": {"-1": [], "1": []}}

a_list = {"-1": [], "1": []}
for c in training_circs:
@@ -741,11 +744,11 @@ def mit_obs(
# exp_noisy = obs.expectation(state)

if exp > 0:
data["exact"]["1"].append(exp)
data["noise-free"]["1"].append(exp)
data["noisy"]["1"].append(exp_noisy)
a_list["1"].append(1 - exp_noisy / exp)
else:
data["exact"]["-1"].append(exp)
data["noise-free"]["-1"].append(exp)
data["noisy"]["-1"].append(exp_noisy)
a_list["-1"].append(1 - exp_noisy / exp)

@@ -771,4 +774,7 @@ def mit_obs(
/ ((1 - a) ** 2 + a_std**2) ** 2
)

return exp_mit, exp_mit_std, a, a_std, a_list, data
if full_output:
return exp_mit, exp_mit_std, a, a_std, a_list, data

return exp_mit