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

Pass tests #45

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Pass tests #45

wants to merge 35 commits into from

Conversation

akataba
Copy link
Owner

@akataba akataba commented Mar 6, 2024

Closes #24

@akataba akataba requested a review from Farquhar13 March 7, 2024 12:47
@Farquhar13
Copy link
Collaborator

Farquhar13 commented Mar 7, 2024

Hey @akataba. Thanks for the work on the tests!

It looks there are a lot of code changes here to that are unrelated to the tests. Could you either remove these or make a new PR with just the test-related code?

It would probably be good to rebase on top of main, or just make new branch from main, because I see the old environment classes (before the PR that separated the environments into different files and changed the environment class names) are referenced.

requirements.txt Outdated Show resolved Hide resolved
scripts/best_fidelities.txt Outdated Show resolved Hide resolved
src/relaqs/api/__init__.py Outdated Show resolved Hide resolved
analysis/load_env_data.py Show resolved Hide resolved
src/relaqs/api/utils.py Outdated Show resolved Hide resolved
tests/relaqs/environments/test_gate_synth_env_rllib.py Outdated Show resolved Hide resolved

return alg
def run_noisy_one_qubit_experiment(gate, n_training_iterations=1, noise_file=" "):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already have a run function in utils.py that takes an environment variable, do you think it would be better to move run_noisy_one_qubit_experiment and run_noiseless_one_qubit_experiment to the scripts folder?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I defined these different functions was that building the configuration for the different environments is different and the observation dimensions are different.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things:

  1. The environments are written such that you don't need to change the configuration if you don't want to; one function can handle both environments (e.g., https://github.com/akataba/rl-repo/blob/main/scripts/run_and_save_v3.py).
  2. If there is something about these particular configurations that makes you want to keep these functions, I think we should move them from the api folder to the scripts folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix failing tests
2 participants