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

Gate set tomography #1106

Merged
merged 287 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
0134321
Update test_gate_set_tomography.py
mho291 Jan 24, 2024
eed752c
Update gate_set_tomography.py
mho291 Jan 24, 2024
cc41e9c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
3623e82
Update gate_set_tomography.py
mho291 Jan 24, 2024
7ef0da0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
2c9417d
Merge branch 'master' into Gate-set-tomography
renatomello Jan 24, 2024
4698bc2
Update src/qibo/validation/gate_set_tomography.py
renatomello Jan 24, 2024
1a862f0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
dad5823
renaming file and folder
renatomello Jan 24, 2024
6f8deba
create `__init__.py`
renatomello Jan 24, 2024
2762db2
modify imports
renatomello Jan 24, 2024
b3d639f
Update test_tomography_gate_set_tomography.py
mho291 Jan 24, 2024
9998c9a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
ac02ced
Update documentation for gate set tomography in qibo.rst
mho291 Jan 24, 2024
a6a3554
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
75b2e6b
Update documentation in qibo.rst
mho291 Jan 24, 2024
9197723
Update test_tomography_gate_set_tomography.py
mho291 Jan 24, 2024
30f7815
Update qibo.rst
mho291 Jan 24, 2024
ca60040
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
f5f2fec
Update test_tomography_gate_set_tomography.py
mho291 Jan 24, 2024
ce15e58
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
017963b
Update test_tomography_gate_set_tomography.py
mho291 Jan 24, 2024
7977a0c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
5e03a92
Update test_tomography_gate_set_tomography.py
mho291 Jan 24, 2024
306bbe2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
6020e08
Update test_tomography_gate_set_tomography.py
mho291 Jan 24, 2024
08504df
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 24, 2024
3c60a35
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
f3a1c68
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2024
5476f10
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
d82e587
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
e09f6d9
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
2e51e30
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2024
386e4ec
Update gate_set_tomography.py
mho291 Jan 25, 2024
d2b4af6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2024
1732766
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
769b8a2
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
f4abc27
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2024
70af17e
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
34cfa0f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2024
764d464
Update gate_set_tomography.py
mho291 Jan 25, 2024
962d4a6
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
b720bca
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
993cbed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2024
08a6caf
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
6b0278c
Update test_tomography_gate_set_tomography.py
mho291 Jan 25, 2024
1bd6cb9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 25, 2024
7c31c5e
Update gate_set_tomography.py
mho291 Jan 26, 2024
0b70367
Update test_tomography_gate_set_tomography.py
mho291 Jan 26, 2024
980af80
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 26, 2024
94c2498
Update test_tomography_gate_set_tomography.py
mho291 Jan 26, 2024
f4cea68
Update qibo.rst
mho291 Jan 26, 2024
99db7cc
Update qibo.rst
mho291 Jan 26, 2024
af43399
Merge branch 'master' into Gate-set-tomography
renatomello Jan 26, 2024
687bb0d
Update test_tomography_gate_set_tomography.py
mho291 Jan 26, 2024
5a5bdd7
attempting to fix directory problem
shangtai Jan 26, 2024
60a3629
Update test_tomography_gate_set_tomography.py
shangtai Jan 26, 2024
76b2716
attempting to fix directory problem
shangtai Jan 26, 2024
2e1c097
Merge remote-tracking branch 'origin/Gate-set-tomography' into Gate-s…
shangtai Jan 26, 2024
9a4abd7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 26, 2024
c8dca4b
Merge branch 'master' into Gate-set-tomography
renatomello Jan 29, 2024
1aab19e
Merge branch 'Gate-set-tomography' of https://github.com/qiboteam/qib…
renatomello Jan 29, 2024
270583f
fix imports
renatomello Jan 30, 2024
3b995b4
Update test_tomography_gate_set_tomography.py
mho291 Feb 1, 2024
ab42f3c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 1, 2024
db81698
Update test_tomography_gate_set_tomography.py
mho291 Feb 1, 2024
014a940
Merge branch 'master' into Gate-set-tomography
renatomello Feb 2, 2024
2592ec8
Merge branch 'master' into Gate-set-tomography
renatomello Feb 3, 2024
14a1e6c
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
16645e4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2024
f61ca23
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
de09570
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2024
0a631d3
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
866056c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2024
a8597e9
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
a5aa045
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
dbc0c14
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
4905dc5
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
35c4ec1
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
d066542
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
6686186
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2024
069bd36
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
7df9c75
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2024
2dbe5ed
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
f35df79
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
9f1f99b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2024
b8e4b24
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
b5cb822
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
76a8204
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
4570678
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
b46d30c
Update test_tomography_gate_set_tomography.py
mho291 Feb 6, 2024
dc2ac89
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2024
46785b0
Improved documentation in qibo.rst
mho291 Feb 15, 2024
70d36bb
Added more details to documentation
mho291 Feb 15, 2024
6e755bc
Updated gate_set_tomography.py
mho291 Feb 15, 2024
bde27f1
Removed commented out lines
mho291 Feb 15, 2024
5d29894
Modified test_tomography_gate_set_tomography.py to test for expected …
mho291 Feb 15, 2024
52e530b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 15, 2024
8e5e23a
Corrected typo
mho291 Feb 15, 2024
f559932
Update gate_set_tomography.py
mho291 Feb 15, 2024
2677856
Update qibo.rst
mho291 Feb 15, 2024
6c1eed2
Update qibo.rst
mho291 Feb 16, 2024
eec5750
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 16, 2024
513336b
Update qibo.rst
mho291 Feb 16, 2024
054a3a9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 16, 2024
c6a0142
Update qibo.rst
mho291 Feb 16, 2024
317ed69
Update qibo.rst
mho291 Feb 16, 2024
da539f4
Update qibo.rst
mho291 Feb 16, 2024
68103c5
Update qibo.rst
mho291 Feb 16, 2024
c011992
Update qibo.rst
mho291 Feb 16, 2024
dd9767c
Merge branch 'master' into Gate-set-tomography
scarrazza Feb 19, 2024
51d2df1
fixing docs compilation
scarrazza Feb 19, 2024
7aff5c2
Merge branch 'Gate-set-tomography' of https://github.com/qiboteam/qib…
mho291 Feb 19, 2024
f8e9a5d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
b24abe2
Added remark for reset_registers()
mho291 Feb 19, 2024
5d619da
Tidying up documentation
mho291 Feb 19, 2024
05e666e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
5497b21
Update doc/source/api-reference/qibo.rst
mho291 Feb 22, 2024
5929e79
Update doc/source/api-reference/qibo.rst
mho291 Feb 22, 2024
c9d1a79
Merge branch 'master' into Gate-set-tomography
renatomello Feb 23, 2024
afb3eac
Merge branch 'master' into Gate-set-tomography
renatomello Feb 26, 2024
9032b75
Merge branch 'master' into Gate-set-tomography
renatomello Feb 27, 2024
3f17348
Modified description of GST
mho291 Feb 27, 2024
cae3981
Updated formatting
mho291 Feb 27, 2024
1c47f66
Removed reset_registers() function from gst.py (to be moved to PEC), …
mho291 Feb 27, 2024
d9dd319
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 27, 2024
3edcc91
Modified reset_registers to take in tuples. Modified respective tests.
mho291 Feb 27, 2024
a780c5b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 27, 2024
9904667
feat: implemented GST function
BrunoLiegiBastonLiegi Feb 28, 2024
f206bee
feat: using @cache to speed up
BrunoLiegiBastonLiegi Feb 28, 2024
1dc724b
fix: minor updates
BrunoLiegiBastonLiegi Feb 28, 2024
71ecd4d
fix: further minor changes
BrunoLiegiBastonLiegi Feb 28, 2024
84c32ec
refactor: prepare_states and measurement_basis now return the gates +…
BrunoLiegiBastonLiegi Mar 1, 2024
2214f99
fix: minor adjustments
BrunoLiegiBastonLiegi Mar 1, 2024
4f53637
doc: updated the docstrings
BrunoLiegiBastonLiegi Mar 1, 2024
8ab3ead
refactor: cached observables + compressed GST_execute_circuit tests
BrunoLiegiBastonLiegi Mar 1, 2024
e11e2e3
test: added test for execute_GST
BrunoLiegiBastonLiegi Mar 1, 2024
c588359
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Mar 4, 2024
8a6c1d2
test: added test for _get_observable
BrunoLiegiBastonLiegi Mar 4, 2024
10c1c99
test: added a test for the complete GST procedure
BrunoLiegiBastonLiegi Mar 6, 2024
0dd59a0
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Mar 6, 2024
b763b3d
Merge branch 'master' into Gate-set-tomography
renatomello Mar 6, 2024
78a7a58
Merge branch 'master' into Gate-set-tomography
renatomello Mar 6, 2024
dfb1ee6
Merge branch 'master' into Gate-set-tomography
renatomello Mar 9, 2024
29d33f2
Merge branch 'master' into Gate-set-tomography
renatomello Mar 12, 2024
682ea73
test: added matrix transformation in test_GST
BrunoLiegiBastonLiegi Mar 13, 2024
3e0480b
Merge branch 'master' into Gate-set-tomography
renatomello Mar 14, 2024
4a6feaa
Merge branch 'Gate-set-tomography' of https://github.com/qiboteam/qib…
renatomello Mar 14, 2024
d9b3c2d
Merge branch 'master' into Gate-set-tomography
renatomello Mar 14, 2024
72fbc85
Merge branch 'master' into Gate-set-tomography
renatomello Mar 14, 2024
82a65a4
Merge branch 'master' into Gate-set-tomography
renatomello Mar 18, 2024
4ccef0a
Update test_GST in test_tomography_gate_set_tomography.py
mho291 Mar 19, 2024
c6702ff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 19, 2024
fdb1463
Update test_GST() in test_tomography_gate_set_tomography.py
mho291 Mar 19, 2024
8eca1c9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 19, 2024
1c99fb5
Merge branch 'master' into Gate-set-tomography
renatomello Mar 23, 2024
e210bba
Merge branch 'Gate-set-tomography' of https://github.com/qiboteam/qib…
renatomello Mar 23, 2024
f0c6650
Tried some temp fix, local tests all passed
yjmaxpayne Mar 27, 2024
f29cb67
fix: increased tolerance + function renaming
BrunoLiegiBastonLiegi Mar 28, 2024
d9084d6
doc: reworked documentation
BrunoLiegiBastonLiegi Mar 29, 2024
82cfef1
fix: fix doctest
BrunoLiegiBastonLiegi Mar 29, 2024
58254e1
Fixed minor typo in gate_set_tomography.py
mho291 Apr 2, 2024
d3c02e2
Added >2 qubit gate for testing GST()
mho291 Apr 2, 2024
7b11ea1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 2, 2024
0974e63
Added more tests
mho291 Apr 2, 2024
e2cc8a1
Merge branch 'Gate-set-tomography' of https://github.com/qiboteam/qib…
mho291 Apr 2, 2024
ce16399
Added more tests
mho291 Apr 2, 2024
3b639db
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 2, 2024
dcdcee7
fix: renamed function
BrunoLiegiBastonLiegi Apr 5, 2024
7cc9c06
Removed unused argument inside _expectation_value()
mho291 Apr 8, 2024
bbf2a6a
Added docstrings for _gates, _measurements, _observables, _get_observ…
mho291 Apr 8, 2024
73fced5
Minor changes to typos, functions
mho291 Apr 8, 2024
814bbf1
Modified test_gate_set_tomography
mho291 Apr 8, 2024
2fd01e1
Fixed typo
mho291 Apr 8, 2024
d276c36
Added flag for Pauli Liouville outputs
mho291 Apr 8, 2024
b50fde2
Added more tests
mho291 Apr 8, 2024
33d3880
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2024
e20239d
Modified qibo.rst file
mho291 Apr 11, 2024
119ecca
Modified documentation in qibo.rst file
mho291 Apr 11, 2024
d40f14b
Fixed typo in qibo.rst
mho291 Apr 11, 2024
6bdb71f
Update qibo.rst
mho291 Apr 11, 2024
b72ff0b
Added documentation for gate_set_tomography.py
mho291 Apr 11, 2024
f118390
Grouping pytests together
mho291 Apr 11, 2024
144054d
Included sympy import S
mho291 Apr 11, 2024
3176e62
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2024
ab0896b
Modified _get_observable function
mho291 Apr 11, 2024
03365c6
Reverted to previous INDEX_NQUBITS and modified test__get_observable
mho291 Apr 11, 2024
c5208d4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2024
2b1b3d9
Updated code, removed invert circuit
mho291 May 2, 2024
0cc6429
Removed reset register tests
mho291 May 2, 2024
9b93cb8
Update tests
mho291 May 2, 2024
b714f20
Update gate_set_tomography.py
mho291 May 4, 2024
2d5c786
fix: small corrections
BrunoLiegiBastonLiegi May 6, 2024
c3496c3
build: merge master
BrunoLiegiBastonLiegi May 6, 2024
f5d83dd
fix: small corrections to tests
BrunoLiegiBastonLiegi May 6, 2024
4546f7a
fix: small corrections to docs
BrunoLiegiBastonLiegi May 6, 2024
4732c08
Added tests
mho291 May 7, 2024
e908109
Revised tests
mho291 May 7, 2024
12e58c3
Modified tests
mho291 May 7, 2024
442f6e3
build: merge master
BrunoLiegiBastonLiegi May 30, 2024
fad7e20
feat: introduced transpilation
BrunoLiegiBastonLiegi Jun 3, 2024
a788de3
fix: added more passes to the default transpiler
BrunoLiegiBastonLiegi Jun 10, 2024
5aaf8c4
fix: removed expectation val err test
BrunoLiegiBastonLiegi Jun 10, 2024
8c04b51
test: implemented test for transpiled GST
BrunoLiegiBastonLiegi Jun 17, 2024
df68f78
build: merge master
BrunoLiegiBastonLiegi Jun 17, 2024
687c260
fix: fixed observable for GST with transpiler
BrunoLiegiBastonLiegi Jun 17, 2024
de09730
fix: fixes to transpiled GST
BrunoLiegiBastonLiegi Jun 26, 2024
2fd1aa4
Merge branch 'master' into Gate-set-tomography
BrunoLiegiBastonLiegi Jun 26, 2024
ec4d03a
Merge branch 'master' into Gate-set-tomography
renatomello Jun 28, 2024
2c77ea2
Merge branch 'master' into Gate-set-tomography
renatomello Jun 28, 2024
d733285
build: update lock
BrunoLiegiBastonLiegi Jun 28, 2024
9523288
fix: removed _expectation_value
BrunoLiegiBastonLiegi Jun 28, 2024
fbe3dae
fix: ignoring coverage of qibolab related lines
BrunoLiegiBastonLiegi Jun 28, 2024
7dcc8b8
Merge branch 'master' into Gate-set-tomography
renatomello Jul 1, 2024
e83799b
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Jul 2, 2024
9d55baa
fix: added the global SUPPORTED_NQUBITS var
BrunoLiegiBastonLiegi Jul 2, 2024
f7be227
fix: forgot to pass backend to _check_backend
BrunoLiegiBastonLiegi Jul 2, 2024
7ee857a
Merge branch 'master' into Gate-set-tomography
renatomello Jul 5, 2024
ac6005b
Merge branch 'master' into Gate-set-tomography
renatomello Jul 13, 2024
5f42c1f
lock file
renatomello Jul 13, 2024
cbec922
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 15, 2024
99d6561
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 15, 2024
b702237
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 15, 2024
1ccabc4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 15, 2024
8e76fd9
remove unused imports
renatomello Jul 15, 2024
bb50f01
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 15, 2024
d851e5c
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 15, 2024
34d1b88
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 15, 2024
23bd9bb
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Jul 15, 2024
7fe0ec2
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Jul 15, 2024
2aff5ea
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Jul 15, 2024
171d7e5
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Jul 15, 2024
2352cfe
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Jul 15, 2024
b5155b9
Update src/qibo/tomography/gate_set_tomography.py
BrunoLiegiBastonLiegi Jul 15, 2024
281746a
Merge branch 'master' into Gate-set-tomography
renatomello Jul 16, 2024
a468861
Added 'base-4 indexing' descriptions for docstrings
mho291 Jul 17, 2024
1c69272
Merge branch 'master' into Gate-set-tomography
renatomello Jul 17, 2024
537bbe9
add 'S' symbol
renatomello Jul 17, 2024
332ba3f
revert last commit
renatomello Jul 19, 2024
f281af1
revert `S` to `sympy`
renatomello Jul 19, 2024
e61575b
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 19, 2024
5843470
Update src/qibo/tomography/gate_set_tomography.py
renatomello Jul 19, 2024
5180581
docstring modifications
renatomello Jul 19, 2024
aa2488c
Merge branch 'Gate-set-tomography' of github.com:qiboteam/qibo into G…
renatomello Jul 19, 2024
7be2949
more docstring fixing
renatomello Jul 19, 2024
fde251d
remove hidden functions from `.rst`
renatomello Jul 19, 2024
9351879
modifications in the api ref
renatomello Jul 19, 2024
e3730a4
fix api ref
renatomello Jul 19, 2024
8a6543f
fix test
renatomello Jul 19, 2024
6080581
fix tests maybe
renatomello Jul 20, 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
67 changes: 65 additions & 2 deletions doc/source/api-reference/qibo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2365,6 +2365,71 @@ Parameterized quantum circuit integral
.. autofunction:: qibo.quantum_info.pqc_integral


