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

Feature/TwoQubitEncoding #342

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Changes from 2 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5a32776
set the main structure
Jun 23, 2023
014f075
Merge branch 'main' into feature/avelsh
Jun 23, 2023
9c9256e
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 23, 2023
a7822e0
add SQG and TQG encoding
Jul 8, 2023
59393a8
🎨 pre-commit fixes
pre-commit-ci[bot] Jul 8, 2023
cdd566e
update comments
Jul 13, 2023
716b8a6
Merge remote-tracking branch 'origin/feature/avelsh' into feature/avelsh
Jul 13, 2023
499b06e
🎨 pre-commit fixes
pre-commit-ci[bot] Jul 13, 2023
d283ef8
update according to comments, rename two qubit encoder
Jul 30, 2023
77cc2a5
Merge remote-tracking branch 'origin/feature/avelsh' into feature/avelsh
Jul 30, 2023
7c7d542
🎨 pre-commit fixes
pre-commit-ci[bot] Jul 30, 2023
9b0155a
correct asssertTwoQubitGateConstr
Aug 9, 2023
c9c1a44
Merge remote-tracking branch 'origin/feature/avelsh' into feature/avelsh
Aug 9, 2023
0266b24
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 9, 2023
122dd5d
fix two qubit encoding
Aug 14, 2023
1c0a309
rename from STDepth to TQDepth
Aug 14, 2023
7ca3ec7
sync with upstream
Aug 14, 2023
dfea58a
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 14, 2023
cf12bef
remove addIdentityGateToTQGVariables func
Aug 14, 2023
c095997
set a new func for founding of a two qubit depth
Aug 16, 2023
b6e11dd
Merge remote-tracking branch 'origin/feature/avelsh' into feature/avelsh
Aug 16, 2023
b128086
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 16, 2023
e37653d
fix founding of phase and set the last layer of paulis
Aug 21, 2023
8d1da8f
remove irrelevant tests
Aug 21, 2023
d042b11
set bindings and small fixes
Sep 5, 2023
92c5df6
optimize the using of variables
Sep 6, 2023
727fba8
Merge branch 'main' into feature/avelsh
pehamTom Sep 9, 2023
0425bfc
Merge remote-tracking branch 'avelsh/feature/avelsh' into feature/avelsh
pehamTom Sep 9, 2023
bd9af05
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 9, 2023
3a4c206
Added parsing of target metric for two_qubit_depth
pehamTom Sep 9, 2023
247e276
Merge remote-tracking branch 'avelsh/feature/avelsh' into feature/avelsh
pehamTom Sep 9, 2023
1b39f2b
update according comments
Sep 10, 2023
c8bb1d6
Merge remote-tracking branch 'origin/feature/avelsh' into feature/avelsh
Sep 10, 2023
a80fd55
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 10, 2023
098d4d6
set a new extra SQG layer
Sep 18, 2023
caafb46
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 18, 2023
31090be
create a new func pauliGateToIndex
Oct 10, 2023
292052b
Merge remote-tracking branch 'origin/feature/avelsh' into feature/avelsh
Oct 10, 2023
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
6 changes: 2 additions & 4 deletions include/cliffordsynthesis/encoding/GateEncoder.hpp
Original file line number Diff line number Diff line change
@@ -18,8 +18,7 @@ namespace cs::encoding {
class GateEncoder {
public:
GateEncoder(const std::size_t nQubits, const std::size_t tableauSize,
const std::size_t timestepLimit,
const std::size_t numberOfLayers,
const std::size_t timestepLimit, const std::size_t numberOfLayers,
TableauEncoder::Variables* tableauVars,
std::shared_ptr<logicbase::LogicBlock> logicBlock)
: N(nQubits), S(tableauSize), T(timestepLimit), L(numberOfLayers),
@@ -43,8 +42,7 @@ class GateEncoder {
// variable creation
virtual void createSingleQubitGateVariables();
virtual void createTwoQubitGateVariables();
void addIdentityGateToTQGVariables();

void addIdentityGateToTQGVariables();

// encode the relation between the tableaus and the gates
virtual void encodeGates() {
6 changes: 4 additions & 2 deletions src/cliffordsynthesis/encoding/GateEncoder.cpp
Original file line number Diff line number Diff line change
@@ -52,15 +52,17 @@ void GateEncoder::createTwoQubitGateVariables() {
}

void encoding::GateEncoder::addIdentityGateToTQGVariables() {
DEBUG() << "Creating identity gate variables for TQG variables in the STQEncoding.";
DEBUG() << "Creating identity gate variables for TQG variables in the "
"STQEncoding.";
for (std::size_t t = 0U; t < T; ++t) {
auto& timeStep = vars.gC[t];
for (std::size_t ctrl = 0U; ctrl < N; ++ctrl) {
auto& control = timeStep[ctrl];

// Add I to the two qubit gates
const std::string gName = "g_" + std::to_string(t) + "_" +
toString(qc::OpType::None) + "_" + std::to_string(ctrl);
toString(qc::OpType::None) + "_" +
std::to_string(ctrl);
TRACE() << "Creating variable " << gName;
control.emplace_back(lb->makeVariable(gName));
}