.. _GST:

Gate Set Tomography
-------------------

Gate Set Tomography (GST) is a powerful technique employed in quantum information processing to characterize the behavior of quantum gates on quantum hardware [1, 2, 3]. The primary objective of GST is to provide a robust framework for obtaining a representation of quantum gates within a predefined gate set when subjected to noise inherent to the quantum hardware.

By characterizing the impact of noise on quantum gates, GST enables the identification and quantification of errors, laying the groundwork for subsequent error mitigation strategies. The insights gained from GST are instrumental, for instance, in setting up the necessary parameters for Probabilistic Error Cancellation (PEC).

In practice, given a set of operators (or gates), :math:`\mathcal{O}=\{O_0, O_1, \dots, O_n\}`, a set of initial states :math:`\{\rho_k\}`, and a set of measurement bases :math:`\{M_j\}`, one performs GST on the :math:`l`-th operator by choosing an initial state :math:`\rho_k`, applying the gate :math:`O_l \in \mathcal{O}`, measuring in the :math:`M_j` basis in order to obtain the following matrix:

.. math::
\{\tilde{O}_l\}_{jk} = \text{tr}(M_j\,O_l\,\rho_k)

which provides an estimated representation of the operator :math:`O_l` in the specific system.

This implementation makes use, in particular, of :math:`\rho_k \in \{ |0\rangle\langle0|, |1\rangle\langle1|, |+\rangle\langle +|, |y+\rangle\langle y+| \}^{\otimes n}` and :math:`M_j \in \{ I, X, Y, Z\}^{\otimes n}` [4] with :math:`n\in\{1,2\}` being the number of qubits.

Note, however, that :math:`\{\tilde{O}_l\}_{jk}` is not yet given in the Pauli-Liouville representation, more commonly known as the Pauli Transfer Matrix notation. To obtain the Pauli-Liouville representation, one needs the two matrices, :math:`\{\tilde{g}\}_{jk}` and :math:`T`, where

.. math::
\tilde{g}_{jk} = \text{tr}(M_j\,\rho_k)

which is essentially obtained by measuring the initial states :math:`\{\rho_k\}` in each basis :math:`\{M_j\}` without any gates' application, and

.. math::
T = \begin{pmatrix} 1 & 1 & 1 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 1 & -1 & 0 & 0 \end{pmatrix}

that is the matrix, in a common gauge, implementing the change of basis.

Therefore, the Pauli-Liouville representation can be recovered as

.. math::
O_l^{PL} = T\,g^{-1}\,\tilde{O_l}\,T^{-1}

References:

[1] Blume-Kohout, Robin, et al. "Robust, self-consistent, closed-form tomography of quantum logic gates on a trapped ion qubit." arXiv preprint arXiv:1310.4492 (2013).

[2] Greenbaum, Daniel. "Introduction to quantum gate set tomography." arXiv preprint arXiv:1509.02921 (2015).

[3] Nielsen, Erik, et al. "Gate set tomography." Quantum 5 (2021): 557.

[4] Endo, Suguru, Simon C. Benjamin, and Ying Li. "Practical quantum error mitigation for near-future applications." Physical Review X 8.3 (2018): 031027.

.. autofunction:: qibo.tomography.gate_set_tomography.GST

.. autofunction:: qibo.tomography.gate_set_tomography._gate_tomography

.. autofunction:: qibo.tomography.gate_set_tomography._expectation_value

.. autofunction:: qibo.tomography.gate_set_tomography._measurement_basis

.. autofunction:: qibo.tomography.gate_set_tomography._prepare_state

.. autofunction:: qibo.tomography.gate_set_tomography._get_observable

.. autofunction:: qibo.tomography.gate_set_tomography._measurements

.. autofunction:: qibo.tomography.gate_set_tomography._gates

.. autofunction:: qibo.tomography.gate_set_tomography._observables



.. _Parallel:

Parallelism
Expand Down Expand Up @@ -2506,12 +2571,10 @@ Alternatively, a Clifford circuit can also be executed starting from the :class:
circuit = random_clifford(nqubits)
result = Clifford.from_circuit(circuit)


.. autoclass:: qibo.backends.clifford.CliffordBackend
:members:
:member-order: bysource


Cloud Backends
^^^^^^^^^^^^^^

Expand Down
61 changes: 61 additions & 0 deletions doc/source/code-examples/advancedexamples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2112,3 +2112,64 @@ In this case circuits will first be transpiled to respect the 5-qubit star conne
Then all gates will be converted to native. The :class:`qibo.transpiler.unroller.Unroller` transpiler used in this example assumes Z, RZ, GPI2 or U3 as
the single-qubit native gates, and supports CZ and iSWAP as two-qubit natives. In this case we restricted the two-qubit gate set to CZ only.
The final_layout contains the final logical-physical qubit mapping.

.. _gst_example:

How to perform Gate Set Tomography?
-----------------------------------

In order to obtain an estimated representation of a set of quantum gates in a particular noisy environment, qibo provides a GST routine in its tomography module.

Let's first define the set of gates we want to estimate:

.. testcode::

from qibo import gates

gate_set = {gates.X, gates.H, gates.CZ}

For simulation purposes we can define a noise model. Naturally this is not needed when running on real quantum hardware, which is intrinsically noisy. For example, we can suppose that the three gates we want to estimate are going to be noisy:

.. testcode::

from qibo.noise import NoiseModel, DepolarizingError

noise_model = NoiseModel()
noise_model.add(DepolarizingError(1e-3), gates.X)
noise_model.add(DepolarizingError(1e-2), gates.H)
noise_model.add(DepolarizingError(3e-2), gates.CZ)

Then the estimated representation of the gates in this noisy environment can be extracted by running the GST:

.. testcode::

from qibo.tomography import GST

estimated_gates = GST(
gate_set = gate_set,
nshots = 10000,
noise_model = noise_model
)

In some cases the empty circuit matrix :math:`E` can also be useful, and can be returned by setting the ``include_empty`` argument to ``True``:

.. testcode::

empty_1q, empty_2q, *estimated_gates = GST(
gate_set = gate_set,
nshots = 10000,
noise_model = noise_model,
include_empty = True,
)

where ``empty_1q`` and ``empty_2q`` correspond to the single and two qubits empty matrices respectively.
Similarly, the Pauli-Liouville representation of the gates can be directly returned as well:

.. testcode::

estimated_gates = GST(
gate_set = gate_set,
nshots = 10000,
noise_model = noise_model,
Pauli_Liouville = True,
)
Loading
Loading